36 inline void print(std::ostream& out,
const char*
const title,
T __begin,
T __end)
42 for (
T i = __begin; i != __end; ++i) {
43 out <<
' ' << setw(4) << (int) i->getT();
56 int main(
int argc,
char **argv)
59 using namespace KM3NETDAQ;
69 JParser<> zap(
"Example program to test hit pre-processing with user data."\
70 "\nformat: -u \"(<PMT> <time> <time-over-threshold>)+\"");
74 zap[
'O'] =
make_field(option) = JPreprocessor::getOptions();
79 catch(
const exception &error) {
80 FATAL(error.what() << endl);
83 using namespace KM3NETDAQ;
99 JHit::setSlewing(
false);
105 frame.
add(data.size(), data.data());
107 timeslice.push_back(frame);
114 JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(timeslice[0], module);
121 buildL0(buffer, back_inserter(output));
123 print(cout,
"L0:", output.begin(), output.end());
132 buildL0(timeslice, router, back_inserter(output));
134 print(cout,
"L0:", output.begin(), output.end());
142 buildL1(timeslice, router, back_inserter(output));
144 print(cout,
"L1:", output.begin(), output.end());
152 buildL2(timeslice, router, back_inserter(output));
154 print(cout,
"L2:", output.begin(), output.end());
Utility class to parse command line options.
Auxiliaries for pre-processing of hits.
Basic data structure for L0 hit.
Data structure for a composite optical module.
void setPreprocessor(const JPreprocessor::JOption_t option, const match_type &match)
Set pre-processor of consecutive hits.
Template specialisation of L0 builder for JHitL0 data type.
Router for direct addressing of module data in detector data structure.
Basic data structure for R2 hit.
Data structure for detector geometry and calibration.
void setDAQLongprint(const bool option)
Set DAQ print option.
Template specialisation of L0 builder for JHitR0 data type.
T & getInstance(const T &object)
Get static instance from temporary object.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Template specialisation of L1 builder for JHitR1 data type.
Match operator for consecutive hits.
General purpose messaging.
Direct access to module in detector data structure.
Data structure for L2 parameters.
Reduced data structure for L1 hit.
Utility class to parse command line options.
Auxiliary data structure for L1 build parameters.
Template specialisation of L2 builder for JHitR2 data type.
2-dimensional frame with time calibrated data from one optical module.
do set_variable DETECTOR_TXT $WORKDIR detector
Auxiliary class for specifying the way of pre-processing of hits.
Data frame of one optical module.
JDAQSuperFrame & add(const JDAQSuperFrame &super_frame)
Add data from same optical module.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])