30 int main(
int argc,
char **argv)
34 using namespace KM3NETDAQ;
47 JParser<> zap(
"Example program to select events based on hits in strings.");
49 zap[
'f'] =
make_field(inputFile,
"input file.");
51 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
52 zap[
'a'] =
make_field(detectorFile,
"detector file.");
53 zap[
'S'] =
make_field(selector,
"selection: pairs of <string number> <minimum number of triggered hits>");
61 catch(
const exception& error) {
62 FATAL(error.what() << endl);
70 if (detectorFile !=
"") {
79 }
else if (!selector.empty()) {
81 FATAL(
"Missing detector file.");
93 while (inputFile.hasNext()) {
95 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
99 bool status = selector.empty();
114 for (map_type::const_iterator i = selector.begin(); i != selector.end() && !status; ++i) {
115 status = response[i->first] >= i->second;
123 buffer[
event->getRunNumber()].insert(event->getFrameIndex());
131 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
Auxiliary class to set-up Hit.
Template specialisation of JMultipleFileScanner for trigger parameters.
Utility class to parse command line options.
Direct access to PMT data in detector data structure for DAQ hits.
Auxiliary class to uniquely identify PMT readout channel.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Recording of objects on file according a format that follows from the file name extension.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
int getRunNumber() const
Get run number.
Data structure for detector geometry and calibration.
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
int getFrameIndex() const
Get frame index.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
int getString() const
Get string number.
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
const JLimit & getLimit() const
Get limit.
do set_variable DETECTOR_TXT $WORKDIR detector
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
JPMTChannel getPMTChannel(const JDAQKeyHit &hit) const
Get PMT channel.
JTriggerCounter_t next()
Increment trigger counter.