Example program to test generation of KM3NETDAQ::JDAQTimeslice with random data.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TRandom3.h"
#include "km3net-dataformat/online/JDAQ.hh"
#include "km3net-dataformat/online/JDAQClock.hh"
#include "km3net-dataformat/online/JDAQTimeslice.hh"
#include "JTimeslice/JRandomTimeslice.hh"
#include "JROOT/JManager.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
Example program to test generation of KM3NETDAQ::JDAQTimeslice with random data.
- Author
- mdejong
Definition in file examples/JTimeslice/JRandomTimesliceWriter.cc.
◆ main()
Definition at line 29 of file examples/JTimeslice/JRandomTimesliceWriter.cc.
30{
34
41
42 try {
43
44 JParser<> zap(
"Example program to test generation of time slices with random data.");
45
52
54 }
55 catch(const exception &error) {
57 }
58
59
61
63
65
66 for (
Long64_t counter = 0; counter != numberOfSlices; ++counter) {
67
69
71
72 timeslice.resize(1);
73
74
76
78
80
83 }
84
86
89 }
90 }
91
92 timeslice[0].
add(buffer.size(), buffer.data());
93
95
98 }
99
100 for (
size_t i = 1; i <=
recycling.first; ++i) {
101
103
105
108 }
109 }
110 }
112
113
115
117
118 out.Write();
119 out.Close();
120}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
JDAQTimeslice & add(const JDAQTimeslice ×lice)
Add another timeslice.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
Timeslice with random data.
void recycle(const double T_ns)
Recycle time slice by randomly shuffling time intervals of data.