42 int main(
int argc, 
char **argv)
 
   50   Long64_t               numberOfEvents;
 
   59     JParser<> zap(
"Example program to test hit coincidence building with random data.");
 
   71   catch(
const exception &error) {
 
   72     FATAL(error.what() << endl);
 
   75   gRandom->SetSeed(seed);
 
   77   using namespace KM3NETDAQ;
 
   84   detector.push_back(getModule<JKM3NeT_t>(1001));
 
   90   simbad.
reset(k40Simulator.clone());
 
   95   TProfile hn(
"hn", NULL, 31,  0.5,  +31.5);
 
   96   TProfile hc(
"hc", NULL, 21, -1.05, +1.05);
 
   97   TProfile ht(
"ht", NULL, 20,  0.5,  +20.5);
 
  109   JSuperFrame2D_t  buffer;
 
  112   for (
int event_count = 0; event_count < numberOfEvents; ++event_count) {
 
  114     STATUS(
"event: " << setw(10) << event_count << 
'\r'); 
DEBUG(endl);
 
  116     const int frame_index = 1;
 
  122     for (JDAQTimeslice::const_iterator super_frame = timeslice.begin(); super_frame != timeslice.end(); ++super_frame) {
 
  124       if (moduleRouter.
hasModule(super_frame->getModuleID())) {
 
  130         buffer(*super_frame, module);
 
  134         buildL1(buffer, back_inserter(dataL1));
 
  137         if (!dataL1.empty()) {
 
  141           JFrameL1_t d1(dataL1);
 
  144           for (
int i = 1; i <= hn.GetNbinsX(); ++i) {
 
  150             buildL2(buffer, d1, back_inserter(d2));
 
  152             hn.Fill((
double) buildL2.
numberOfHits, (
double) d2.size() / (double) dataL1.size());
 
  159         if (!dataL1.empty()) {
 
  163           JFrameL1_t d1(dataL1);
 
  166           for (
int i = 1; i <= hc.GetNbinsX(); ++i) {
 
  168             buildL2.
ctMin = hc.GetBinCenter(i);
 
  172             buildL2(buffer, d1, back_inserter(d2));
 
  174             hc.Fill(buildL2.
ctMin, (
double) d2.size() / (double) dataL1.size());
 
  181         if (!dataL1.empty()) {
 
  185           JFrameL1_t d1(dataL1);
 
  188           for (
int i = ht.GetNbinsX(); i != 0; --i) {
 
  194             buildL2(buffer, d1, back_inserter(d2));
 
  196             ht.Fill(buildL2.
TMaxLocal_ns, (
double) d2.size() / (double) dataL1.size());
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
Data structure for a composite optical module. 
 
double ctMin
minimal cosine space angle between PMT axes 
 
Router for direct addressing of module data in detector data structure. 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Auxiliary class to handle optional I/O. 
 
Basic data structure for time and time over threshold information of hit. 
 
Data structure for UTC time. 
 
Data structure for detector geometry and calibration. 
 
int numberOfHits
minimal number of hits 
 
double getTimeOfFrame(const int frame_index)
Get start time of frame in ns since start of run for a given frame index. 
 
Basic data structure for L0 hit. 
 
T & getInstance(const T &object)
Get static instance from temporary object. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
Auxiliary class for map of PMT parameters. 
 
General purpose messaging. 
 
void reset(JK40Simulator *k40Simulator)
Reset K40 simulator. 
 
Direct access to module in detector data structure. 
 
Data structure for L2 parameters. 
 
Utility class to parse command line options. 
 
const JModuleAddress & getAddress(const JObjectID &id) const 
Get address of module. 
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
double TMaxLocal_ns
maximal time difference [ns] 
 
bool hasModule(const JObjectID &id) const 
Has module. 
 
Auxiliary data structure for L1 build parameters. 
 
2-dimensional frame with time calibrated data from one optical module. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
Timeslice with random data. 
 
Basic data structure for L1 hit.