Jpp
18.2.1-ARCA-DF-PATCH
the software that should make you happy
|
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred to as "tags") and values. More...
#include <Head.hh>
Classes | |
struct | tags |
Public Member Functions | |
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... | |
int | get_index_of_field (std::string key, std::string field) const |
Get index of data with the given key at given field. More... | |
std::string | get_field (std::string key, std::string field) const |
Get 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... | |
void | print (std::ostream &out=std::cout) const |
Print header. 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... | |
virtual | ~Head () |
ClassDef (Head, 2) | |
Static Public Member Functions | |
static const std::map < std::string, std::vector < std::string > > & | _hdr_dict () |
Get internal description of the known lines in header. More... | |
static void | actionAtFileOpen (int version) |
Action method at file open. More... | |
Static Public Attributes | |
static int | ROOT_IO_VERSION = -1 |
Streamer version as obtained from ROOT file. More... | |
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred to as "tags") and values.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
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 155 of file Head.hh.
|
inline |
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 177 of file Head.hh.
|
inline |
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 199 of file Head.hh.
|
inline |
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 221 of file Head.hh.
|
inline |
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 241 of file Head.hh.
|
inline |
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 264 of file Head.hh.
|
inline |
Print header.
out | output stream |
|
inlinestatic |
Get internal description of the known lines in header.
Definition at line 316 of file Head.hh.
|
inline |
Get the number of generated events needed for computing event rates.
Definition at line 367 of file Head.hh.
|
inline |
Get the the live time provided by the DAQ sytstem (=number of processed timeslices * frametime).
Definition at line 377 of file Head.hh.
|
inline |
Get the Monte Carlo live time.
Definition at line 388 of file Head.hh.
|
inline |
Get coordinate origin.
Definition at line 398 of file Head.hh.
|
inline |
Get coordinate translation.
Definition at line 410 of file Head.hh.
|
inlinestatic |
Action method at file open.
version | version |
Definition at line 424 of file Head.hh.
Head::ClassDef | ( | Head | , |
2 | |||
) |
|
static |