hi there!
this seems a very simple question, yet i wasn’t able to solve the problem till now!
so i have a bunch of files in a directory all named “JPsi_BW_xxxxx.dat.root” (xxxxx are numbers of format ‘4.06650’ and so on) and what i want to do it loop over all files in the dir and make ROOT understand that this number in the filename is a variable (called “moms”) unique to each file that is stored and later on used for further computations.
so i’ve tried all kinds of sprintf-sscanf-fgets combinations but the assignment of the number as a variable just isn’t working!
the error message i get is
moms 0x9add20
Error: @ Illegal operator for pointer 2 ana_JPsi.C:83:
Error: @ Illegal operator for pointer 2 ana_JPsi.C:83:
by the way, there’s nothing fishy going on in line 83, that should be a straight-forward calculation using moms, but i assume that since moms is something weird, ROOT can’t process it.
anybody any ideas?
cheers,
Kati