CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/EventFilter/StorageManager/interface/EventFileHandler.h

Go to the documentation of this file.
00001 // $Id: EventFileHandler.h,v 1.15 2012/04/04 12:16:56 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 uint64_t& maxFileSize
00038     );
00039 
00043     virtual void closeFile(const FilesMonitorCollection::FileRecord::ClosingReason&);
00044 
00045 
00046   private:
00047     
00051     void writeHeader(InitMsgSharedPtr);
00052 
00056     virtual void do_writeEvent(const I2OChain&);
00057 
00058     boost::scoped_ptr<edm::StreamerFileWriter> writer_; // writes streamer and index file
00059   };
00060   
00061 } // stor namespace
00062 
00063 #endif // EventFilter_StorageManager_EventFileHandler_h
00064 
00065