Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-03 23:51:49

0001 #ifndef ECALPEDESTALHISTORY_H
0002 #define ECALPEDESTALHISTORY_H
0003 
0004 /**\class EcalPedestalHistory
0005 
0006  Description: <one line class summary>
0007 
0008  Implementation:
0009      <Notes on implementation>
0010 */
0011 //
0012 // $Id: EcalPedestalHistory.h,v 0.0 2016/04/28 $
0013 //
0014 
0015 // system include files
0016 #include <memory>
0017 
0018 // user include files
0019 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0020 #include "FWCore/Framework/interface/Frameworkfwd.h"
0021 #include "FWCore/Framework/interface/ESHandle.h"
0022 #include "FWCore/Framework/interface/Event.h"
0023 #include "FWCore/Framework/interface/MakerMacros.h"
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025 
0026 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
0027 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
0028 
0029 #include "CaloOnlineTools/EcalTools/interface/EcalFedMap.h"
0030 
0031 #include "OnlineDB/EcalCondDB/interface/all_monitoring_types.h"
0032 #include "OnlineDB/Oracle/interface/Oracle.h"
0033 #include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
0034 
0035 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0036 
0037 #include <string>
0038 #include "TH1.h"
0039 #include "TGraph.h"
0040 #include "TH2.h"
0041 #include <fstream>
0042 #include <map>
0043 
0044 class EcalPedestalHistory : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0045 public:
0046   explicit EcalPedestalHistory(const edm::ParameterSet&);
0047   ~EcalPedestalHistory() override;
0048   void analyze(const edm::Event&, const edm::EventSetup&) override;
0049   void beginRun(edm::Run const&, edm::EventSetup const&) override;
0050   void endRun(edm::Run const&, edm::EventSetup const&) override;
0051   void beginJob() override;
0052   void endJob() override;
0053   EcalCondDBInterface* econn;
0054 
0055   enum { kChannels = 75848, kEBChannels = 61200, kEEChannels = 14648 };
0056   enum { kGains = 3, kFirstGainId = 1 };
0057 
0058 private:
0059   int runnumber_;
0060   unsigned int cnt_evt_;
0061   std::string ECALType_;  // EB or EE
0062   std::string runType_;   // Pedes or Other
0063   unsigned int startevent_;
0064   std::vector<int> maskedChannels_;
0065   std::vector<int> maskedEEChannels_;
0066   unsigned int m_firstRun;
0067   unsigned int m_lastRun;
0068   std::string m_location;
0069   std::string m_gentag;
0070   std::string m_sid;
0071   std::string m_user;
0072   std::string m_pass;
0073   std::string m_locationsource;
0074   std::string m_name;
0075 };
0076 #endif