CMS 3D CMS Logo

SiPixelStatusHarvester.h
Go to the documentation of this file.
1 #ifndef SiPixelStatusHarvester_H
2 #define SiPixelStatusHarvester_H
3 
11 // Pixel quality harvester
14 // PixelDQM Framework
16 // PixelPhase1 HelperClass
18 
19 // Threshold testing
20 #include "TH1.h"
21 #include "TFile.h"
22 
23 class SiPixelStatusHarvester : public one::DQMEDAnalyzer<edm::one::WatchLuminosityBlocks>, private HistogramManagerHolder {
24  enum {
31  };
32 
33  public:
34 
35  // Constructor
37 
38  // Destructor
39  ~SiPixelStatusHarvester() override;
40 
41  // Operations
42  void beginJob () override;
43  void endJob () override;
44  void bookHistograms (DQMStore::IBooker& iBooker, edm::Run const&, edm::EventSetup const& iSetup ) final;
45  void endRunProduce (edm::Run&, const edm::EventSetup&) final;
46  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) final;
47 
48  void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final;
49  void endLuminosityBlock (const edm::LuminosityBlock&, const edm::EventSetup&) final;
50 
51  private:
52 
53  // Parameters
55  std::string outputBase_;
57  int nLumi_;
58  std::string moduleName_;
59  std::string label_;
60  // harvest helper classs that setup the IOV structure
62  // debug mode
63  bool debug_;
64  // for DB output naming
65  std::string recordName_;
66 
67  // permanent known bad components
69 
70  // totoal number of lumi blocks with non-zero pixel DIGIs
71  int countLumi_ = 0;
72  // last lumi section of the SiPixeDetectorStatus data
74 
76  const SiPixelFedCabling* cablingMap_ = nullptr;
77  std::map<int, unsigned int> sensorSize_;
78 
80 
81  // pixel online to offline pixel row/column
82  std::map<int, std::map<int, std::pair<int,int> > > pixelO2O_;
83 
84  //Helper functions
85  std::vector<std::string> substructures;
86  double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus);
87  std::string substructure(int detid);
88 
89  // "step function" for IOV
91 
92  // boolean function to check whether two SiPixelQualitys (pyloads) are identical
94 
95  // Tag constructor
96  void constructTag(std::map<int, SiPixelQuality*> siPixelQualityTag,
97  edm::Service<cond::service::PoolDBOutputService>& poolDbService,
98  std::string tagName,
99  edm::Run& iRun);
100 
101 };
102 
103 
104 #endif
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
bool equal(SiPixelQuality *a, SiPixelQuality *b)
std::map< int, unsigned int > sensorSize_
edm::LuminosityBlockNumber_t endLumiBlock_
void constructTag(std::map< int, SiPixelQuality * > siPixelQualityTag, edm::Service< cond::service::PoolDBOutputService > &poolDbService, std::string tagName, edm::Run &iRun)
edm::LuminosityBlockNumber_t stepIOV(edm::LuminosityBlockNumber_t pin, std::map< edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t > IOV)
unsigned int LuminosityBlockNumber_t
SiPixelStatusManager siPixelStatusManager_
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &, edm::EventSetup const &iSetup) final
int iEvent
Definition: GenABIO.cc:224
std::string substructure(int detid)
const SiPixelQuality * badPixelInfo_
const SiPixelFedCabling * cablingMap_
const TrackerGeometry * trackerGeometry_
void endRunProduce(edm::Run &, const edm::EventSetup &) final
SiPixelStatusHarvester(const edm::ParameterSet &)
double b
Definition: hdecay.h:120
double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus)
std::map< int, std::map< int, std::pair< int, int > > > pixelO2O_
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
std::vector< std::string > substructures
Definition: plugin.cc:24
HLT enums.
double a
Definition: hdecay.h:121
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) final
Definition: Run.h:45