#include "TTree.h" #include "TBranchElement.h" #include "TLeaf.h" #include "TH1F.h" #include "TH2F.h" #include "TFile.h" #include "TChain.h" #include "TStyle.h" #include "TMath.h" #include #include #include #include #include using namespace std; void problem(){ TFile* file=new TFile("/publicfs/dyb/data/userdata/chloh/Project/Production/RadioActivity/AmC/Output/run000.rec.root","read"); TTree *tree = (TTree*)file->Get("Event/CalibReadout/CalibReadoutHeader"); if (!tree) { std::cout << "Error: tree not found." << std::endl; delete file; return; } tree->Print(); UInt_t triggerTimeSec=1; tree->SetBranchAddress("triggerTimeSec", &triggerTimeSec); Int_t nentries=tree->GetEntries(); for(int jentry=0; jentry<2; jentry++){ tree->GetEntry(jentry); cout<<"triggerTimeSec = "<