Jpp - the software that should make you happy
|
Monte Carlo run header. More...
#include <JHead.hh>
Public Member Functions | |
JHead () | |
Default constructor. More... | |
JHead (const Head &header) | |
Copy constructor. More... | |
virtual | ~JHead () |
Virtual destructor. More... | |
const JHead & | getHeader () const |
Get header. More... | |
JHead & | getHeader () |
Get header. More... | |
void | setHeader (const JHead &header) |
Set header. More... | |
template<class T > | |
bool | is_valid (T JHead::*pd) const |
Check validity of given data member in JHead. More... | |
template<class T > | |
const_iterator | pull (T JHead::*pd) const |
Pull given data member from Head. More... | |
template<class T > | |
iterator | pull (T JHead::*pd) |
Pull given data member from Head. More... | |
template<class T > | |
void | push (T JHead::*pd) |
Push given data member to Head. More... | |
template<class T > | |
void | erase (T JHead::*pd) |
Remove given data member from Head. More... | |
bool | match (const JHead &header) const |
Test match of headers. More... | |
bool | less (const JHead &header) const |
Comparison of headers. More... | |
JHead & | add (const JHead &header) |
Addition of headers. More... | |
std::istream & | read (std::istream &in) |
Read header from input. More... | |
std::ostream & | write (std::ostream &out) const |
Write header to output. More... | |
std::ostream & | print (std::ostream &out) const |
Print header to output. More... | |
ClassDef (JHead, 3) | |
bool | have_line (std::string key) const |
Check availability of data with the given key. More... | |
const std::string & | get_line (std::string key) const |
Get data with the given key. More... | |
std::string & | get_line (std::string key) |
Get data with the given key. More... | |
std::vector< std::string > | matching_keys (const std::string &tag) const |
In case of duplicate keys, they are internally stored in the map with a suffix "_n". More... | |
std::vector< std::string > | get_lines (const std::string &tag) const |
Get all data compatible with the given key. More... | |
std::string | set_line (std::string tag, std::string line, bool ensure_unique=true) |
Set data with the given tag. More... | |
std::string | get_field (std::string key, int idx) const |
Get data with the given key at given index. More... | |
std::string | get_field (std::string key, std::string field) const |
Get data with the given key at given field. More... | |
int | get_index_of_field (std::string key, std::string field) const |
Get index of data with the given key at given field. More... | |
void | set_field (std::string key, std::string field, std::string value) |
Set data with the given key at given field. More... | |
double | ngen () const |
Get the number of generated events needed for computing event rates. More... | |
double | daq_livetime () const |
Get the the live time provided by the DAQ sytstem (=number of processed timeslices * frametime). More... | |
double | mc_livetime () const |
Get the Monte Carlo live time. More... | |
Vec | coord_origin () const |
Get coordinate origin. More... | |
Vec | translate () const |
Get coordinate translation. More... | |
ClassDef (Head, 2) | |
Static Public Member Functions | |
template<class T > | |
static bool | is_valid (const T &object) |
Check validity of given data member in JHead. More... | |
static JLANG::JEquationParameters & | getEquationParameters () |
Get equation parameters corresponding to Monte Carlo ASCII format, i.e: More... | |
static void | setEquationParameters (const JLANG::JEquationParameters &equation) |
Set equation parameters. More... | |
static std::map< std::string, std::vector< std::string > > & | _hdr_dict () |
Get internal description of the known lines in header. More... | |
Static Private Member Functions | |
template<class T > | |
static bool | less (const T &first, const T &second) |
Comparison. More... | |
template<class T > | |
static bool | match (const T &first, const T &second) |
Test match. More... | |
template<class T > | |
static bool | less (const std::vector< T > &first, const std::vector< T > &second) |
Comparison of containers. More... | |
template<class T > | |
static bool | match (const std::vector< T > &first, const std::vector< T > &second) |
Test is containers match. More... | |
template<class T > | |
static bool | match (const JHead &first, const JHead &second, T JHead::*pd) |
Test match of given data member of headers. More... | |
Friends | |
bool | operator== (const JHead &first, const JHead &second) |
Equal operator. More... | |
bool | operator< (const JHead &first, const JHead &second) |
Less than operator. More... | |
Monte Carlo run header.
This class extends the Head class so that the data from specific tags can be promoted to concrete data types.
Note that for the copy of new JHead data (e.g. data not obtained via a previous JAANET::copy) to become effective, the key words in the corresponding map of the Head class should be set.
To this end, member method JHead::push can be used.
|
inline |
|
inline |
Copy constructor.
header | header |
Definition at line 1128 of file JHead.hh.
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
Check validity of given data member in JHead.
The validity is defined by the presence of the name of the data member in the underlying map.
pd | pointer to data member |
Definition at line 1183 of file JHead.hh.
|
inlinestatic |
Check validity of given data member in JHead.
The validity is defined by difference between actual and default value.
object | object |
Definition at line 1198 of file JHead.hh.
|
inline |
Pull given data member from Head.
pd | pointer to data member |
Definition at line 1213 of file JHead.hh.
Pull given data member from Head.
pd | pointer to data member |
Definition at line 1226 of file JHead.hh.
|
inline |
Push given data member to Head.
pd | pointer to data member |
Definition at line 1238 of file JHead.hh.
|
inline |
Remove given data member from Head.
pd | pointer to data member |
Definition at line 1250 of file JHead.hh.
|
inline |
Test match of headers.
header | second header |
Definition at line 1269 of file JHead.hh.
|
inline |
Comparison of headers.
header | header |
Definition at line 1301 of file JHead.hh.
Addition of headers.
header | header |
Definition at line 1345 of file JHead.hh.
|
inlinestatic |
Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
<key>: <value> [<value>]* <key>: <value> [<value>]*
Definition at line 1432 of file JHead.hh.
|
inlinestatic |
Set equation parameters.
equation | equation parameters |
Definition at line 1445 of file JHead.hh.
std::istream & JAANET::JHead::read | ( | std::istream & | in | ) |
Read header from input.
in | input stream |
Definition at line 30 of file JHead.cc.
std::ostream & JAANET::JHead::write | ( | std::ostream & | out | ) | const |
Write header to output.
out | output stream |
Definition at line 68 of file JHead.cc.
std::ostream & JAANET::JHead::print | ( | std::ostream & | out | ) | const |
Print header to output.
out | output stream |
Definition at line 99 of file JHead.cc.
JAANET::JHead::ClassDef | ( | JHead | , |
3 | |||
) |
|
inlinestaticprivate |
Comparison.
first | first object |
second | second object |
Definition at line 1489 of file JHead.hh.
|
inlinestaticprivate |
Test match.
first | first object |
second | second object |
Definition at line 1504 of file JHead.hh.
|
inlinestaticprivate |
Comparison of containers.
It is assumed that the containers are ordered in the same way.
first | first object |
second | second object |
Definition at line 1520 of file JHead.hh.
|
inlinestaticprivate |
Test is containers match.
It is assumed that the containers are ordered in the same way.
first | first object |
second | second object |
Definition at line 1549 of file JHead.hh.
|
inlinestaticprivate |
Test match of given data member of headers.
first | first header |
second | second header |
pd | pointer to data member |
Definition at line 1571 of file JHead.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get all data compatible with the given key.
This means all data that is internally stored with "key_n", with n an integer
This method throws a run-time exception if no data are available.
tag | tag (without suffix) |
Definition at line 153 of file Head.hh.
|
inlineinherited |
Set data with the given tag.
The function will return the actual key that is used internally to store the result, which is equal to the tag with an optional "_n" added to ensure uniqueness.
tag | tag |
line | data |
ensure_unique | add '_n' (with n an integer) to the tag if it would overwrite an existing key. |
Definition at line 175 of file Head.hh.
|
inlineinherited |
Get data with the given key at given index.
This method throws a run-time exception if no data are available.
key | key |
idx | index |
Definition at line 197 of file Head.hh.
|
inlineinherited |
Get data with the given key at given field.
This method throws a run-time exception if no field is available.
Note that this method uses the dictionary define in method Head::_hdr_dict.
key | key |
field | field |
Definition at line 237 of file Head.hh.
|
inlineinherited |
Get index of data with the given key at given field.
Note that this method uses the dictionary define in method Head::_hdr_dict.
key | key |
field | field |
Definition at line 219 of file Head.hh.
|
inlineinherited |
Set data with the given key at given field.
This method throws a run-time exception if no field available.
Note that this method uses the dictionary define in method Head::_hdr_dict.
key | key |
field | field |
value | vakue |
Definition at line 260 of file Head.hh.
|
inlinestaticinherited |
Get internal description of the known lines in header.
Definition at line 312 of file Head.hh.
|
inlineinherited |
Get the number of generated events needed for computing event rates.
Definition at line 362 of file Head.hh.
|
inlineinherited |
Get the the live time provided by the DAQ sytstem (=number of processed timeslices * frametime).
Definition at line 372 of file Head.hh.
|
inlineinherited |
Get the Monte Carlo live time.
Definition at line 383 of file Head.hh.
|
inlineinherited |
Get coordinate origin.
Definition at line 393 of file Head.hh.
|
inlineinherited |
Get coordinate translation.
Definition at line 405 of file Head.hh.
|
inherited |
Equal operator.
Note that this operator uses the JHead::match method.
first | first header |
second | second header |
Definition at line 1372 of file JHead.hh.
Less than operator.
first | first header |
second | second header |
Definition at line 1386 of file JHead.hh.
JAANET::start_run JAANET::JHead::start_run |
JAANET::XSecFile JAANET::JHead::XSecFile |
JAANET::drawing JAANET::JHead::drawing |
std::vector<JAANET::detector> JAANET::JHead::detector |
JAANET::muon_desc_file JAANET::JHead::muon_desc_file |
JAANET::target JAANET::JHead::target |
std::vector<JAANET::physics> JAANET::JHead::physics |
std::vector<JAANET::simul> JAANET::JHead::simul |
JAANET::cut_primary JAANET::JHead::cut_primary |
JAANET::cut_seamuon JAANET::JHead::cut_seamuon |
JAANET::cut_in JAANET::JHead::cut_in |
JAANET::cut_nu JAANET::JHead::cut_nu |
JAANET::spectrum JAANET::JHead::spectrum |
JAANET::can JAANET::JHead::can |
JAANET::fixedcan JAANET::JHead::fixedcan |
JAANET::genvol JAANET::JHead::genvol |
JAANET::coord_origin JAANET::JHead::coord_origin |
JAANET::genhencut JAANET::JHead::genhencut |
JAANET::norma JAANET::JHead::norma |
JAANET::livetime JAANET::JHead::livetime |
JAANET::seabottom JAANET::JHead::seabottom |
JAANET::depth JAANET::JHead::depth |
JAANET::DAQ JAANET::JHead::DAQ |
JAANET::tgen JAANET::JHead::tgen |
JAANET::time_interval JAANET::JHead::time_interval |
JAANET::primary JAANET::JHead::primary |
std::vector<JAANET::flux> JAANET::JHead::flux |
JAANET::end_event JAANET::JHead::end_event |