CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalPedHists.h
Go to the documentation of this file.
1 #ifndef CaloOnlineTools_EcalTools_EcalPedHists_h
2 #define CaloOnlineTools_EcalTools_EcalPedHists_h
3 
25 
26 #include <iostream>
27 #include <vector>
28 #include <set>
29 #include "TFile.h"
30 #include "TH1.h"
31 #include "TDirectory.h"
32 
33 typedef std::map<std::string, TH1F*> stringHistMap;
34 
35 class EcalPedHists : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
36 public:
38  ~EcalPedHists() override;
39 
40 protected:
41  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
42  void beginRun(edm::Run const&, edm::EventSetup const& c) override;
43  void endRun(edm::Run const&, edm::EventSetup const& c) override;
44  void endJob(void) override;
45 
46 private:
50  void initHists(int FED);
51 
52  int runNum_;
53  bool inputIsOk_;
60  std::vector<int> listChannels_;
61  std::vector<int> listSamples_;
62  std::vector<int> listFEDs_;
63  std::vector<std::string> listEBs_;
64  std::map<int, stringHistMap> FEDsAndHistMaps_;
65  std::set<int> theRealFedSet_;
67  TFile* root_file_;
68 
73 
75 };
76 
77 #endif
std::vector< int > listFEDs_
Definition: EcalPedHists.h:62
std::set< int > theRealFedSet_
Definition: EcalPedHists.h:65
const edm::EventSetup & c
void initHists(int FED)
const edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
Definition: EcalPedHists.h:71
const edm::InputTag headerProducer_
Definition: EcalPedHists.h:59
std::string intToString(int num)
std::map< int, stringHistMap > FEDsAndHistMaps_
Definition: EcalPedHists.h:64
void endJob(void) override
void beginRun(edm::Run const &, edm::EventSetup const &c) override
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalMappingToken_
Definition: EcalPedHists.h:72
std::vector< std::string > listEBs_
Definition: EcalPedHists.h:63
const edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
Definition: EcalPedHists.h:70
void readEBdigis(edm::Handle< EBDigiCollection > digis)
bool histsFilled_
Definition: EcalPedHists.h:55
const EcalElectronicsMapping * ecalElectronicsMap_
Definition: EcalPedHists.h:74
const edm::InputTag barrelDigiCollection_
Definition: EcalPedHists.h:57
EcalFedMap * fedMap_
Definition: EcalPedHists.h:66
std::vector< int > listChannels_
Definition: EcalPedHists.h:60
EcalPedHists(const edm::ParameterSet &ps)
Definition: EcalPedHists.cc:13
bool allFEDsSelected_
Definition: EcalPedHists.h:54
std::string fileName_
Definition: EcalPedHists.h:56
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
Definition: EcalPedHists.h:69
void endRun(edm::Run const &, edm::EventSetup const &c) override
void readEEdigis(edm::Handle< EEDigiCollection > digis)
~EcalPedHists() override
std::map< std::string, TH1F * > stringHistMap
Definition: EcalPedHists.h:33
const edm::InputTag endcapDigiCollection_
Definition: EcalPedHists.h:58
Definition: Run.h:45
TFile * root_file_
Definition: EcalPedHists.h:67
std::vector< int > listSamples_
Definition: EcalPedHists.h:61