Re: [ROOT] pointer to 2-dimensional array of TH1F

From: Martin Brueckel (brueckel@iekp.fzk.de)
Date: Wed Dec 04 2002 - 10:29:27 MET


Hallo Brett,

thanks for your help.

Unfortunately, when looping over the histograms within the function, it 
works with the very first histogram, but calling the .Fit() for the 
second histogram, it produces a segmentation violation.
Do you know how to deal with it ?

Thanks, Martin




Martin Brueckel writes:
 > TH1F* values[n1][n2];

BTW, this is illegal C++ unless n1 and n2 are const ints.  However,
g++ will let you get away with it.

 > function(**values);
 > 
 > with the function:
 > 
 > class::function(TH1F* values[n2]){
 > 
 > values[i][j]->Fit(...);

values[i][j].Fit(...);

-Brett.







>  
>



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:22 MET