39 struct JTreeRouter_t {
52 JTreeRouter_t(
const std::string& input_file) :
66 const Long64_t i = indexer.find(evt);
70 return scanner.getEntry(i);
87 int main(
int argc,
char **argv)
91 using namespace KM3NETDAQ;
94 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
103 JParser<> zap(
"Program to merge different files with JFIT::JEvt data.");
105 zap[
'f'] =
make_field(inputFile,
"list of JEvt compatible files");
111 catch(
const exception& error) {
112 FATAL(error.what() << endl);
117 if (inputFile.empty()) {
118 FATAL(
"No input files." << endl);
126 JParallelFileScanner_t
in(inputFile[0]);
130 for (
size_t i = 1; i != inputFile.size(); ++i) {
131 buffer.push_back(JTreeRouter_t(inputFile[i]));
134 while (in.hasNext()) {
136 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
138 multi_pointer_type ps = in.next();
141 const JEvt* evt = ps;
145 for (
size_t i = 1; i != inputFile.size(); ++i) {
147 const JEvt* p = buffer[i].get(*tev);
151 copy(p->begin(), p->end(), back_inserter(out));
155 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.
Utility class to parse command line options.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Auxiliary class to determine value of DAQ objects.
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
#define DEBUG(A)
Message macros.