File indexing completed on 2024-04-06 12:02:51
0001 #ifndef ECALPEDESTALHISTORY_H
0002 #define ECALPEDESTALHISTORY_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <memory>
0017
0018
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_;
0062 std::string runType_;
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