00001 #ifndef SIO_SIOCOLLECTIONHANDLER_H 00002 #define SIO_SIOCOLLECTIONHANDLER_H 1 00003 00004 #include <string> 00005 #include "EVENT/LCCollection.h" 00006 #include "IOIMPL/LCEventIOImpl.h" 00007 #include "Exceptions.h" 00008 00009 #include "SIO_block.h" 00010 00011 00012 namespace SIO { 00013 00014 class SIOObjectHandler; 00015 00022 class SIOCollectionHandler : public SIO_block{ 00023 00024 private: 00025 SIOCollectionHandler() ; // no default c'tor 00026 00027 public: 00028 00029 SIOCollectionHandler(const SIOCollectionHandler&) = delete; 00030 SIOCollectionHandler& operator=(const SIOCollectionHandler&) = delete ; 00031 00037 SIOCollectionHandler(const std::string& name, 00038 const std::string& type, 00039 IOIMPL::LCEventIOImpl** anEvtP=0 ) 00040 ; 00041 00042 virtual ~SIOCollectionHandler() ; 00043 00044 const std::string &getTypeName() const; 00045 00046 // interface from SIO_block 00047 virtual unsigned int xfer( SIO_stream*, SIO_operation, unsigned int ) ; 00048 virtual unsigned int version() ; 00049 00050 void setCollection(const EVENT::LCCollection *col) ; 00051 void setEvent(IOIMPL::LCEventIOImpl** anEvtP) ; 00052 00053 00054 private: 00055 IOIMPL::LCEventIOImpl** _evtP ; // adress of the event that data is read into 00056 const EVENT::LCCollection *_col ; // for writing we use the data interface 00057 00058 std::string _myType ; 00059 SIOObjectHandler* _myHandler{NULL} ; 00060 00061 }; // class 00062 00063 } // namespace 00064 #endif /* ifndef SIO_SIOCOLLECTIONHANDLER_H */