CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelCertification.cc
Go to the documentation of this file.
2 
6 
9 
13 
14 #include <iostream>
15 #include <iomanip>
16 #include <stdio.h>
17 #include <string>
18 #include <sstream>
19 #include <math.h>
20 
21 using namespace std;
22 using namespace edm;
24  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::Creating SiPixelCertification ";
25  dbe_ = 0;
27 }
28 
30  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::Deleting SiPixelCertification ";
31 }
32 
34  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::beginJob ";
35 
36  dbe_->setCurrentFolder("Pixel/EventInfo");
37  CertificationPixel= dbe_->bookFloat("CertificationSummary");
38  dbe_->setCurrentFolder("Pixel/EventInfo/CertificationContents");
39  CertificationBarrel= dbe_->bookFloat("PixelBarrelFraction");
40  CertificationEndcap= dbe_->bookFloat("PixelEndcapFraction");
41 
42  CertificationPixel->Fill(1.);
43  CertificationBarrel->Fill(1.);
44  CertificationEndcap->Fill(1.);
45 }
46 
47 
49  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::beginLuminosityBlock ";
50 }
51 
52 
54 //cout<<"Entering SiPixelCertification::endLuminosityBlock: "<<endl;
55  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::endLuminosityBlock ";
56  // Compute and fill overall certification bits, for now use smallest single value:
57  float dcsFrac = (dbe_->get("Pixel/EventInfo/DCSSummary"))->getFloatValue();
58  float daqFrac = (dbe_->get("Pixel/EventInfo/DAQSummary"))->getFloatValue();
59  float dqmFrac = (dbe_->get("Pixel/EventInfo/reportSummary"))->getFloatValue();
60  float pixel_all = std::min(dcsFrac,daqFrac);
61  pixel_all = std::min(pixel_all,dqmFrac);
62 //std::cout<<"Pixel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_all<<std::endl;
63  CertificationPixel = dbe_->get("Pixel/EventInfo/CertificationSummary");
64  if(CertificationPixel) CertificationPixel->Fill(pixel_all);
65 
66  dcsFrac = (dbe_->get("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
67  daqFrac = (dbe_->get("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
68  dqmFrac = (dbe_->get("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<<" , "<<pixel_barrel<<std::endl;
72  CertificationBarrel = dbe_->get("Pixel/EventInfo/CertificationContents/PixelBarrelFraction");
73  if(CertificationBarrel) CertificationBarrel->Fill(pixel_barrel);
74 
75  dcsFrac = (dbe_->get("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
76  daqFrac = (dbe_->get("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
77  dqmFrac = (dbe_->get("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction"))->getFloatValue();
78  float pixel_endcap = std::min(dcsFrac,daqFrac);
79  pixel_endcap = std::min(pixel_endcap,dqmFrac);
80 //std::cout<<"Endcap numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_endcap<<std::endl;
81  CertificationEndcap = dbe_->get("Pixel/EventInfo/CertificationContents/PixelEndcapFraction");
82  if(CertificationEndcap) CertificationEndcap->Fill(pixel_endcap);
83 
84 }
85 
86 
88 //cout<<"Entering SiPixelCertification::endRun: "<<endl;
89  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::endRun ";
90  // Compute and fill overall certification bits, for now use smallest single value:
91  float dcsFrac = (dbe_->get("Pixel/EventInfo/DCSSummary"))->getFloatValue();
92  float daqFrac = (dbe_->get("Pixel/EventInfo/DAQSummary"))->getFloatValue();
93  float dqmFrac = (dbe_->get("Pixel/EventInfo/reportSummary"))->getFloatValue();
94  float pixel_all = std::min(dcsFrac,daqFrac);
95  pixel_all = std::min(pixel_all,dqmFrac);
96 //std::cout<<"Pixel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_all<<std::endl;
97  CertificationPixel = dbe_->get("Pixel/EventInfo/CertificationSummary");
98  if(CertificationPixel) CertificationPixel->Fill(pixel_all);
99 
100  dcsFrac = (dbe_->get("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
101  daqFrac = (dbe_->get("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
102  dqmFrac = (dbe_->get("Pixel/EventInfo/reportSummaryContents/PixelBarrelFraction"))->getFloatValue();
103  float pixel_barrel = std::min(dcsFrac,daqFrac);
104  pixel_barrel = std::min(pixel_barrel,dqmFrac);
105 //std::cout<<"Barrel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_barrel<<std::endl;
106  CertificationBarrel = dbe_->get("Pixel/EventInfo/CertificationContents/PixelBarrelFraction");
107  if(CertificationBarrel) CertificationBarrel->Fill(pixel_barrel);
108 
109  dcsFrac = (dbe_->get("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
110  daqFrac = (dbe_->get("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
111  dqmFrac = (dbe_->get("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction"))->getFloatValue();
112  float pixel_endcap = std::min(dcsFrac,daqFrac);
113  pixel_endcap = std::min(pixel_endcap,dqmFrac);
114 //std::cout<<"Endcap numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_endcap<<std::endl;
115  CertificationEndcap = dbe_->get("Pixel/EventInfo/CertificationContents/PixelEndcapFraction");
116  if(CertificationEndcap) CertificationEndcap->Fill(pixel_endcap);
117 
118 }
119 
120 
122  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::endJob ";
123 }
124 
125 
126 
128  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::analyze ";
129 }
#define min(a, b)
Definition: mlp_lapack.h:161
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:654
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:243
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1468
DQMStore * dbe_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual void endRun(const edm::Run &, const edm::EventSetup &)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
Definition: Run.h:33
SiPixelCertification(const edm::ParameterSet &)