12 gROOT->IncreaseDirLevel();
16 gROOT->DecreaseDirLevel();
34 TString mPath(gROOT->GetMacroPath());
43 gROOT->SetMacroPath(mPath);
44 gSystem->AddIncludePath(Form(
"-I%s", dir.Data()));
52 while ((o = next())) {
56 MyPrint(Form(
"ObsKey=%s Detector=%s", obsKey.Data(), det.Data()));
59 if (det.Contains(
"TRACKLET", TString::kIgnoreCase)) {
61 Color_t col = g->GetMarkerColor();
72 if (obsKey.EqualTo(
"DN/DETARAP", TString::kIgnoreCase))
80 MyGuard g(Form(
"HEPData %s", filename.Data()));
87 MyGuard g(Form(
"File %s", filename.Data()));
88 TFile*
file = TFile::Open(filename,
"READ");
99 MyGuard g(Form(
"Collection: %s", d->GetName()));
102 while ((obj = next())) {
103 TClass* cls = obj->IsA();
105 MyPrint(Form(
"W: Object %s in %s has unknown class: %s",
106 obj->GetName(), d->GetName(), obj->ClassName()));
109 if (cls->InheritsFrom(TDirectory::Class())) {
113 if (cls->InheritsFrom(TCollection::Class())) {
117 if (cls->InheritsFrom(GraphSysErr::Class())) {
118 MyPrint(Form(
"Adding %s/%s to candidate list",
119 d->GetName(), obj->GetName()));
127 MyGuard g(Form(
"File directory: %s", d->GetPath()));
128 TIter next(d->GetListOfKeys());
130 while ((key = static_cast<TKey*>(next()))) {
131 TClass* cls = gROOT->GetClass(key->GetClassName());
133 MyPrint(Form(
"W: Object %s in %s has unknown class: %s",
134 key->GetName(), d->GetPath(), key->GetClassName()));
137 if (cls->InheritsFrom(TDirectory::Class())) {
141 if (cls->InheritsFrom(TCollection::Class())) {
145 if (cls->InheritsFrom(GraphSysErr::Class())) {
146 MyPrint(Form(
"Adding %s/%s to candidate list",
147 d->GetPath(), key->GetName()));
148 toInspect.Add(key->ReadObj());
155 if (filename.EndsWith(
".input"))
167 if (!gROOT->GetClass(
"GraphSysErr")) {
168 AddPath(
"$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/gse");
170 gROOT->LoadMacro(
"GraphSysErr.C+g");
177 const char** ptr = args;
181 if (argi.BeginsWith(
"-"))
continue;
182 if (argi.EndsWith(
"root.exe"))
continue;
183 if (argi.EndsWith(
"QuickDraw.C"))
continue;
184 if (!argi.EndsWith(
".input") && !argi.EndsWith(
".root"))
continue;
186 MyPrint(Form(
"Adding file %s", argi.Data()));
187 list.Add(
new TObjString(argi));
199 while ((obj = next())) {
213 while ((g = static_cast<GraphSysErr*>(next()))) {
216 ymax = TMath::Max(mx,ymax);
217 ymin = TMath::Min(mn,ymin);
221 xmin = TMath::Min(x1,xmin);
222 xmax = TMath::Max(x2,xmax);
225 MyPrint(Form(
"x-range: [%f,%f] y-range: [%f,%f]",xmin,xmax,ymin,ymax));
230 TCanvas*
c =
new TCanvas(
"c",
"c", 1000, 1000);
231 c->SetTopMargin(0.01);
232 c->SetRightMargin(0.01);
233 c->SetLeftMargin(ymax > 100 ? 0.14 : 0.1);
234 TH1* f =
new TH2D(
"frame",
"",300,
235 (xmin < 0 ? 1.3 : 0.7)*xmin,
236 (xmax < 0 ? 0.7 : 1.3)*xmax,
237 300, 0.9*ymin, 1.1*ymax);
239 f->SetXTitle(
"\\eta");
240 f->SetYTitle(
"\\hbox{d}N_{\\hbox{ch}}/\\hbox{d}\\eta");
241 f->GetYaxis()->SetTitleOffset(ymax > 1000 ? 1.7 : 1.1);
242 f->GetYaxis()->SetNdivisions(210);
243 f->GetXaxis()->SetNdivisions(210);
250 while ((g = static_cast<GraphSysErr*>(next()))) {
251 TString lOpt(opt); lOpt.Append(
" "); lOpt.Append(next.GetOption());
252 MyPrint(Form(
"%s w/options \"%s\" (%d)",
253 g->GetName(),lOpt.Data(),
263 c->SaveAs(
"QuickDraw.png");
#define MyGuard(L, F,...)
void Draw(Option_t *option="")
Double_t GetErrorXRight(Int_t p) const
void SetCommonSumLineColor(Color_t color)
UInt_t GetSumOption() const
void SetCommonSumOption(EDrawOption_t opt)
static TSeqCollection * Import(const TString &fileName)
Double_t GetErrorXLeft(Int_t p) const
void ProcessCandidates(const TSeqCollection *inp, TList &toDraw)
void GetMinMax(Option_t *option, Double_t &ymin, Double_t &ymax) const
void SetDataOption(EDrawOption_t opt)
void AddPath(const TString &dir, Bool_t pre=true)
void SetSumFillStyle(Style_t style)
const char * GetKey(const char *key) const
void SetSumOption(EDrawOption_t opt)
void ProcessOne(const TString &filename, TList &toDraw)
TFile * file
TList with histograms for a given trigger.
void ProcessCollection(const TCollection *d, TList &toInspect)
void ProcessFile(const TString &filename, TList &toDraw)
void ProcessHEPData(const TString &filename, TList &toDraw)
void SetSumFillColor(Color_t color)
void SetCommonSumFillStyle(Style_t style)
Double_t GetX(Int_t p) const
void ProcessFileDirectory(const TDirectory *d, TList &toInspect)
void SetSumLineColor(Color_t color)
void SetCommonSumFillColor(Color_t color)
void MyPrint(const char *msg)