Go to the source code of this file.
plothistos |
( |
TString |
filename = "histos.root" | ) |
|
Definition at line 1 of file plothistos.C.
References DrawNice2DHisto(), file, filename, i, LoadPandaStyle(), and TString.
Referenced by anaDMesonsCharged().
3 gROOT->LoadMacro(
"$VMCWORKDIR/macro/mvd/Tools.C");
6 if (!file) {cout<<
"File not there..."<<endl;
return;}
7 TCanvas* can =
new TCanvas();
9 picname.ReplaceAll(
".root",
".ps");
11 cout <<
"opening: " << pic.Data()<<endl;
15 TList* list = file->GetListOfKeys();
16 if (!list) {cout<<
"List not there..."<<endl;
return;}
20 can->Divide(divx, divy);
21 for(
int i=0;
i<list->GetEntries();
i++)
23 if(padcount > divx+divy)
25 can->Print(pic.Data());
27 can->Divide(divx, divy);
31 TKey*
key = (TKey*)list->At(
i);
32 keyclass = key->GetClassName();
34 if(keyclass.Contains(
"TH1"))
37 TH1* his = (TH1*)key->ReadObj();
39 }
else if(keyclass.Contains(
"TH2"))
42 TH2* his2 = (TH2*)key->ReadObj();
44 }
else if(keyclass.Contains(
"TProfile"))
47 TProfile* hpro = (TProfile*)key->ReadObj();
54 can->Print(pic.Data());
56 can->Print(pic.Data());
57 cout <<
"closed: " << pic.Data()<<endl;