Auxiliary application to plot PMT parameters.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JDAQ/JDAQ.hh"
#include "JDetector/JDetector.hh"
#include "JDetector/JDetectorToolkit.hh"
#include "JDetector/JPMTParametersMap.hh"
#include "JGizmo/JManager.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Auxiliary application to plot PMT parameters. 
- Author
 - mdejong 
 
Definition in file JPlotPMTParameters.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 26 of file JPlotPMTParameters.cc.
   30   using namespace KM3NETDAQ;
 
   33   JPMTParametersMap    parameters;
 
   39     JParser<> zap(
"Auxiliary application to plot PMT parameters.");
 
   41     zap[
'a'] = 
make_field(detectorFile,      
"detector file.");
 
   43     zap[
'P'] = 
make_field(parameters,        
"PMT calibration data (or corresponding file name)");
 
   48   catch(
const exception &error) {
 
   49     FATAL(error.what() << endl);
 
   55     load(detectorFile, detector);
 
   57   catch(
const JException& error) {
 
   61   if (detector.empty()) {
 
   62     FATAL(
"Empty detector." << endl);
 
   68   for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
 
   70     DEBUG(
"Module " << setw(10) << module->getID() << endl);
 
   74       const JProperties properties = parameters.getPMTParameters(JPMTIdentifier(module->getID(), pmt)).getProperties();
 
   76       for (JProperties::const_iterator p = properties.begin(); p != properties.end(); ++p) {
 
   79           manager[
MAKE_CSTRING(module->getID() << 
"." << p->first)]->Fill((Double_t) pmt, p->second.
getValue<const 
double>());
 
   81         catch(const exception& error) {}
 
   84           manager[
MAKE_CSTRING(module->getID() << 
"." << p->first)]->Fill((Double_t) pmt, p->second.
getValue<const 
bool>() ? 1.0 : 0.0);
 
   86         catch(const exception& error) {}
 
Utility class to parse command line options. 
 
double getValue(const JScale_t scale)
Get numerical value corresponding to scale. 
 
Utility class to parse parameter values. 
 
#define MAKE_CSTRING(A)
Make C-string. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void load(const JString &file_name, JDetector &detector)
Load detector from input file. 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module. 
 
#define DEBUG(A)
Message macros.