LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LCEventLazyImpl.h
Go to the documentation of this file.
1 #ifndef EVENT_LCEVENTLAZYIMPL_H
2 #define EVENT_LCEVENTLAZYIMPL_H 1
3 
4 // -- lcio headers
5 #include "IOIMPL/LCEventIOImpl.h"
6 #include "SIO/SIOHandlerMgr.h"
7 
8 // -- std headers
9 #include <memory>
10 
11 // -- sio headers
12 #include <sio/definitions.h>
13 #include <sio/buffer.h>
14 
15 namespace IOIMPL {
16 
28  public:
31  LCEventLazyImpl() = default ;
32 
35  ~LCEventLazyImpl() = default ;
36 
43  EVENT::LCCollection * getCollection(const std::string & name) const ;
44 
54  EVENT::LCCollection * takeCollection(const std::string & name) const ;
55 
61  void removeCollection(const std::string & name) ;
62 
65  void setBuffer( const sio::record_info &recinfo, sio::buffer &&recordBuffer ) ;
66 
67  private:
70  void unpackEvent() ;
71 
74  void postProcessEvent() ;
75 
78  void setupBlocks() ;
79 
80  private:
82  sio::record_info _recordInfo {} ;
83  sio::block_list _blocks {} ;
84  bool _unpacked {false} ;
86  }; // class
87 
88 } // namespace IOIMPL
89 
90 #endif /* ifndef EVENT_LCEVENTLAZYIMPL_H */
void setBuffer(const sio::record_info &recinfo, sio::buffer &&recordBuffer)
Set the event record buffer.
EVENT::LCCollection * takeCollection(const std::string &name) const
Returns the collection for the given name and transfers the ownership of the collection to the caller...
void unpackEvent()
Unpack the event record.
STL class.
EVENT::LCCollection * getCollection(const std::string &name) const
Returns the collection for the given name.
void postProcessEvent()
Post process the event after unpacking.
LCEventLazyImpl()=default
Constructor.
std::unique_ptr< sio::buffer > _recordBuffer
Adding stuff needed for io (friend declarations, etc.)
Definition: LCEventIOImpl.h:26
SIO::SIOHandlerMgr _eventHandlerMgr
void setupBlocks()
Setup the collection blocks before unpacking.
Implementation of the event class with a lazy record unpacking.
The generic collection used in LCIO.
Definition: LCCollection.h:29
Holds instances of all types of SIOObjectHandlers.
Definition: SIOHandlerMgr.h:20
~LCEventLazyImpl()=default
Destructor.
void removeCollection(const std::string &name)
Removes (and deletes) the collection with name (if it exists in the event).
sio::record_info _recordInfo
sio::block_list _blocks