Maxima and Minima in data points

Suppose there is a data file containing column wise data points and i can read and draw a graph( between any two cloumns ) in ROOT, now
after this i need to find global as well all local maxima and minima. How can i do that?
would be thankful for the reply.

Hi,

TDataFrame looks like the solution here.
DId you have a look to the Min, Max, Mean actions? A copy-paste example can be found here: https://root.cern.ch/doc/master/tdf001__introduction_8C.html

Cheers,
D

Actually i searched for somewhat like the above but i wasn’t able to find it, now i am reading it,hope so it works !
Thanks !

I am running the following code :

void fill_tree(const char *event,const char fd) ;
{
TFile f(event , “Create”) ;
TTree t(fd , fd) ;
int b1;
float b2;
t.Branch(“b1” , &b1);
t.Branch(“b2”, &b2);
for(int i = 0 ; i < 10000 ; i++) {
b1 = i ;
b2 = i
i ;
t.Fill() ;
}
t.Write();
f.Close();
return ;

}

But then its showing the ERROR as:- symbol event is not defined in the current scope .
in the root when i am executing it,now how come this occurs?

Hi,

why are you generating a tree randomly filled?
What do you mean by “running”? Are you compiling the code? Are you using a macro?

D

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.