27 int main(
int argc, 
char **argv)
 
   31   using namespace KM3NETDAQ;
 
   40     JParser<> zap(
"Auxiliary application to plot PMT parameters.");
 
   42     zap[
'a'] = 
make_field(detectorFile,      
"detector file.");
 
   44     zap[
'P'] = 
make_field(inputFile,         
"PMT calibration data file");
 
   49   catch(
const exception &error) {
 
   50     FATAL(error.what() << endl);
 
   56     load(detectorFile, detector);
 
   58   catch(
const JException& error) {
 
   62   if (detector.empty()) {
 
   63     FATAL(
"Empty detector." << endl);
 
   69     parameters.push_back(JPMTParametersMap(i->c_str()));
 
   73   const int NUMBER_OF_FILES = parameters.size();
 
   76                                           NUMBER_OF_FILES, -0.5, NUMBER_OF_FILES - 0.5,
 
   79   for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
 
   81     DEBUG(
"Module " << setw(10) << module->getID() << endl);
 
   85       for (
int i = 0; i != NUMBER_OF_FILES; ++i) {
 
   87         const JProperties properties = parameters[i].getPMTParameters(JPMTIdentifier(module->getID(), pmt)).getProperties();
 
   89         for (JProperties::const_iterator p = properties.begin(); p != properties.end(); ++p) {
 
   92             manager[
MAKE_CSTRING(module->getID() << 
"." << p->first)]->Fill((Double_t) i, (Double_t) pmt, p->second.getValue<
const double>());
 
   94           catch(
const exception& error) {}
 
   97             manager[
MAKE_CSTRING(module->getID() << 
"." << p->first)]->Fill((Double_t) i, (Double_t) pmt, p->second.getValue<
const bool>() ? 1.0 : 0.0);
 
   99           catch(
const exception& error) {}
 
Utility class to parse command line options. 
 
Utility class to parse parameter values. 
 
#define MAKE_CSTRING(A)
Make C-string. 
 
Dynamic ROOT object management. 
 
Data structure for detector geometry and calibration. 
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void load(const JString &file_name, JDetector &detector)
Load detector from input file. 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
void Write(TFile &out)
Write histograms to file. 
 
KM3NeT DAQ constants, bit handling, etc. 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module. 
 
#define DEBUG(A)
Message macros. 
 
int main(int argc, char *argv[])