CMS 3D CMS Logo

SiPixelStatusHarvester.h
Go to the documentation of this file.
1 #ifndef SiPixelStatusHarvester_H
2 #define SiPixelStatusHarvester_H
3 
11 
21 
22 // Pixel quality harvester
24 // PixelDQM Framework
26 // PixelPhase1 HelperClass
28 
29 // Threshold testing
30 #include "TH1.h"
31 #include "TFile.h"
32 
33 class SiPixelStatusHarvester : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks>,
34  private HistogramManagerHolder {
36 
37 public:
38  // Constructor
40 
41  // Destructor
42  ~SiPixelStatusHarvester() override;
43 
44  // Operations
45  void beginJob() override;
46  void bookHistograms(DQMStore::IBooker& iBooker, edm::Run const&, const edm::EventSetup&) final;
47  void dqmEndRun(const edm::Run&, const edm::EventSetup&) final;
48  void analyze(const edm::Event& iEvent, const edm::EventSetup&) final;
49 
51  void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final;
52 
53 private:
54  // Parameters
58  int nLumi_;
61  // harvest helper classs that setup the IOV structure
63  // debug mode
64  bool debug_;
65  // for DB output naming
67 
68  // permanent known bad components
70 
71  // totoal number of lumi blocks with non-zero pixel DIGIs
72  int countLumi_ = 0;
73  // last lumi section of the SiPixeDetectorStatus data
75 
77  const SiPixelFedCabling* cablingMap_ = nullptr;
78  std::map<int, unsigned int> sensorSize_;
79 
81 
82  // pixel online to offline pixel row/column
83  std::map<int, std::map<int, std::pair<int, int> > > pixelO2O_;
84 
89 
90  //Helper functions
91  std::vector<std::string> substructures;
92  double perLayerRingAverage(int detid, SiPixelDetectorStatus tmpSiPixelStatus);
93  std::string substructure(int detid);
94 
95  // "step function" for IOV
97  std::map<edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t> IOV);
98 
99  // boolean function to check whether two SiPixelQualitys (pyloads) are identical
101 
102  // Tag constructor
103  void constructTag(std::map<int, SiPixelQuality> siPixelQualityTag,
106  edm::Run const& iRun);
107 };
108 
109 #endif
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
std::map< int, unsigned int > sensorSize_
edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityToken_
void constructTag(std::map< int, SiPixelQuality > siPixelQualityTag, edm::Service< cond::service::PoolDBOutputService > &poolDbService, std::string tagName, edm::Run const &iRun)
edm::LuminosityBlockNumber_t endLumiBlock_
void bookHistograms(DQMStore::IBooker &iBooker, edm::Run const &, const edm::EventSetup &) final
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
void analyze(const edm::Event &iEvent, const edm::EventSetup &) final
edm::LuminosityBlockNumber_t stepIOV(edm::LuminosityBlockNumber_t pin, std::map< edm::LuminosityBlockNumber_t, edm::LuminosityBlockNumber_t > IOV)
unsigned int LuminosityBlockNumber_t
SiPixelStatusManager siPixelStatusManager_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapToken_
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_
bool equal(SiPixelQuality a, SiPixelQuality b)
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)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
std::vector< std::string > substructures
double a
Definition: hdecay.h:119
Definition: Run.h:45