CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/EventFilter/SMProxyServer/interface/DQMArchiver.h

Go to the documentation of this file.
00001 // $Id: DQMArchiver.h,v 1.2 2011/03/07 15:41:54 mommsen Exp $
00003 
00004 #ifndef EventFilter_SMProxyServer_DQMArchiver_h
00005 #define EventFilter_SMProxyServer_DQMArchiver_h
00006 
00007 #include "EventFilter/SMProxyServer/interface/Configuration.h"
00008 #include "EventFilter/SMProxyServer/interface/StateMachine.h"
00009 #include "EventFilter/StorageManager/interface/ConsumerID.h"
00010 #include "EventFilter/StorageManager/interface/DQMEventConsumerRegistrationInfo.h"
00011 #include "EventFilter/StorageManager/interface/DQMEventQueueCollection.h"
00012 #include "IOPool/Streamer/interface/DQMEventMessage.h"
00013 
00014 #include <boost/scoped_ptr.hpp>
00015 #include <boost/thread/thread.hpp>
00016 
00017 #include <map>
00018 
00019 
00020 namespace smproxy {
00021 
00030   class DQMArchiver
00031   {
00032   public:
00033 
00034     DQMArchiver(StateMachine*);
00035 
00036     ~DQMArchiver();
00037 
00041     const stor::DQMEventConsRegPtr& getRegPtr() const
00042     { return regPtr_; }
00043     
00044     
00045   private:
00046 
00047     void activity();
00048     void doIt();
00049     void handleDQMEvent(const stor::DQMTopLevelFolder::Record&);
00050     void updateLastRecord(const stor::DQMTopLevelFolder::Record&);
00051     void writeDQMEventToFile(const DQMEventMsgView&, const bool endRun) const;
00052     void createRegistration();
00053 
00054     StateMachine* stateMachine_;
00055     const DQMArchivingParams dqmArchivingParams_;
00056     stor::DQMEventQueueCollectionPtr dqmEventQueueCollection_;
00057     stor::DQMEventConsRegPtr regPtr_;
00058 
00059     boost::scoped_ptr<boost::thread> thread_;
00060 
00061     typedef std::map<std::string,stor::DQMTopLevelFolder::Record> Records;
00062     Records lastUpdateForFolders_;
00063   };
00064   
00065 } // namespace smproxy
00066 
00067 #endif // EventFilter_SMProxyServer_DQMArchiver_h 
00068 
00069