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);
68 if (detectorFile !=
"") {
77 }
else if (!selector.empty()) {
79 FATAL(
"Missing detector file.");
91 while (inputFile.hasNext()) {
93 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
97 bool status = selector.empty();
112 for (map_type::const_iterator
i = selector.begin();
i != selector.end() && !status; ++
i) {
113 status = response[
i->first] >=
i->second;
121 buffer[
event->getRunNumber()].insert(event->getFrameIndex());
129 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
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.
std::map< int, buffer_type > map_type
string -> hits
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.
Auxiliary class to set-up Hit.
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
JPMTChannel getPMTChannel(const JDAQKeyHit &hit) const
Get PMT channel.
JTriggerCounter_t next()
Increment trigger counter.
#define DEBUG(A)
Message macros.