LCIO
02.17
|
Map that holds positions of Run and Event records. More...
#include <RunEventMap.h>
Public Types | |
typedef std::map< RunEvent, long64 > | map_type |
typedef map_type::iterator | iterator |
typedef map_type::const_iterator | const_iterator |
Public Member Functions | |
RunEventMap ()=default | |
~RunEventMap ()=default | |
void | add (const RunEvent &re, long64 pos) |
Add a new entry to the event map - if the RunEvent already exists the new position will be stored. More... | |
long64 | getPosition (const RunEvent &re) |
Return the position of the specified Event record or Run record respectively (if EventNum == -1 ). More... | |
long64 | getPosition (long64 re) |
Same as getPosition(const RunEvent& re ). More... | |
RunEvent | minRunEvent () const |
RunEvent | maxRunEvent () const |
int | getNumberOfEventRecords () const |
int | getNumberOfRunRecords () const |
size_t | size () |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
bool | empty () const |
template<class InputIterator > | |
void | insert (InputIterator b, InputIterator e) |
void | clear () |
Static Public Attributes | |
static constexpr const int | npos = -1 |
Protected Attributes | |
map_type | _map {} |
int | _nRun {0} |
int | _nEvt {0} |
Private Types | |
typedef long long | long64 |
Friends | |
std::ostream & | operator<< (std::ostream &os, const RunEventMap &rm) |
Map that holds positions of Run and Event records.
Definition at line 37 of file RunEventMap.h.
typedef map_type::const_iterator SIO::RunEventMap::const_iterator |
Definition at line 45 of file RunEventMap.h.
typedef map_type::iterator SIO::RunEventMap::iterator |
Definition at line 44 of file RunEventMap.h.
|
private |
Definition at line 38 of file RunEventMap.h.
typedef std::map< RunEvent, long64> SIO::RunEventMap::map_type |
Definition at line 43 of file RunEventMap.h.
|
default |
|
default |
Add a new entry to the event map - if the RunEvent already exists the new position will be stored.
Definition at line 32 of file RunEventMap.cc.
References _map, _nEvt, _nRun, std::map< K, T >::insert(), and std::make_pair().
Referenced by main().
|
inline |
Definition at line 84 of file RunEventMap.h.
References _map, and std::map< K, T >::begin().
Referenced by SIO::operator<<().
|
inline |
Definition at line 86 of file RunEventMap.h.
References _map, and std::map< K, T >::begin().
|
inline |
Definition at line 93 of file RunEventMap.h.
References _map, _nEvt, _nRun, and std::map< K, T >::clear().
|
inline |
Definition at line 88 of file RunEventMap.h.
References _map, and std::map< K, T >::empty().
|
inline |
Definition at line 85 of file RunEventMap.h.
References _map, and std::map< K, T >::end().
Referenced by SIO::operator<<().
|
inline |
Definition at line 87 of file RunEventMap.h.
References _map, and std::map< K, T >::end().
|
inline |
|
inline |
Return the position of the specified Event record or Run record respectively (if EventNum == -1 ).
Returns RunEventMap::NPos if no record found.
Definition at line 59 of file RunEventMap.h.
Referenced by main().
RunEventMap::long64 SIO::RunEventMap::getPosition | ( | long64 | re | ) |
Same as getPosition(const RunEvent& re ).
Definition at line 54 of file RunEventMap.cc.
References _map, std::map< K, T >::end(), std::map< K, T >::find(), and npos.
|
inline |
Definition at line 91 of file RunEventMap.h.
References _map, and std::map< K, T >::insert().
RunEvent SIO::RunEventMap::maxRunEvent | ( | ) | const |
Definition at line 70 of file RunEventMap.cc.
References _map, std::map< K, T >::empty(), and std::map< K, T >::rbegin().
RunEvent SIO::RunEventMap::minRunEvent | ( | ) | const |
Definition at line 61 of file RunEventMap.cc.
References _map, std::map< K, T >::begin(), and std::map< K, T >::empty().
|
inline |
Definition at line 82 of file RunEventMap.h.
References _map, and std::map< K, T >::size().
Referenced by main().
|
friend |
|
protected |
Definition at line 96 of file RunEventMap.h.
Referenced by add(), begin(), clear(), empty(), end(), getPosition(), insert(), maxRunEvent(), minRunEvent(), and size().
|
protected |
Definition at line 98 of file RunEventMap.h.
Referenced by add(), clear(), and getNumberOfEventRecords().
|
protected |
Definition at line 97 of file RunEventMap.h.
Referenced by add(), clear(), and getNumberOfRunRecords().
|
static |
Definition at line 46 of file RunEventMap.h.
Referenced by getPosition(), MT::LCReader::readEvent(), and MT::LCReader::readRunHeader().