# Reading data from files in TMinuit fitting

**URL:** <https://root-forum.cern.ch/t/reading-data-from-files-in-tminuit-fitting/36156>\
**Category:** Newbie\
**Created:** [September 26, 2019, 7:18am UTC](https://root-forum.cern.ch/t/reading-data-from-files-in-tminuit-fitting/36156 "2019-09-26T07:18:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DANTE0316](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/e79b87/32.png) [@DANTE0316](https://root-forum.cern.ch/u/DANTE0316)\
**Post date:** [September 26, 2019, 7:18am UTC](https://root-forum.cern.ch/t/reading-data-from-files-in-tminuit-fitting/36156/1 "2019-09-26T07:18:30Z")

</div>

Hi ,everyone! I want to ask a question ,if it is necessary to read the data in the main program when I fit datas with TMinuit class?Can I read it in the function that I define to to be minimized? Why？

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [September 26, 2019, 4:25pm UTC](https://root-forum.cern.ch/t/reading-data-from-files-in-tminuit-fitting/36156/2 "2019-09-26T16:25:39Z")

</div>

You may want to review [https://root.cern/doc/master/classTMinuit.html](https://root.cern/doc/master/classTMinuit.html)  
or [https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#numerical-minimization](https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#numerical-minimization)
