37 int main(
int argc, 
char **argv)
 
   41   using namespace KM3NETDAQ;
 
   53     JParser<> zap(
"Example program to equalize QE of PMTs based on summary data.");
 
   57     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
   58     zap[
'P'] = 
make_field(pmtFile,           
"specify PMT file name that can be given to JTriggerEfficiency.") = 
"";
 
   59     zap[
'R'] = 
make_field(rate_kHz,          
"specify expected singles rate [Hz]")                             = 0.0;
 
   60     zap[
'r'] = 
make_field(rings,             
"rings, e.g. \"AB\"")                                             = 
"ABCDEF";
 
   65   catch(
const exception& error) {
 
   66     FATAL(error.what() << endl);
 
   70   const double factor = 1.0e-3;   
 
   94   while (inputFile.hasNext()) {
 
   96     STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  104     for (JDAQSummaryslice::const_iterator frame = summary->begin(); frame != summary->end(); ++frame) {
 
  108       TH1D*     h0 = H0[frame->getModuleID()];
 
  109       TProfile* 
h1 = H1[frame->getModuleID()];
 
  119           double R = frame->getRate  (pmt, factor);
 
  120           double W = frame->getWeight(pmt, factor);
 
  132             h1->Fill(pmt, R / P);
 
  133             H1->Fill(pmt, R / P);
 
  142   if (pmtFile != 
"" && rate_kHz > 0.0) {
 
  144     NOTICE(
"Write QEs in PMT file " << pmtFile << endl);
 
  152         parameters[id].QE *= i->second->GetBinContent(pmt + 1)  /  rate_kHz;
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
int getDetectorID() const 
Get detector identifier. 
 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
 
then for HISTOGRAM in h0 h1
 
Lookup table for PMT addresses in detector. 
 
Dynamic ROOT object management. 
 
const JModuleAddressMap & get(const int id) const 
Get module address map. 
 
ROOT TTree parameter settings. 
 
Auxiliary class for defining the range of iterations of objects. 
 
Lookup table for PMT addresses in optical module. 
 
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void setAxisLabels(TAxis *axis, const JModuleAddressMap &memo)
Set axis with PMT address labels. 
 
void Write(TDirectory &out, const bool wm=false)
Write objects to file. 
 
Auxiliary class for map of PMT parameters. 
 
char ring
ring number ['A','F'] 
 
std::string to_upper(const std::string &value)
Convert all character to upper case. 
 
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map. 
 
then usage $script[distance] fi case set_variable R
 
General purpose messaging. 
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
Utility class to parse command line options. 
 
double getSurvivalProbability(const JPMTParameters ¶meters)
Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assu...
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
const JPMTPhysicalAddress & getPMTPhysicalAddress(const int tdc) const 
Get PMT physical address. 
 
const JLimit & getLimit() const 
Get limit. 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module.