LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
LCIORandomAccess.h
1 #ifndef SIO_LCIORandomAccess_H
2 #define SIO_LCIORandomAccess_H 1
3 
4 //#include "EVENT/LCObject.h"
5 #include "LCIOTypes.h"
6 
7 #include <iostream>
8 
9 
10 typedef EVENT::long64 long64 ;
11 
12 namespace SIO{ // IO or IMPL ?
13 
17  struct RunEvent{
18  RunEvent(): RunNum( 0 ), EvtNum( 0 ) {}
19  RunEvent(int run, int evt): RunNum( run ), EvtNum( evt ) {}
20  RunEvent(long64 runEvt): RunNum( (runEvt >> 32 ) & 0xffffffff ), EvtNum( runEvt & 0xffffffff ) {}
21  int RunNum ;
22  int EvtNum ;
23 
24  operator long64() const { return ( long64( RunNum ) << 32 | ( long64(EvtNum) & 0xffffffff ) ) ; }
25  };
26 
27  std::ostream & operator<<(std::ostream& os, const RunEvent& re ) ;
28 
29  bool operator < ( const RunEvent& r0, const RunEvent& other) ;
30 
31 
33  class LCIORandomAccess ;
34  class LCIORandomAccessMgr ;
35 
36  std::ostream & operator<<(std::ostream& os, const LCIORandomAccess& ra ) ;
37 
38  bool operator < (const LCIORandomAccess ra0, const LCIORandomAccess& other) ;
39 
40 
46 // class LCIORandomAccess : public EVENT LCObject {
48 
49  friend class SIORandomAccessHandler ;
50  friend class LCIORandomAccessMgr ;
51  friend std::ostream & operator<<(std::ostream& os, const LCIORandomAccess& ra ) ;
52  friend bool operator < (const LCIORandomAccess ra0, const LCIORandomAccess& other) ;
53 
54  public:
55 
56  virtual ~LCIORandomAccess(){ /* nop */; }
57 
58  long64 getIndexLocation() const { return _indexLocation ; }
59  long64 getPrevLocation() const { return _prevLocation ; }
60  // long64 getNextLocation() const { return _nextLocation ; }
61  long64 getFirstRecordLocation() const { return _firstRecordLocation ; }
62 
63 
64  void setIndexLocation(long64 il) { _indexLocation = il ; }
65  void setPreviousLocation(long64 pl) { _prevLocation = pl ; }
66  // void setNextLocation(long64 nl) { _nextLocation = nl ; }
67  void setFirstRecordLocation(long64 fl) { _firstRecordLocation = fl ; }
68 
69  protected:
70  RunEvent _minRunEvt ;
71  RunEvent _maxRunEvt ;
72  int _nRunHeaders ;
73  int _nEvents ;
74  int _recordsAreInOrder ;
75  long64 _indexLocation ;
76  long64 _prevLocation ;
77  long64 _nextLocation ;
78  long64 _firstRecordLocation ;
79  }; // class
80 
81 
82 
83 } // namespace
84 #endif
Manager class for LCIO direct access.
Definition: LCIORandomAccessMgr.h:38
Helper struct that stores run and event positions in the file.
Definition: LCIORandomAccess.h:17
long long long64
64 bit signed integer,e.g.to be used for timestamps
Definition: LCIOTypes.h:14
Implementation class for LCIORandomAccess records.
Definition: LCIORandomAccess.h:47
Handler for LCIOrandomAccess and LCIOIndex objects/blocks.
Definition: SIORandomAccessHandler.h:16