41 int main(
int argc,
char **argv)
45 using namespace KM3NETDAQ;
52 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
54 JParallelFileScanner_t inputFile;
55 size_t numberOfEvents;
63 JParser<> zap(
"Example program to select events based on hits in strings.");
65 zap[
'f'] =
make_field(inputFile,
"input file (output of JXXXReconstruction.sh)");
66 zap[
'n'] =
make_field(numberOfEvents,
"maximum number of selected events")
67 = std::numeric_limits<size_t>::max();
70 zap[
'a'] =
make_field(detectorFile,
"detector file.");
71 zap[
'S'] =
make_field(selector,
"selection: pairs of <string number> <minimum number of triggered hits>");
79 catch(
const exception& error) {
80 FATAL(error.what() << endl);
86 if (detectorFile !=
"") {
95 }
else if (!selector.empty()) {
97 FATAL(
"Missing detector file.");
111 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
113 multi_pointer_type ps = inputFile.next();
119 if (in->empty()) {
continue; }
121 if (mc.getEntries() != 0) {
125 bool status = selector.empty();
140 for (map_type::const_iterator
i = selector.begin();
i != selector.end() && !status; ++
i) {
141 status = response[
i->first] >=
i->second;
161 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.
General purpose class for parallel reading of objects from a single file or multiple files...
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.
const_iterator< T > end() const
Get end of data.
const_iterator< T > begin() const
Get begin of data.
Auxiliary class for recursive type list generation.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Parallel scanning of objects from a single file or multiple files according a format that follows fro...
General purpose messaging.
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Data structure for set of track fit results.
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
Utility class to parse command line options.
Auxiliary class to set-up Hit.
do set_variable DETECTOR_TXT $WORKDIR detector
JTriggerCounter_t getCounter() const
Get trigger counter.
JPMTChannel getPMTChannel(const JDAQKeyHit &hit) const
Get PMT channel.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.