LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Private Types | Friends | List of all members
SIO::RunEventMap Class Reference

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::ostreamoperator<< (std::ostream &os, const RunEventMap &rm)
 

Detailed Description

Map that holds positions of Run and Event records.

Author
gaede
Version
Id:
RunEventMap.h,v 1.3 2011-03-03 16:00:12 gaede Exp

Definition at line 37 of file RunEventMap.h.

Member Typedef Documentation

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.

typedef long long SIO::RunEventMap::long64
private

Definition at line 38 of file RunEventMap.h.

Definition at line 43 of file RunEventMap.h.

Constructor & Destructor Documentation

SIO::RunEventMap::RunEventMap ( )
default
SIO::RunEventMap::~RunEventMap ( )
default

Member Function Documentation

void SIO::RunEventMap::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.

Definition at line 32 of file RunEventMap.cc.

References _map, _nEvt, _nRun, std::map< K, T >::insert(), and std::make_pair().

Referenced by main().

iterator SIO::RunEventMap::begin ( )
inline

Definition at line 84 of file RunEventMap.h.

References _map, and std::map< K, T >::begin().

Referenced by SIO::operator<<().

const_iterator SIO::RunEventMap::begin ( ) const
inline

Definition at line 86 of file RunEventMap.h.

References _map, and std::map< K, T >::begin().

void SIO::RunEventMap::clear ( )
inline

Definition at line 93 of file RunEventMap.h.

References _map, _nEvt, _nRun, and std::map< K, T >::clear().

bool SIO::RunEventMap::empty ( ) const
inline

Definition at line 88 of file RunEventMap.h.

References _map, and std::map< K, T >::empty().

iterator SIO::RunEventMap::end ( )
inline

Definition at line 85 of file RunEventMap.h.

References _map, and std::map< K, T >::end().

Referenced by SIO::operator<<().

const_iterator SIO::RunEventMap::end ( ) const
inline

Definition at line 87 of file RunEventMap.h.

References _map, and std::map< K, T >::end().

int SIO::RunEventMap::getNumberOfEventRecords ( ) const
inline

Definition at line 77 of file RunEventMap.h.

References _nEvt.

Referenced by main().

int SIO::RunEventMap::getNumberOfRunRecords ( ) const
inline

Definition at line 79 of file RunEventMap.h.

References _nRun.

Referenced by main().

long64 SIO::RunEventMap::getPosition ( const RunEvent re)
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)
template<class InputIterator >
void SIO::RunEventMap::insert ( InputIterator  b,
InputIterator  e 
)
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().

size_t SIO::RunEventMap::size ( )
inline

Definition at line 82 of file RunEventMap.h.

References _map, and std::map< K, T >::size().

Referenced by main().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream os,
const RunEventMap rm 
)
friend

Member Data Documentation

map_type SIO::RunEventMap::_map {}
protected

Definition at line 96 of file RunEventMap.h.

Referenced by add(), begin(), clear(), empty(), end(), getPosition(), insert(), maxRunEvent(), minRunEvent(), and size().

int SIO::RunEventMap::_nEvt {0}
protected

Definition at line 98 of file RunEventMap.h.

Referenced by add(), clear(), and getNumberOfEventRecords().

int SIO::RunEventMap::_nRun {0}
protected

Definition at line 97 of file RunEventMap.h.

Referenced by add(), clear(), and getNumberOfRunRecords().

constexpr const int SIO::RunEventMap::npos = -1
static

Definition at line 46 of file RunEventMap.h.

Referenced by getPosition(), MT::LCReader::readEvent(), and MT::LCReader::readRunHeader().


The documentation for this class was generated from the following files: