00001 #ifndef SIO_SIORUNHEADERHANDLER_H 00002 #define SIO_SIORUNHEADERHANDLER_H 1 00003 00004 #include <string> 00005 00006 #include "EVENT/LCRunHeader.h" 00007 #include "IOIMPL/LCRunHeaderIOImpl.h" 00008 00009 #include "SIO_block.h" 00010 00011 namespace SIO { 00012 00013 00020 class SIORunHeaderHandler : public SIO_block{ 00021 00022 protected: 00023 SIORunHeaderHandler() : SIO_block("UNKNOWN") { /* no default c'tor*/ ;} 00024 00025 public: 00026 00027 SIORunHeaderHandler(const SIORunHeaderHandler&) = delete; 00028 SIORunHeaderHandler& operator=(const SIORunHeaderHandler&) = delete ; 00029 00032 SIORunHeaderHandler(const std::string& name) ; 00035 SIORunHeaderHandler(const std::string& name, IOIMPL::LCRunHeaderIOImpl** rhP) ; 00036 virtual ~SIORunHeaderHandler() ; 00037 00038 // interface from SIO_block 00039 virtual unsigned int xfer( SIO_stream*, SIO_operation, unsigned int ) ; 00040 virtual unsigned int version() ; 00041 00042 void setRunHeader(const EVENT::LCRunHeader* hdr ) ; 00043 void setRunHeaderPtr(IOIMPL::LCRunHeaderIOImpl** hdrP ) ; 00044 00045 private: 00046 IOIMPL::LCRunHeaderIOImpl** _rhP{NULL} ; // address for reading 00047 const EVENT::LCRunHeader* _hdr{NULL} ; // runheader for writing 00048 00049 }; // class 00050 00051 } // namespace 00052 00053 #endif /* ifndef SIO_SIORUNHEADERHANDLER_H */