64{
68
76
77 try {
78
79 JParser<> zap(
"Auxiliary application to plot PMT parameters.");
80
85 zap[
'r'] =
make_field(
regexp,
"regular expresion to extract bin labels for the x-axis") =
" ";
88
90 }
91 catch(const exception &error) {
93 }
94
96
99
101
103
105
107
108 if(i%n == 0){
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())));
111 }else{
112 manager->GetXaxis()->SetBinLabel(i+1 ,
" ");
114 }
115 }
116 }
117
118 int c = 0;
119
121
123
124 if (TFile::Open((*file).c_str()) ==
NULL) {
125 ERROR(
"File: " << *file <<
" not opened." <<
endl);
126 c++;
127 continue;
128 }else{
129 TFile* f = TFile::Open((*file).c_str());
130
133
135
137
139
141
144
149 }
150 }
151 }
152 c++;
153 }
154
156 out->cd();
157
160
163
164 string line;
165 string name;
166 int id;
168 while (line.length()==0)
170 tests.push_back(line);
173 map[d[id]->getTestName()]++;
174 }
175
176 ofstream summary;
178
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;
185
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;
190 }
191
192 i->second->Write();
193 }
194
196
199
200 if (out->GetDirectory(path.c_str()) == 0) out->mkdir(path.c_str());
201 out->cd(path.c_str());
202
204
205 for (
int bin=0 ;
bin<i->second->GetNbinsX()+1 ; ++
bin){i->second->SetBinError(
bin,0.0);}
206 i -> second -> Write();
207 }
208
209 out->Close();
210}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
#define MAKE_STRING(A)
Make string.
Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived c...
std::string parameterName
Dictionary to map different tests to unique integer indices.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
boost::property_tree::ptree parse(std::string str)