29 int main(
int argc, 
char **argv)
 
   33   using namespace KM3NETDAQ;
 
   36   Long64_t               numberOfSlices;
 
   44     JParser<> zap(
"Auxiliary program to generate time slices with random data.");
 
   48     zap[
'B'] = 
make_field(rate_Hz,             
"background rate [Hz]");
 
   49     zap[
'N'] = 
make_field(recycling,           
"number of recycles / time interval for sampling data") = make_pair(0, 0.0);
 
   55   catch(
const exception &error) {
 
   56     FATAL(error.what() << endl);
 
   60   gRandom->SetSeed(seed);
 
   66   for (Long64_t counter = 0; counter != numberOfSlices; ++counter) {
 
   68     STATUS(
"slice: " << setw(10) << counter << 
'\r'); 
DEBUG(endl);
 
   81       for (
double t1 = 0.0 * 
getFrameTime() + gRandom->Exp(period_ns); t1 < 0.5 * 
getFrameTime(); t1 += gRandom->Exp(period_ns)) {
 
   82         buffer.push_back(
JDAQHit(PMT_L0[0], t1, 0));
 
   87       for (
double t1 = 0.5 * 
getFrameTime() + gRandom->Exp(period_ns); t1 < 1.0 * 
getFrameTime(); t1 += gRandom->Exp(period_ns)) {
 
   88         buffer.push_back(
JDAQHit(PMT_L0[1], t1, 0));
 
   92     timeslice[0].
add(buffer.size(), buffer.data());
 
   97       h0->Fill((Double_t) hit->getT());
 
  100     for (
size_t i = 1; i <= recycling.first; ++i) {
 
  102       timeslice.
recycle(recycling.second);
 
  107         h0->Fill((Double_t) hit->getT());
 
Utility class to parse command line options. 
 
Dynamic ROOT object management. 
 
Auxiliary class to manage set of compatible ROOT objects (e.g. 
 
JDAQTimeslice & add(const JDAQTimeslice ×lice)
Add another timeslice. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void Write(TDirectory &out, const bool wm=false)
Write objects to file. 
 
double getFrameTime()
Get frame time duration. 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
KM3NeT DAQ constants, bit handling, etc. 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module. 
 
Timeslice with random data. 
 
unsigned char JPMT_t
PMT channel in FPGA. 
 
#define DEBUG(A)
Message macros. 
 
void recycle(const double T_ns)
Recycle time slice by randomly shuffling time intervals of data. 
 
int main(int argc, char *argv[])