1 #ifndef SIO_RunEventMap_H
2 #define SIO_RunEventMap_H 1
6 #include "LCIORandomAccess.h"
12 std::ostream & operator<<(std::ostream& os,
const RunEventMap& rm ) ;
23 friend std::ostream & operator<<(std::ostream& os,
const RunEventMap& rm ) ;
27 typedef std::map< RunEvent, long64> MapType ;
28 typedef MapType::iterator Map_IT ;
29 typedef MapType::const_iterator Map_cIT ;
31 static const int NPos = -1 ;
61 int getNumberOfEventRecords()
const {
return _nEvt ; }
63 int getNumberOfRunRecords()
const {
return _nRun ; }
66 size_t size() {
return _map.size() ; }
68 Map_IT begin() {
return _map.begin() ; }
69 Map_IT end() {
return _map.end() ; }
70 Map_cIT begin()
const {
return _map.begin() ; }
71 Map_cIT end()
const {
return _map.end() ; }
72 bool empty()
const {
return _map.empty() ; }
74 template <
class InputIterator>
75 void insert(InputIterator b, InputIterator e) { _map.insert( b , e ) ; }
77 void clear() { _map.clear() ; _nRun=0 ; _nEvt =0 ; }
Helper struct that stores run and event positions in the file.
Definition: LCIORandomAccess.h:17
Map that holds positions of Run and Event records.
Definition: RunEventMap.h:20
long64 getPosition(const RunEvent &re)
Return the position of the specified Event record or Run record respectively (if EventNum == -1 )...
Definition: RunEventMap.h:43
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...
Definition: RunEventMap.cc:20