25 TString fnPattern =
"trending_";
32 TList* files = dir->GetListOfFiles();
33 if (!
gSystem->ChangeDirectory(oldDir)) {
34 Error(
"ScanDirectory",
"Failed to go back to %s", oldDir.Data());
38 Warning(
"ScanDirectory",
"No files found in %s", dir->GetName());
48 TSystemFile*
file = 0;
49 while ((file = static_cast<TSystemFile*>(next()))) {
52 TString full(
gSystem->ConcatFileName(file->GetTitle(), name.Data()));
53 if (file->IsA() == TSystemDirectory::Class()) full =
title;
57 if (name ==
"." || name ==
"..") {
63 if (
gSystem->GetPathInfo(full.Data(), fs)) {
64 Warning(
"ScanDirectory",
"Cannot stat %s (%s)", full.Data(),
69 if (file->IsDirectory(full)) {
71 TSystemDirectory* d =
new TSystemDirectory(file->GetName(),
81 if (!name.EndsWith(
".root")) {
87 if (!name.Contains(fnPattern)) {
95 toAdd.Add(
new TObjString(full));
98 TIter nextAdd(&toAdd);
100 while ((s = static_cast<TObjString*>(nextAdd()))) {
104 if (toAdd.GetEntries() > 0) ret =
true;
106 gSystem->ChangeDirectory(oldDir);
126 TSystemDirectory d(
gSystem->BaseName(dir.Data()), dir.Data());
131 gSystem->ChangeDirectory(savdir);
132 if (ret) ret->Sort();
179 gROOT->SetMacroPath(Form(
".:$(ALICE_PHYSICS)/PWGLF/FORWARD/analysis2/qa:" 180 "$(ALICE_PHYSICS)/PWGLF/FORWARD/analysis2/corrs:%s",
181 gROOT->GetMacroPath()));
182 gSystem->AddIncludePath(
"-I${ALICE_PHYSICS}/PWGLF/FORWARD/analysis2/qa");
186 if (runNo > 0) what = 0x1;
188 gROOT->LoadMacro(
"QATrender.C+g");
189 gROOT->LoadMacro(
"QAPlotter.C+g");
196 TObjString* s =
new TObjString(
"");
197 s->String() =
gSystem->ConcatFileName(input, Form(
"trending_%09d.root",
203 Error(
"RunQA",
"No trending files found");
209 while ((s = static_cast<TObjString*>(next()))) {
210 Info(
"Run",
"Adding file %s", s->GetName());
Bool_t ScanDirectory(TSystemDirectory *dir, TList *list, bool recursive=false)
void RunQAOld(const char *input=".", Bool_t keep=true, Int_t runNo=-1, UShort_t what=0x3)
TList * GetListOfFiles(const char *input=".")
TFile * file
TList with histograms for a given trigger.
void AddFile(const char *filename)