ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided
Hi all,
I am facing a problem. Now I want to print a branch of a tree. More specific , there is only one value in the branch which is a mcChannelNumber. like this:
Br 0 :mcChannelNumber : mcChannelNumber/I *
*Entries : 8463 : Total Size= 34548 bytes File Size = 426 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 79.89 *
the following is what i am trying( it doesn’t work):
void hsimpleReader() {
auto myFile = TFile::Open("./user.hucheng.17397654.XAMPP._000001.root");
auto t = (TTree*) myFile->Get(“Staus_Nominal”);
Int_t *mcChannelNumber=0;
t->SetBranchAddress(“mcChannelNumber”,&mcChannelNumber);
cout<< *mcChannelNumber<<endl;
}