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 DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks>,
24  private HistogramManagerHolder {
26 
27 public:
28  // Constructor
30 
31  // Destructor
32  ~SiPixelStatusHarvester() override;
33 
34  // Operations
35  void beginJob() override;
36  void endJob() override;
37  void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const&, edm::EventSetup const& iSetup) final;
38  void dqmEndRun(const edm::Run&, const edm::EventSetup&) final;
39  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) final;
40 
42  void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final;
43 
44 private:
45  // Parameters
49  int nLumi_;
52  // harvest helper classs that setup the IOV structure
54  // debug mode
55  bool debug_;
56  // for DB output naming
58 
59  // permanent known bad components
61 
62  // totoal number of lumi blocks with non-zero pixel DIGIs
63  int countLumi_ = 0;
64  // last lumi section of the SiPixeDetectorStatus data
66 
68  const SiPixelFedCabling* cablingMap_ = nullptr;
69  std::map<int, unsigned int> sensorSize_;
70 
72 
73  // pixel online to offline pixel row/column
74  std::map<int, std::map<int, std::pair<int, int> > > pixelO2O_;
75 
76  //Helper functions
77  std::vector<std::string> substructures;
78  double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus);
79  std::string substructure(int detid);
80 
81  // "step function" for IOV
83  std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> IOV);
84 
85  // boolean function to check whether two SiPixelQualitys (pyloads) are identical
87 
88  // Tag constructor
89  void constructTag(std::map<int, SiPixelQuality*> siPixelQualityTag,
92  edm::Run const& iRun);
93 };
94 
95 #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_
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
std::map< int, std::map< int, std::pair< int, int > > > pixelO2O_
int iEvent
Definition: GenABIO.cc:224
std::string substructure(int detid)
const SiPixelQuality * badPixelInfo_
const SiPixelFedCabling * cablingMap_
const TrackerGeometry * trackerGeometry_
void dqmEndRun(const edm::Run &, const edm::EventSetup &) final
SiPixelStatusHarvester(const edm::ParameterSet &)
double b
Definition: hdecay.h:118
double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus)
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
std::vector< std::string > substructures
double a
Definition: hdecay.h:119
void constructTag(std::map< int, SiPixelQuality * > siPixelQualityTag, edm::Service< cond::service::PoolDBOutputService > &poolDbService, std::string tagName, edm::Run const &iRun)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) final
Definition: Run.h:45