Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:56

0001 
0002 #ifndef MonitorElementsDb_H
0003 #define MonitorElementsDb_H
0004 
0005 /*!
0006   \file MonitorElementsDb.h
0007   \brief Generate a Monitor Element from DB data
0008   \author B. Gobbo
0009 */
0010 
0011 #include <string>
0012 #include <vector>
0013 
0014 #include "FWCore/Framework/interface/EDAnalyzer.h"
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 
0018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0019 
0020 #include "MonitorXMLParser.h"
0021 
0022 #include "RelationalAccess/ISessionProxy.h"
0023 #include "DQMServices/Core/interface/DQMStore.h"
0024 
0025 class MonitorElementsDb {
0026   friend class EcalBarrelMonitorDbModule;
0027 
0028 public:
0029   typedef dqm::legacy::MonitorElement MonitorElement;
0030   typedef dqm::legacy::DQMStore DQMStore;
0031 
0032   /// Constructors
0033   MonitorElementsDb(const edm::ParameterSet &ps, std::string &xmlFile);
0034 
0035   /// Destructor
0036   virtual ~MonitorElementsDb();
0037 
0038 protected:
0039   /// Analyze
0040   void analyze(const edm::Event &e, const edm::EventSetup &c, coral::ISessionProxy *s);
0041 
0042   // BeginJob
0043   void beginJob(void);
0044 
0045   // EndJob
0046   void endJob(void);
0047 
0048   // HtmlOutput
0049   void htmlOutput(std::string &htmlDir);
0050 
0051   void startSession(void);
0052 
0053 private:
0054   std::string prefixME_;
0055   std::string xmlFile_;
0056   MonitorXMLParser *parser_;
0057   std::vector<DB_ME> MEinfo_;
0058   std::vector<MonitorElement *> MEs_;
0059   int ievt_;
0060   DQMStore *dqmStore_;
0061 };
0062 
0063 #endif  // MonitorElementsDb_H