00001 // $Id: EventFileHandler.h,v 1.14 2011/03/07 15:31:31 mommsen Exp $ 00003 00004 #ifndef EventFilter_StorageManager_EventFileHandler_h 00005 #define EventFilter_StorageManager_EventFileHandler_h 00006 00007 #include "EventFilter/StorageManager/interface/FileHandler.h" 00008 #include "EventFilter/StorageManager/interface/InitMsgCollection.h" 00009 00010 #include "IOPool/Streamer/src/StreamerFileWriter.h" 00011 00012 #include <stdint.h> 00013 #include <boost/scoped_ptr.hpp> 00014 00015 00016 namespace stor { 00017 00018 class I2OChain; 00019 00020 00029 class EventFileHandler : public FileHandler 00030 { 00031 public: 00032 EventFileHandler 00033 ( 00034 InitMsgSharedPtr, 00035 FilesMonitorCollection::FileRecordPtr, 00036 const DbFileHandlerPtr, 00037 const DiskWritingParams&, 00038 const uint64_t& maxFileSize 00039 ); 00040 00044 virtual void closeFile(const FilesMonitorCollection::FileRecord::ClosingReason&); 00045 00046 00047 private: 00048 00052 void writeHeader(InitMsgSharedPtr); 00053 00057 virtual void do_writeEvent(const I2OChain&); 00058 00059 boost::scoped_ptr<edm::StreamerFileWriter> writer_; // writes streamer and index file 00060 }; 00061 00062 } // stor namespace 00063 00064 #endif // EventFilter_StorageManager_EventFileHandler_h 00065 00066