Auxiliary program to print PMT thresholds.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include "JLang/JComparator.hh"
#include "JDetector/JDetectorCalibration.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Auxiliary program to print PMT thresholds. 
- Author
 - mdejong 
 
Definition in file examples/JCalibrate/JPrintPMTThreshold.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 20 of file examples/JCalibrate/JPrintPMTThreshold.cc.
   31     JParser<> zap(
"Auxiliary program to print PMT thresholds.");
 
   33     zap[
'f'] = 
make_field(inputFile,     
"PMT threshold file (json format)");
 
   39   catch(
const exception &error) {
 
   40     FATAL(error.what() << endl);
 
   46   istream* 
in = open<istream>(inputFile.c_str());
 
   58     for (JPMTThresholdCalibration::const_iterator i = calibration.begin(); i != calibration.end(); ++i) {
 
   59       if (i->threshold >= threshold) {
 
   60         cout << 
"PMT " << left << setw(32) << static_cast<const JUPI_t&>(*i) << 
" -> " << right << setw(3)  << i->threshold << endl;
 
   64   catch(
const exception& error) {
 
   65     FATAL(error.what() << endl);
 
Utility class to parse command line options. 
 
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member. 
 
static const std::string Tests_t
 
std::vector< JPMTThresholdCalibration_t > JPMTThresholdCalibration
PMT threshold calibration. 
 
JUPIHelper & getUPI()
Auxiliary function for helper object initialisation. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void close(std::istream *pf)
Close file. 
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in