CMS 3D CMS Logo

DQMServiceManager.h

Go to the documentation of this file.
00001 #ifndef _DQMSERVICEMANAGER_H_
00002 #define _DQMSERVICEMANAGER_H_
00003 
00004 // $Id: DQMServiceManager.h,v 1.5 2008/12/19 22:28:22 biery Exp $
00005 
00006 #include "IOPool/Streamer/interface/InitMessage.h"
00007 #include "IOPool/Streamer/interface/EventMessage.h"
00008 
00009 #include "xdata/UnsignedInteger32.h"
00010 #include "xdata/Boolean.h"
00011 #include "xdata/String.h"
00012 
00013 #include "EventFilter/StorageManager/interface/DQMInstance.h"
00014 #include "EventFilter/StorageManager/interface/DQMEventServer.h"
00015 #include <IOPool/Streamer/interface/DQMEventMessage.h>
00016 //#include <EventFilter/StorageManager/interface/DQMStreamService.h>
00017 
00018 #include <boost/shared_ptr.hpp>
00019 #include <vector>
00020 #include <string>
00021 
00022 namespace stor
00023 {
00024   class DQMServiceManager 
00025   {
00026     public:  
00027     
00028     explicit DQMServiceManager(std::string filePrefix = "/tmp/DQM",
00029                                int purgeTime = DEFAULT_PURGE_TIME,
00030                                int readyTime = DEFAULT_READY_TIME,
00031                                bool collateDQM = false,
00032                                bool archiveDQM = false,
00033                                int archiveInterval = 0,
00034                                bool useCompression = true,
00035                                int compressionLevel = 1);
00036      ~DQMServiceManager(); 
00037     
00038       void manageDQMEventMsg(DQMEventMsgView& msg);
00039       void stop();
00040       DQMGroupDescriptor * getBestDQMGroupDescriptor(std::string groupName);
00041       void setPurgeTime(int purgeTime) { purgeTime_ = purgeTime;}
00042       void setReadyTime(int readyTime) { readyTime_ = readyTime;}
00043       void setFilePrefix(std::string filePrefix)
00044       { filePrefix_ = filePrefix;}
00045 
00046       void setCollateDQM(bool collateDQM) { collateDQM_ = collateDQM; }
00047       void setArchiveDQM(bool archiveDQM) { archiveDQM_ = archiveDQM; }
00048       void setArchiveInterval(int archiveInterval) { archiveInterval_ = archiveInterval; }
00049       void setDQMEventServer(boost::shared_ptr<DQMEventServer>& es) 
00050       { DQMeventServer_ = es; }
00051       void setUseCompression(bool useCompression) 
00052       { useCompression_ = useCompression;}
00053       void setCompressionLevel(int compressionLevel) 
00054       { compressionLevel_ = compressionLevel;}
00055 
00056     protected:
00057 
00058       bool          useCompression_;
00059       int           compressionLevel_;
00060       bool          collateDQM_;
00061       bool          archiveDQM_;
00062       int           archiveInterval_;
00063       int           nUpdates_;
00064       std::string   filePrefix_;
00065       int           purgeTime_;
00066       int           readyTime_;
00067       int  writeAndPurgeDQMInstances(bool purgeAll=false);
00068       std::vector<DQMInstance *>    dqmInstances_;
00069 
00070       DQMInstance * findDQMInstance(int runNumber, 
00071                                     int lumiSection,
00072                                     int instance);
00073 
00074       boost::shared_ptr<DQMEventServer> DQMeventServer_;
00075       enum 
00076       {
00077         DEFAULT_PURGE_TIME = 120,
00078         DEFAULT_READY_TIME = 30
00079       }; 
00080 
00081       //      boost::shared_ptr<stor::DQMEventSelector>  dqmEventSelector_;
00082   };
00083 }
00084 
00085 #endif

Generated on Tue Jun 9 17:34:52 2009 for CMSSW by  doxygen 1.5.4