40 inline bool operator()(
const Evt&
first,
const Evt& second)
const
54 int main(
int argc,
char **argv)
69 JParser<> zap(
"Auxiliary program for time sorting of Monte-Carlo events.");
80 catch(
const exception& error) {
81 FATAL(error.what() << endl);
85 if (numberOfFiles == 0) {
97 counter_type ns = (number_of_events + numberOfFiles - 1) / numberOfFiles;
102 for (
size_t i = 0;
i != numberOfFiles; ++
i, ni +=
ns) {
104 const JLimit limit(ni, min(ni +
ns, number_of_events));
108 STATUS(
"Processing " << filename <<
' ' << limit <<
"." << flush);
112 for (in.setLimit(limit); in.hasNext(); ) {
113 buffer.push_back(*in.next());
118 sort(buffer.begin(), buffer.end(),
JCompare_t());
128 out.put(
JMeta(argc, argv));
130 for (
const auto& evt : buffer) {
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.
Long64_t counter_type
Type definition for counter.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Scanning of objects from a single file according a format that follows from the extension of each fil...
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
TTimeStamp mc_event_time
MC: true generation time (UTC) of the event, (default: 01 Jan 1970 00:00:00)
JTreeWriter object output.
General purpose messaging.
std::string setWildCard(const std::string &file_name, const std::string &value)
Get file name by setting wild card to given value.
JTreeWriter< T > & getTreeWriter()
Get TreeWriter.
Utility class to parse command line options.
std::string to_string(const T &value)
Convert value to string.
static const char FILENAME_WILD_CARD
wild card character for file name substitution
virtual void open(const char *file_name) override
Open file.
Object reading from a list of files.
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
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
bool hasWildCard(const std::string &file_name)
Check presence of wild card.