27   static const char* 
const WILDCARD = 
"%";
 
   37 int main(
int argc, 
char **argv)
 
   41   using namespace KM3NETDAQ;
 
   54     JParser<> zap(
"Auxiliary program to integrate time-over-threshold distributions.");
 
   56     zap[
'f'] = 
make_field(inputFile,         
"input file (output from JCalibrateToT).");
 
   58     zap[
'a'] = 
make_field(detectorFile,      
"detector file.");
 
   59     zap[
'x'] = 
make_field(fitRange,          
"ROOT integration range for noise.")                          = JRange_t(0.0, 8.0);    
 
   61     zap[
'r'] = 
make_field(runNb,             
"current run number");
 
   66   catch(
const exception &error) {
 
   67     FATAL(error.what() << endl);
 
   84   TFile* 
in = TFile::Open(inputFile.c_str(), 
"exist");
 
   85   if (
in == NULL || !
in->IsOpen()) {
 
   86     FATAL(
"File: " << inputFile << 
" not opened." << endl);
 
   88   ofstream ostr(
outputFile.c_str(), ios::out|ios::app);
 
   90   for (JDetector::iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
   91     DEBUG(
"Module " << module->getID() << endl);
 
   94       WARNING(
"No histogram " << module->getID() << 
"; skip calculation." << endl);
 
   98     for (
int ix = 1; ix <= h2s->GetXaxis()->GetNbins(); ++ix) {
 
  101       const int domId = module->getID();
 
  104       for (
int iy = h2s->GetNbinsY(); iy >= 1; --iy) {
 
  105         const double y = h2s->GetBinContent(ix, iy);
 
  107         if ((iy >= fitRange.getLowerLimit()) && (iy <= fitRange.getUpperLimit())) noise += y;
 
  109       const double ratio = (signal != 0? noise/signal : 0);
 
  112       const JParameters curPar(runNb, domId, ix - 1, -1, noise, signal, ratio > 0.5);
 
  113       ostr << curPar << endl;
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
TString replace(const TString &target, const TRegexp ®exp, const T &replacement)
Replace regular expression in input by given replacement. 
 
const JModule & getModule(const JObjectID &id) const 
Get module parameters. 
 
Data structure for a composite optical module. 
 
Router for direct addressing of module data in detector data structure. 
 
#define MAKE_CSTRING(A)
Make C-string. 
 
Dynamic ROOT object management. 
 
Data structure for detector geometry and calibration. 
 
#define MAKE_STRING(A)
Make string. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
Utility class to parse command line options. 
 
static const char *const _2SToT
Histogram naming. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
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 source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
#define DEBUG(A)
Message macros.