29{
   32 
   35 
   36  string    detectorFile;
   37  string    inputFile;
   39  map_type  parameters;
   41 
   42  try { 
   43 
   45 
   51 
   52    zap(argc, argv);
   53  }
   54  catch(const exception &error) {
   55    FATAL(error.what() << endl);
 
   56  }
   57 
   59 
   61 
   62  try {
   64  }
   67  }
   68 
   70    FATAL(
"Empty detector." << endl);
 
   71  }
   72 
   73  const int number_of_strings = getNumberOfStrings(
detector);
 
   75 
   76  const int ny = number_of_strings * number_of_floors;
   77 
   78 
   79  TFile* in = TFile::Open(inputFile.c_str(), "read");
   80 
   81  if (in == NULL) {
   82    FATAL(
"No data in inputfile " << inputFile << endl);
 
   83  }
   84 
   86 
   87  for (map_type::const_iterator i = parameters.begin(); i != parameters.end(); ++i) {
   88 
   89    const string   key   = i->first;
 
   90    const JRange_t range = i->second;
   91 
   93            NULL,
   94            100, range.first, range.second);
   95 
   97            NULL,
   98            NUMBER_OF_PMTS,  -0.5, NUMBER_OF_PMTS  - 0.5,
   99            ny,              -0.5, ny              - 0.5);
  100  
  101    
  102 
  103    for (
size_t dom = 0; dom != 
detector.size(); ++dom) {
 
  104  
  106 
  108  
  110        continue;
  111      }
  112  
  113      const int iy = (module.getString() - 1) * number_of_floors  +  module.getFloor();
  114 
  115      for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
  116  
  117        const double value = 
p1->GetBinContent(pmt+1);
 
  118  
  119        h1.Fill(value);
  120 
  121        h2.SetBinContent(pmt+1, iy, value);
  122      }
  123    } 
  124 
  125    
  126 
  127    h1.GetXaxis()->SetTitle(
key.c_str());
 
  128    h1.GetYaxis()->SetTitle("PMTs");
  129 
  130    h2.GetXaxis()->SetTitle("PMT DAQ index");
  131 
  132    for (
size_t dom = 0; dom != 
detector.size(); ++dom) {
 
  133 
  135 
  137                                                     << setw(3) << setfill(
'0') << module.
getString() << 
' '  
  138                                                     << setw(2) << setfill(
'0') << module.
getFloor()));
 
  139    }
  140 
  141    h2.GetZaxis()->SetTitle(
key.c_str());
 
  142    
  143    
  144    h2.Write();
  145    h1.Write();
  146  }
  147 
  148  out.Close();
  149}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
#define MAKE_CSTRING(A)
Make C-string.
 
int getFloor() const
Get floor number.
 
int getString() const
Get string number.
 
Data structure for a composite optical module.
 
int getID() const
Get identifier.
 
Utility class to parse command line options.
 
int getNumberOfFloors(const JDetector &detector)
Get number of floors.
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
KM3NeT DAQ data structures and auxiliaries.