24int main(
int argc,
char *argv[]){
26 cout <<
"please append a root file name " << endl;
30 TString str_root_file(argv[1]);
31 str_root_file.Append(argv[2]);
32 TFile
f(str_root_file);
34 if(argc>3)
t = (TTree*)
f.Get(argv[3]);
36 TList *l =
f.GetListOfKeys();
37 if(l->GetEntries()<1){
38 cout <<
"the root file " << argv[2] <<
" is empty, check it!" << endl;
41 else t = (TTree*)
f.Get(l->At(0)->GetName());
43 Long_t m_totnum =
t->GetEntries();
44 double m_run(0), m_min(9999999), m_max(0), m_cur_run(0);
45 t->SetBranchAddress(
"run", &m_run);
47 for(Long_t i=0; i<m_totnum; i++){
49 if(i%10000==0) cout <<
"i = " << i <<
" run: " << m_run << endl;
50 if(m_run != m_cur_run && m_run>1){
51 if(m_min>m_run) m_min=m_run;
52 if(m_max<m_run) m_max=m_run;
56 cout <<
"min " << (long)m_min <<
" max " << (
long)m_max << endl;
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")