41 struct JTreeRouter_t {
54 JTreeRouter_t(
const std::string& input_file) :
68 const Long64_t
i = indexer.find(evt);
72 return scanner.getEntry(i);
89 int main(
int argc,
char **argv)
93 using namespace KM3NETDAQ;
96 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
106 JParser<> zap(
"Program to merge different files with JFIT::JEvt data " \
107 "(e.g. from JMuonXXX[.sh] and JShowerXXX[.sh] applied to the same input data)." \
108 "\nThe input files should be event-by-event synchronised.");
110 zap[
'f'] =
make_field(inputFile,
"list of JEvt compatible files");
116 catch(
const exception& error) {
117 FATAL(error.what() << endl);
121 if (inputFile.empty()) {
122 FATAL(
"No input files." << endl);
129 JParallelFileScanner_t
in(inputFile[0]);
133 for (
size_t i = 1; i != inputFile.size(); ++
i) {
134 buffer.push_back(JTreeRouter_t(inputFile[i]));
137 while (in.hasNext()) {
139 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
141 multi_pointer_type ps = in.next();
144 const JEvt* evt = ps;
148 for (
size_t i = 1; i != inputFile.size(); ++
i) {
150 const JEvt* p = buffer[
i].get(*tev);
154 copy(p->begin(), p->end(), back_inserter(out));
158 FATAL(
"Inconsistent data at " << in.getFilename() <<
":" << in.getCounter() << endl);
Utility class to parse command line options.
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.
General purpose class for parallel reading of objects from a single file or multiple files...
Template definition for direct access of elements in ROOT TChain.
#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.
General purpose class for object reading from a list of file names.
then fatal The output file must have the wildcard in the e g root fi 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.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Auxiliary class to determine time of DAQ objects.
#define DEBUG(A)
Message macros.