Auxiliary program to convert data to Dusj format. 
   45{
   49 
   52  JLimit_t&              numberOfEvents = inputFile.getLimit();
 
   53  string                 detectorFile;
   55 
   56  try {
   57 
   58    JParser<> zap(
"Auxiliary program to convert data to Dusj format.");
 
   59 
   65 
   66    zap(argc, argv);
   67  }
   68  catch(const exception& error) {
   69    FATAL(error.what() << endl);
 
   70  }
   71 
   72 
   74 
   75  try {
   77  }
   80  }
   81 
   83 
   84 
   86 
   88 
   89  int mc_run_id = 0;
   90    
   92 
   93  try {
   94 
   96 
   98 
  100    mc_run_id = buffer.start_run.run_id;
  101 
  102  } catch(const exception& error) {
  103 
  104    JHead buffer(header);
 
  105    
  108 
  109    copy(buffer, header);    
 
  110  }
  111  {
  112    JHead buffer(header);
 
  113 
  116    
  117    copy(buffer, header);
 
  118  }
  119  
  122 
  124 
  126 
  128      
  130 
  131    if (mc.getEntries() != 0) {
  132 
  134 
  135      if (event != NULL) {
  136 
  137        out = *event;
  138 
  141        }
  142 
  144          i->pos += offset;
  145        }
  146      }
  147 
  148    } else {
  149 
  152    }
  153    
  155 
  157 
  159 
  160      const JModule& module = router.getModule(i->getModuleID());
 
  161      const JPMT&    pmt    = 
module.getPMT   (i->getPMT());
 
  162        
  164        
  165      hit.
id         = out.
hits.size() + 1;
 
  166      hit.
dom_id     = i->getModuleID();
 
  167      
  168      
  169      
  173      
  174      
  175 
  176      out.
hits.push_back(hit);
 
  177    }
  178 
  179    
  180 
  181    double t0 = numeric_limits<double>::max();
  182 
  183    for (vector<Hit>::const_iterator i = out.
hits.begin(); i != out.
hits.end(); ++i) {
 
  184      if (t0 > i->t) {
  185        t0 = i->t;
  186      }
  187    }
  188 
  190      i->t -= t0;
  191    }
  192 
  193    if (out.
mc_t > 0.0 && t0 != numeric_limits<double>::max()) {
 
  195    }
  196 
  198 
  200  }
  201 
  203  
  204
  205 
  206
  207
  209}
#define DEBUG(A)
Message macros.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
JAANET::start_run start_run
 
Router for direct addressing of module data in detector data structure.
 
Data structure for a composite optical module.
 
Data structure for PMT geometry, calibration and status.
 
int getID() const
Get identifier.
 
Utility class to parse command line options.
 
Object reading from a list of files.
 
virtual bool hasNext() override
Check availability of next element.
 
counter_type getCounter() const
Get counter.
 
virtual const pointer_type & next() override
Get next element.
 
Template definition for direct access of elements in ROOT TChain.
 
int getRunNumber() const
Get run number.
 
const_iterator< T > end() const
Get end of data.
 
const_iterator< T > begin() const
Get begin of data.
 
JTriggerCounter_t getCounter() const
Get trigger counter.
 
void copy(const Head &from, JHead &to)
Copy header from from to to.
 
Vec getOffset(const JHead &header)
Get offset.
 
std::istream & read(std::istream &in, JTestSummary &summary)
Read test summary.
 
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).
 
double getLivetime(const std::string &file_name)
Get data taking live time.
 
int getRunNumber(const std::string &file_name)
Get run number for given file name of data taking run.
 
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
 
KM3NeT DAQ data structures and auxiliaries.
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
 
int mc_id
identifier of the MC event (as found in ascii or antcc file).
 
double mc_t
MC: time where the mc-event was put in the timeslice, since start of run (offset+frameidx*timeslice_d...
 
std::vector< Hit > hits
list of hits
 
int mc_run_id
MC run identifier.
 
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
 
int id
offline event identifier
 
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
 
int pmt_id
global PMT identifier as found in evt files
 
int dom_id
module identifier from the data (unique in the detector).
 
double a
hit amplitude (in p.e.)
 
double t
hit time (from tdc+calibration or MC truth)
 
Auxiliary class for defining the range of iterations of objects.
 
static counter_type max()
Get maximum counter value.
 
The Vec class is a straightforward 3-d vector, which also works in pyroot.