32 int main(
int argc,
char **argv)
48 JParser<> zap(
"Auxiliary application to plot PMT parameters.");
50 zap[
'a'] =
make_field(detectorFile,
"detector file." );
52 zap[
'P'] =
make_field(inputFile,
"PMT calibration data file" );
53 zap[
'r'] =
make_field(regexp,
"regular expresion to extract bin labels for the x-axis" ) =
" ";
55 zap[
'A'] =
make_field(showPMTAddress,
"show PMT address on Y axis" );
56 zap[
'L'] =
make_field(labelInterval,
"Interval between x-axis bins for which labels are shown") = 1;
60 catch(
const exception &error) {
61 FATAL(error.what() << endl);
74 FATAL(
"Empty detector." << endl);
85 const int NUMBER_OF_FILES = parameters.size();
88 NUMBER_OF_FILES, -0.5, NUMBER_OF_FILES - 0.5,
93 int n = (NUMBER_OF_FILES < labelInterval)? 1 : labelInterval;
94 TPRegexp pregexp (regexp);
96 for (
int i=0 ; i != NUMBER_OF_FILES ; ++i){
98 manager->GetXaxis()->SetBinLabel(i+1 ,
parse(pregexp , TString(inputFile[i].c_str())));
100 manager->GetXaxis()->SetBinLabel(i+1 ,
" ");
104 for (JDetector::iterator module =
detector.begin(); module !=
detector.end(); ++module) {
106 DEBUG(
"Module " << setw(10) << module->getID() << endl);
110 for (
int i = 0; i != NUMBER_OF_FILES; ++i) {
114 for (JProperties::const_iterator p = properties.begin(); p != properties.end(); ++p) {
117 manager[
MAKE_CSTRING(module->getID() <<
"." << p->first)]->Fill((Double_t) i, (Double_t) pmt, p->second.getValue<
const double>());
119 catch(
const exception& error) {}
122 manager[
MAKE_CSTRING(module->getID() <<
"." << p->first)]->Fill((Double_t) i, (Double_t) pmt, p->second.getValue<
const bool>() ? 1.0 : 0.0);
124 catch(
const exception& error) {}
136 TPRegexp
r (
"(\\d{8}).");
139 TString
id =
parse(
r , TString(it->second->GetName()));