61{
   65 
   67  JLimit_t&                       numberOfEvents = inputFile.getLimit();
 
   71 
   72  try { 
   73 
   74    JParser<> zap(
"Example program to remove PMT(s) from data (and set corresponding rate to 0).");
 
   75    
   81    
   82    zap(argc, argv);
   83  }
   84  catch(const exception& error) {
   85    FATAL(error.what() << endl);
 
   86  }
   87 
   88 
   90  
   91  {
   93 
   94    
   95 
   97 
   99 
  100    for (
counter_type counter = 0; in.hasNext() && counter != inputFile.getLimit(); ++counter) {
 
  101 
  102      STATUS(
"event: " << setw(10) << counter << 
'\r'); 
DEBUG(endl);
 
  103 
  105    
  106      for (JDAQTimeslice::iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
  107 
  108        bool rm = false;
  109 
  111          
  114            rm = true;
  115          }
  116        }
  117 
  118        if (rm) {
  119 
  121 
  123            buffer[hit->getPMT()].push_back(*hit);
  124          }
  125        
  127 
  129          
  132              copy(buffer[pmt].begin(), buffer[pmt].end(), back_inserter(data));
 
  133            }
  134          }
  135          
  137        
  138          frame->clear();
  139          frame->add(
data.size(), 
data.data());
 
  140        }
  141      }
  142      
  143      out.put(*timeslice);
  144    }
  146  }
  147  {
  149 
  150    while (in.hasNext()) {
  151 
  152      STATUS(
"event: " << setw(10) << in.getCounter() << 
'\r'); 
DEBUG(endl);
 
  153 
  155 
  158 
  160    }
  162  }
  163  {
  165 
  166    while (in.hasNext()) {
  167 
  168      STATUS(
"event: " << setw(10) << in.getCounter() << 
'\r'); 
DEBUG(endl);
 
  169 
  171 
  172      for (JDAQSummaryslice::iterator frame = summaryslice->begin(); frame != summaryslice->end(); ++frame) {
  173 
  175 
  178            (*frame)[pmt].setValue(0.0);
  179          }
  180        }
  181      }
  182 
  184    }
  186  }
  187 
  189 
  191 
  193}
JDAQPMTIdentifier PMT
Command line options.
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class for multiplexing object iterators.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
JTriggerCounter_t next()
Increment trigger counter.
void copy(const Head &from, JHead &to)
Copy header from from to to.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Long64_t counter_type
Type definition for counter.
KM3NeT DAQ data structures and auxiliaries.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary class for demultiplexing object outputs.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.