LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SIOEventHandler.h
Go to the documentation of this file.
1 #ifndef SIO_SIOEVENTHANDLER_H
2 #define SIO_SIOEVENTHANDLER_H 1
3 
4 // -- std headers
5 #include <string>
6 #include <memory>
7 
8 // -- lcio headers
9 #include "EVENT/LCEvent.h"
10 #include "IOIMPL/LCEventIOImpl.h"
11 
12 // -- sio headers
13 #include <sio/block.h>
14 
15 namespace SIO {
16 
17 
23  class SIOEventHandler : public sio::block {
24  public:
25  SIOEventHandler(const SIOEventHandler&) = delete;
26  SIOEventHandler& operator=(const SIOEventHandler&) = delete ;
27  ~SIOEventHandler() = default ;
28 
30  SIOEventHandler() ;
31 
32  // from sio::block
33  void read( sio::read_device &device, sio::version_type vers ) override ;
34  void write( sio::write_device &device ) override ;
35 
37  void setEvent( EVENT::LCEvent* evt ) ;
38 
40  void setCollectionNames( const std::set<std::string>& colnames ) ;
41 
42  private:
43  static constexpr const char *SubsetPostfix = "_References" ;
44 
45  private:
46  // Event pointer for reading/writing
47  EVENT::LCEvent *_event {nullptr} ;
50  }; // class
51 
52 } // namespace
53 
54 #endif /* ifndef SIO_SIOEVENTHANDLER_H */
void write(sio::write_device &device) override
SIOEventHandler & operator=(const SIOEventHandler &)=delete
~SIOEventHandler()=default
void read(sio::read_device &device, sio::version_type vers) override
EVENT::LCEvent * _event
void setCollectionNames(const std::set< std::string > &colnames)
Set the collection to read or write only.
Handler for LCEvent/LCEventIOImpl objects.
SIOEventHandler()
Constructor.
void setEvent(EVENT::LCEvent *evt)
Set the event to read/write.
The main event interface.
Definition: LCEvent.h:31
static constexpr const char * SubsetPostfix
std::set< std::string > _colSubSet
List of collection to read only.