43 template<
class JBuild_t>
44 inline void process(
const JBuild_t& build,
51 typedef typename JBuild_t::value_type value_type;
55 build(event, router, back_inserter(data));
57 h1.Fill((
double) data.size());
68 int main(
int argc,
char **argv)
72 using namespace KM3NETDAQ;
74 JMultipleFileScanner<JDAQEvent> inputFile;
83 JParser<> zap(
"Example program to test hit building with DAQ events.");
87 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
94 catch(
const exception &error) {
95 FATAL(error.what() << endl);
104 load(detectorFile, detector);
106 catch(
const JException& error) {
110 const JModuleRouter router(detector);
115 const Int_t N = 5000;
117 TH1D h0(
"L0", NULL, N, -0.5, (Double_t) N - 0.5);
118 TH1D h1(
"L1", NULL, N, -0.5, (Double_t) N - 0.5);
119 TH1D h2(
"L2", NULL, N, -0.5, (Double_t) N - 0.5);
124 JBuildL0<double> buildL0;
125 JBuildL1<double> buildL1(parameters);
126 JBuildL2<double> buildL2(parameters.L2);
129 JBuildL0<JHitL0> buildL0;
130 JBuildL1<JHitL1> buildL1(parameters);
131 JBuildL2<JHitL2> buildL2(parameters.L2);
134 JBuildL0<JHitR0> buildL0;
135 JBuildL1<JHitR1> buildL1(parameters);
136 JBuildL2<JHitR2> buildL2(parameters.L2);
141 JBuildL0<double> buildL0;
142 JBuildL1<double> buildL1(parameters);
143 JBuildL2<double> buildL2(parameters.L2);
146 while (inputFile.hasNext()) {
148 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
152 process(buildL0, router, *tev, h0);
153 process(buildL1, router, *tev, h1);
154 process(buildL2, router, *tev, h2);
Utility class to parse command line options.
Data structure for all trigger parameters.
Router for direct addressing of module data in detector data structure.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
Empty structure for specification of parser element that is initialised (i.e.
Basic data structure for R2 hit.
Data structure for detector geometry and calibration.
Basic data structure for L0 hit.
JLimit JLimit_t
Type definition of limit.
Basic data structure for time and time over threshold information of hit.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Basic data structure for L2 hit.
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Direct access to module in detector data structure.
Reduced data structure for L1 hit.
Utility class to parse command line options.
ROOT TTree parameter settings.
const JLimit & getLimit() const
Get limit.
Basic data structure for L1 hit.
JTriggerCounter_t next()
Increment trigger counter.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])