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;
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);
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);
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.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Template specialisation of L0 builder for JHitL0 data type.
Router for direct addressing of module data in detector data structure.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
then for HISTOGRAM in h0 h1
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Basic data structure for R2 hit.
Template specialisation of L1 builder for JHitL1 data type.
Basic data structure for time and time over threshold information of hit.
Data structure for detector geometry and calibration.
Basic data structure for L0 hit.
Auxiliary class for defining the range of iterations of objects.
Template specialisation of L0 builder for JHitR0 data type.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template specialisation of L2 builder for JHitL2 data type.
Basic data structure for L2 hit.
Template specialisation of L1 builder for JHitR1 data type.
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.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
Template specialisation of L2 builder for JHitR2 data type.
const JLimit & getLimit() const
Get limit.
do set_variable DETECTOR_TXT $WORKDIR detector
then usage $script[input file[working directory[option]]] nWhere option can be N
Basic data structure for L1 hit.
JTriggerCounter_t next()
Increment trigger counter.