FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
macro
outdated
run
plot_all.C
Go to the documentation of this file.
1
#include "TString.h"
2
#include "TFile.h"
3
#include "TCanvas.h"
4
#include "TKey.h"
5
#include <iostream>
6
#include "TH1F.h"
7
#include "TRandom.h"
8
9
using
std::cout;
10
using
std::endl;
11
12
bool
plot_all
(
TString
fn=
"QA_histograms.root"
)
13
{
14
TCanvas *
c1
=
new
TCanvas();
15
c1->Divide(6,6);
16
17
TFile *
f
=
new
TFile(fn,
"READ"
);
18
if
(!f->IsZombie())
19
{
20
TKey *
key
;
21
TIter
next
(f->GetListOfKeys());
22
23
Int_t yy = 0;
24
while
( (key = (TKey*)
next
()) )
25
{
26
c1->cd(yy+1);
27
TObject *obj = key->ReadObj();
28
29
// only check TH1Fs
30
if
(!obj->InheritsFrom(
"TH1F"
))
continue
;
31
32
TString
name
= obj->GetName();
33
cout << name << endl;
34
TH1F*
h
= (TH1F*) obj;
35
h->SetLineColor(2);
36
h->SetLineWidth(2);
37
h->Draw();
38
yy++;
39
}
40
41
}
42
}
43
h
Int_t h
Definition:
PndSttHelixTrackFitter.cxx:44
f
TFile * f
Definition:
bump_analys.C:12
TString
TString
Definition:
SimCompleteLinkDef.h:6
c1
c1
Definition:
plot_dirc.C:35
name
TString name
Definition:
createRootGeoFile.C:82
plot_all
bool plot_all(TString fn="QA_histograms.root")
Definition:
plot_all.C:12
next
static int next[96]
Definition:
ranlxd.cxx:374
key
Definition:
PndEmcAnalysis.cxx:43
Generated on Wed Apr 3 2019 10:02:48 for FairRoot/PandaRoot by
1.8.5