00001 #ifndef SIO_SIOEVENTHANDLER_H
00002 #define SIO_SIOEVENTHANDLER_H 1
00003
00004 #include <string>
00005
00006 #include "EVENT/LCEvent.h"
00007 #include "IOIMPL/LCEventIOImpl.h"
00008
00009 #include "SIO_block.h"
00010
00011 namespace SIO {
00012
00013
00019 class SIOEventHandler : public SIO_block{
00020
00021 protected:
00022 SIOEventHandler() : SIO_block("UNKNOWN") { ;}
00023
00024 public:
00025
00026 SIOEventHandler(const SIOEventHandler&) = delete;
00027 SIOEventHandler& operator=(const SIOEventHandler&) = delete ;
00028
00029 SIOEventHandler(const std::string& name) ;
00030 SIOEventHandler(const std::string& name, IOIMPL::LCEventIOImpl** evtP) ;
00031 virtual ~SIOEventHandler() ;
00032
00033
00034 virtual unsigned int xfer( SIO_stream*, SIO_operation, unsigned int ) ;
00035 virtual unsigned int version() ;
00036
00037 void setEvent(const EVENT::LCEvent* evt ) ;
00038 void setEventPtr( IOIMPL::LCEventIOImpl** evtP ) ;
00039
00040 void setReadCollectionNames(const std::vector<std::string>& colnames) ;
00041
00042 private:
00043
00044 IOIMPL::LCEventIOImpl **_evtP{NULL} ;
00045
00046 const EVENT::LCEvent *_evt{NULL} ;
00047
00048 std::set< std::string > _colSubSet{} ;
00049
00050 };
00051
00052 }
00053
00054 #endif