37 TIter iter(dir->GetListOfKeys());
39 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
43 dir->cd(key->GetName());
44 TDirectory *subdir = gDirectory;
49 const TString fullPath(dir->GetPath());
50 TObjArray* t = fullPath.Tokenize(
":");
51 v.push_back(TString(((TObjString *)(t->At(1)))->String() +
"/" + (TString)key->GetName()));
63int main(
int argc,
char **argv)
79 JParser<> zap(
"Auxiliary application to plot PMT parameters.");
85 zap[
'r'] =
make_field(
regexp,
"regular expresion to extract bin labels for the x-axis") =
" ";
91 catch(
const exception &error) {
109 manager->GetXaxis()->SetBinLabel(i+1 , parse(buffer , TString(inputFile[i].c_str())));
110 summaryManager->GetXaxis()->SetBinLabel(i+1 , parse(buffer , TString(inputFile[i].c_str())));
112 manager->GetXaxis()->SetBinLabel(i+1 ,
" ");
124 if (TFile::Open((*file).c_str()) ==
NULL) {
125 ERROR(
"File: " << *file <<
" not opened." <<
endl);
129 TFile* f = TFile::Open((*file).c_str());
167 while (getline(
infile, line)) {
168 while (line.length()==0)
170 tests.push_back(line);
173 map[d[id]->getTestName()]++;
182 i->second->Scale(1./n);
183 summary <<
"File_ID\t" << i->first <<
"\t" << i->first +
"(ERROR)\t" <<
endl;
184 cout <<
"File_ID\t" << i->first <<
"\t" << i->first +
"(ERROR)\t" <<
endl;
186 for (
int bin=1 ;
bin<i->second->GetNbinsX() ; ++
bin){
188 summary << i->second->GetXaxis()->GetBinLabel(
bin) <<
"\t" << i->second->GetBinContent(
bin) <<
"\t" << i->second->GetBinError(
bin) <<
endl;
189 cout << i->second->GetXaxis()->GetBinLabel(
bin) <<
"\t" << i->second->GetBinContent(
bin) <<
"\t" << i->second->GetBinError(
bin) <<
endl;
200 if (out->GetDirectory(path.c_str()) == 0) out->mkdir(path.c_str());
201 out->cd(path.c_str());
205 for (
int bin=0 ;
bin<i->second->GetNbinsX()+1 ; ++
bin){i->second->SetBinError(
bin,0.0);}
206 i -> second -> Write();