40 struct JCopyInterface {
44 virtual ~JCopyInterface()
83 for ( ; i != in.end() && i->getTimesliceStart() < range.
getLowerLimit(); ++i) {}
84 for ( ; i != in.end() && i->getTimesliceStart() <= range.
getUpperLimit(); ++i) { out.put(*i); }
98 template<
class JTypelist_t>
100 public std::vector< JSinglePointer<JCopyInterface> >,
101 public JFileRecorder<JTYPELIST<JTriggerTypes_t, JMeta>::typelist>
122 for (
iterator i = this->begin(); i != this->end(); ++i) {
137 template<
class JHead_t,
class JTail_t>
153 if (selection(type)) {
174 template<
class JTypelist_t>
175 int JCopyMaster<JTypelist_t>::debug = 0;
183 static const char SEPARATOR =
'/';
200 friend inline std::istream&
operator>>(std::istream& in, JSplit&
object)
208 const string::size_type pos = buffer.find(SEPARATOR);
210 if (pos != string::npos) {
212 if (!(
istringstream(buffer.substr(0,pos)) >>
object.index)) { in.setstate(ios::badbit); }
213 if (!(
istringstream(buffer.substr(pos+1)) >>
object.total)) { in.setstate(ios::badbit); }
217 object.index = invalid;
233 friend inline std::ostream&
operator<<(std::ostream& out,
const JSplit&
object)
237 if (
object.index != invalid)
238 return out <<
object.index << SEPARATOR <<
object.total;
240 return out <<
object.total;
244 static constexpr size_t invalid = std::numeric_limits<size_t>::max();
278 std::string inputFile;
287 JParser<> zap(
"Auxiliary program to split DAQ data into multiple output files.");
295 "Precede name of data structure by a '+' or '-' "
296 "to add or remove data types in the output, respectively."
302 catch(
const exception& error) {
314 if (pos == string::npos) {
322 FATAL(
"No (valid) summary or event data in input file " << inputFile <<
' ' << total <<
endl);
325 NOTICE(
"Total UTC time range " << total <<
endl);
341 JCopyMaster<JDAQTypes_t>::debug =
debug;
347 for (
size_t i = 0; i !=
ranges.size(); ++i) {
353 STATUS(
"Writing " << file_name <<
' ' <<
ranges[i] <<
"... " << flush);
355 master.open(file_name.c_str());
362 catch(
const exception& error) {}
int main(int argc, char **argv)
Recording of objects on file according a format that follows from the file name extension.
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_STRING(A)
Make string.
Scanning of objects from a single file according a format that follows from the extension of each fil...
ROOT TTree parameter settings of various packages.
Template definition of a multi-dimensional oscillation probability interpolation table.
Template definition for direct access of elements in ROOT TChain.
Data structure for UTC time.
static double getTick()
Get number of nano-seconds per tick.
void copy(const Head &from, JHead &to)
Copy header from from to to.
std::ostream & operator<<(std::ostream &out, const morphology_type &object)
Write morphology to output stream.
std::istream & operator>>(std::istream &in, morphology_type &object)
Read morphology from input stream.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JTOOLS::JRange< JDAQUTCExtended > JDAQUTCTimeRange
Type definition for DAQ UTC time range.
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
KM3NeT DAQ data structures and auxiliaries.
static const char WILDCARD
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
Auxiliary data structure for sequence of same character.
Auxiliary class for a type holder.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for ROOT class selection.