Jpp  15.0.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
JMonteCarloFileSupportkit.hh File Reference
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/offline/Evt.hh"
#include "km3net-dataformat/offline/io_ascii.hh"
#include "JLang/JASCIIFileReader.hh"
#include "JLang/JGZFileReader.hh"
#include "JLang/JStreamObjectOutput.hh"
#include "JLang/JAbstractObjectIterator.hh"
#include "JLang/JObjectOutput.hh"
#include "JLang/JException.hh"
#include "JAAnet/JHead.hh"
#include "JAAnet/JHeadToolkit.hh"
#include "JSupport/JMonteCarloFileReader.hh"
#include "JSupport/JMonteCarloFileWriter.hh"
#include "JSupport/JMultipleFileScanner.hh"

Go to the source code of this file.

Classes

class  JSUPPORT::JMonteCarloFileReader< T, JFileReader_t >
 Template definition of Monte Carlo object reader. More...
 
class  JSUPPORT::JMonteCarloFileReader< Head, JFileReader_t >
 Template specialisation of JMonteCarloFileReader for Head. More...
 
class  JSUPPORT::JMonteCarloFileReader< Evt, JFileReader_t >
 Template specialisation of JMonteCarloFileReader for Event. More...
 
class  JSUPPORT::JMonteCarloASCIIFileReader< Head >
 Template implementation of Monte Carlo object reader for ASCII formatted file (i.e. '.evt') More...
 
class  JSUPPORT::JMonteCarloASCIIFileReader< Evt >
 Template implementation of Monte Carlo object reader for ASCII formatted file (i.e. '.evt') More...
 
class  JSUPPORT::JMonteCarloGZFileReader< Head >
 Template implementation of Monte Carlo object reader for gzipped ASCII formatted file (i.e. '.gz') More...
 
class  JSUPPORT::JMonteCarloGZFileReader< Evt >
 Template implementation of Monte Carlo object reader for gzipped ASCII formatted file (i.e. '.gz') More...
 
class  JSUPPORT::JMonteCarloStreamObjectOutput< Head >
 Template specialisation of JMonteCarloStreamObjectOutput for Head. More...
 
class  JSUPPORT::JMonteCarloStreamObjectOutput< Evt >
 Template specialisation of JMonteCarloStreamObjectOutput for Evt. More...
 
class  JSUPPORT::JMultipleFileScanner< Head >
 Template specialisation of JMultipleFileScanner for Monte Carlo header. More...
 

Namespaces

 JSUPPORT
 Support classes and methods for experiment specific I/O.
 
 JPP
 This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 

Functions

std::istream & operator>> (std::istream &in, Head &header)
 Read header from input. More...
 
std::istream & operator>> (std::istream &in, Evt &evt)
 Read event from input. More...
 
std::ostream & operator<< (std::ostream &out, const Evt &evt)
 Write event to output. More...
 
std::istream & operator>> (std::istream &in, Hit &hit)
 Read hit from input. More...
 
std::ostream & operator<< (std::ostream &out, const Hit &hit)
 Write hit to output. More...
 
Head JSUPPORT::getHeader (const JMultipleFileScanner_t &file_list)
 Get Monte Carlo header. More...
 
template<class JFunction_t >
JMultipleFileScanner_t JSUPPORT::getAAnetFiles (const JMultipleFileScanner_t &input, JFunction_t test)
 Get list of files compatible with geven header. More...
 

Function Documentation

std::istream& operator>> ( std::istream &  in,
Head header 
)
inline

Read header from input.

Author
mdejong
Parameters
ininput stream
headerheader
Returns
input stream

Definition at line 35 of file JMonteCarloFileSupportkit.hh.

36 {
37  header.clear();
38 
39  read(header, in);
40 
41  return in;
42 }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
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
Definition: JCanberra.sh:41
std::istream& operator>> ( std::istream &  in,
Evt evt 
)
inline

Read event from input.

Parameters
ininput stream
evtevent
Returns
input stream

Definition at line 70 of file JMonteCarloFileSupportkit.hh.

71 {
72  evt = Evt();
73 
74  read(evt, in, false);
75 
76  return in;
77 }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
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
Definition: JCanberra.sh:41
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition: Evt.hh:19
std::ostream& operator<< ( std::ostream &  out,
const Evt evt 
)
inline

Write event to output.

Parameters
outoutput stream
evtevent
Returns
output stream

Definition at line 88 of file JMonteCarloFileSupportkit.hh.

89 {
90  using namespace std;
91 
92  const ios_base::fmtflags flags = out.flags();
93 
94  write(evt, out << fixed);
95 
96  out.flags(flags);
97 
98  return out;
99 }
bool write(const Vec &v, std::ostream &os)
Write a Vec(tor) to a stream.
Definition: io_ascii.hh:154
std::istream& operator>> ( std::istream &  in,
Hit hit 
)
inline

Read hit from input.

Parameters
ininput stream
hithit
Returns
input stream

Definition at line 109 of file JMonteCarloFileSupportkit.hh.

110 {
111  hit = Hit();
112 
113  read(hit, in, false);
114 
115  return in;
116 }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
Definition: Hit.hh:8
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
Definition: JCanberra.sh:41
std::ostream& operator<< ( std::ostream &  out,
const Hit hit 
)
inline

Write hit to output.

Parameters
outoutput stream
hithit
Returns
output stream

Definition at line 127 of file JMonteCarloFileSupportkit.hh.

128 {
129  using namespace std;
130 
131  const ios_base::fmtflags flags = out.flags();
132 
133  write(hit, out << fixed);
134 
135  out.flags(flags);
136 
137  return out;
138 }
bool write(const Vec &v, std::ostream &os)
Write a Vec(tor) to a stream.
Definition: io_ascii.hh:154