33 int main(
int argc,
char **argv)
37 using namespace KM3NETDAQ;
40 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
50 JParser<> zap(
"Program to merge different files with JFIT::JEvt data.");
52 zap[
'f'] =
make_field(inputFile,
"list of JEvt compatible files");
54 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
59 catch(
const exception& error) {
60 FATAL(error.what() << endl);
65 if (inputFile.empty()) {
66 FATAL(
"No input files." << endl);
73 for (inputFile[0].setLimit(numberOfEvents); inputFile[0].hasNext(); ) {
75 STATUS(
"event: " << setw(10) << inputFile[0].getCounter() <<
'\r');
DEBUG(endl);
77 multi_pointer_type ps = inputFile[0].next();
84 for (
size_t i = 1; i != inputFile.size(); ++i) {
86 if (inputFile[i].hasNext()) {
88 multi_pointer_type __ps = inputFile[i].next();
91 const JEvt* __evt = __ps;
95 copy(__evt->begin(), __evt->end(), back_inserter(out));
99 FATAL(
"Inconsistent data at "
100 << inputFile[0].
getFilename() <<
":" << inputFile[0].getCounter() <<
" != "
101 << inputFile[i].
getFilename() <<
":" << inputFile[i].getCounter() << endl);
Utility class to parse command line options.
ROOT TTree parameter settings.
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...
Auxiliary class for defining the range of iterations of objects.
#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.
Data structure for set of track fit results.
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.
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
#define DEBUG(A)
Message macros.
int main(int argc, char *argv[])