CMS 3D CMS Logo

SiPixelCertification.cc
Go to the documentation of this file.
2 
6 
8 
12 
13 #include <cmath>
14 #include <cstdio>
15 #include <iomanip>
16 #include <iostream>
17 #include <sstream>
18 #include <string>
19 
20 using namespace std;
21 using namespace edm;
23  edm::LogInfo("SiPixelCertification") << "SiPixelCertification::Creating SiPixelCertification ";
24  firstLumi = true;
25 }
26 
28  edm::LogInfo("SiPixelCertification") << "SiPixelCertification::Deleting SiPixelCertification ";
29 }
30 
32  DQMStore::IGetter &iGetter,
33  const edm::LuminosityBlock &lumiBlock,
34  const edm::EventSetup &iSetup) {
35  // cout<<"Entering SiPixelCertification::endLuminosityBlock: "<<endl;
36 
37  // If first run, book some histograms
38  if (firstLumi) {
39  iBooker.setCurrentFolder("Pixel/EventInfo");
40  CertificationPixel = iBooker.bookFloat("CertificationSummary");
41  iBooker.setCurrentFolder("Pixel/EventInfo/CertificationContents");
42  CertificationBarrel = iBooker.bookFloat("PixelBarrelFraction");
43  CertificationEndcap = iBooker.bookFloat("PixelEndcapFraction");
44 
45  CertificationPixel->Fill(1.);
46  CertificationBarrel->Fill(1.);
47  CertificationEndcap->Fill(1.);
48 
49  firstLumi = false;
50  }
51 
52  edm::LogInfo("SiPixelCertification") << "SiPixelCertification::endLuminosityBlock ";
53  // Compute and fill overall certification bits, for now use smallest single
54  // value:
55  float dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSSummary"))->getFloatValue();
56  float daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQSummary"))->getFloatValue();
57  float dqmFrac = (iGetter.getElement("Pixel/EventInfo/reportSummary"))->getFloatValue();
58  float pixel_all = std::min(dcsFrac, daqFrac);
59  pixel_all = std::min(pixel_all, dqmFrac);
60  // std::cout<<"Pixel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" ,
61  // "<<pixel_all<<std::endl;
62  CertificationPixel = iGetter.getElement("Pixel/EventInfo/CertificationSummary");
63  if (CertificationPixel)
64  CertificationPixel->Fill(pixel_all);
65 
66  dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
67  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
68  dqmFrac = (iGetter.getElement("Pixel/EventInfo/reportSummaryContents/PixelBarrelFraction"))->getFloatValue();
69  float pixel_barrel = std::min(dcsFrac, daqFrac);
70  pixel_barrel = std::min(pixel_barrel, dqmFrac);
71  // std::cout<<"Barrel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" ,
72  // "<<pixel_barrel<<std::endl;
73  CertificationBarrel = iGetter.getElement("Pixel/EventInfo/CertificationContents/PixelBarrelFraction");
74  if (CertificationBarrel)
75  CertificationBarrel->Fill(pixel_barrel);
76 
77  dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
78  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
79  dqmFrac = (iGetter.getElement("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction"))->getFloatValue();
80  float pixel_endcap = std::min(dcsFrac, daqFrac);
81  pixel_endcap = std::min(pixel_endcap, dqmFrac);
82  // std::cout<<"Endcap numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" ,
83  // "<<pixel_endcap<<std::endl;
84  CertificationEndcap = iGetter.getElement("Pixel/EventInfo/CertificationContents/PixelEndcapFraction");
85  if (CertificationEndcap)
86  CertificationEndcap->Fill(pixel_endcap);
87 }
88 
90  // cout<<"Entering SiPixelCertification::endRun: "<<endl;
91  edm::LogInfo("SiPixelCertification") << "SiPixelCertification::endRun ";
92  // Compute and fill overall certification bits, for now use smallest single
93  // value:
94  float dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSSummary"))->getFloatValue();
95  float daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQSummary"))->getFloatValue();
96  float dqmFrac = (iGetter.getElement("Pixel/EventInfo/reportSummary"))->getFloatValue();
97  float pixel_all = std::min(dcsFrac, daqFrac);
98  pixel_all = std::min(pixel_all, dqmFrac);
99  // std::cout<<"Pixel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" ,
100  // "<<pixel_all<<std::endl;
101  if (CertificationPixel)
102  CertificationPixel->Fill(pixel_all);
103 
104  dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
105  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
106  dqmFrac = (iGetter.getElement("Pixel/EventInfo/reportSummaryContents/PixelBarrelFraction"))->getFloatValue();
107  float pixel_barrel = std::min(dcsFrac, daqFrac);
108  pixel_barrel = std::min(pixel_barrel, dqmFrac);
109  // std::cout<<"Barrel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" ,
110  // "<<pixel_barrel<<std::endl;
111  if (CertificationBarrel)
112  CertificationBarrel->Fill(pixel_barrel);
113 
114  dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
115  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
116  dqmFrac = (iGetter.getElement("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction"))->getFloatValue();
117  float pixel_endcap = std::min(dcsFrac, daqFrac);
118  pixel_endcap = std::min(pixel_endcap, dqmFrac);
119  // std::cout<<"Endcap numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" ,
120  // "<<pixel_endcap<<std::endl;
121  if (CertificationEndcap)
122  CertificationEndcap->Fill(pixel_endcap);
123 }
MessageLogger.h
RunSummaryRcd.h
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
min
T min(T a, T b)
Definition: MathUtil.h:58
edm
HLT enums.
Definition: AlignableModifier.h:19
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
SiPixelCertification::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: SiPixelCertification.cc:31
DQMStore.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiPixelCertification.h
Service.h
SiPixelCertification::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: SiPixelCertification.cc:89
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ParameterSet
Definition: ParameterSet.h:47
edm::EventSetup
Definition: EventSetup.h:57
RunSummary.h
RunInfo.h
std
Definition: JetResolutionObject.h:76
SiPixelCertification::~SiPixelCertification
~SiPixelCertification() override
Definition: SiPixelCertification.cc:27
dqm::implementation::IGetter
Definition: DQMStore.h:484
SiPixelCertification::SiPixelCertification
SiPixelCertification(const edm::ParameterSet &)
Definition: SiPixelCertification.cc:22
dqm::implementation::IBooker
Definition: DQMStore.h:43
dqm::implementation::IGetter::getElement
virtual DQM_DEPRECATED MonitorElement * getElement(std::string const &path) const
Definition: DQMStore.cc:670
ParameterSet.h