CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiPixelCertification Class Reference

#include <SiPixelCertification.h>

Inheritance diagram for SiPixelCertification:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SiPixelCertification (const edm::ParameterSet &)
 
 ~SiPixelCertification ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, const edm::LuminosityBlock &, const edm::EventSetup &) override
 

Private Attributes

MonitorElementCertificationBarrel
 
MonitorElementCertificationEndcap
 
MonitorElementCertificationPixel
 
bool firstLumi
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 26 of file SiPixelCertification.h.

Constructor & Destructor Documentation

SiPixelCertification::SiPixelCertification ( const edm::ParameterSet ps)
explicit

Definition at line 23 of file SiPixelCertification.cc.

23  {
24  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::Creating SiPixelCertification ";
25  firstLumi = true;
26 }
SiPixelCertification::~SiPixelCertification ( )

Definition at line 28 of file SiPixelCertification.cc.

28  {
29  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::Deleting SiPixelCertification ";
30 }

Member Function Documentation

void SiPixelCertification::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 82 of file SiPixelCertification.cc.

References DQMStore::IGetter::get(), and min().

82  {
83 //cout<<"Entering SiPixelCertification::endRun: "<<endl;
84  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::endRun ";
85  // Compute and fill overall certification bits, for now use smallest single value:
86  float dcsFrac = (iGetter.get("Pixel/EventInfo/DCSSummary"))->getFloatValue();
87  float daqFrac = (iGetter.get("Pixel/EventInfo/DAQSummary"))->getFloatValue();
88  float dqmFrac = (iGetter.get("Pixel/EventInfo/reportSummary"))->getFloatValue();
89  float pixel_all = std::min(dcsFrac,daqFrac);
90  pixel_all = std::min(pixel_all,dqmFrac);
91 //std::cout<<"Pixel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_all<<std::endl;
93 
94  dcsFrac = (iGetter.get("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
95  daqFrac = (iGetter.get("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
96  dqmFrac = (iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelBarrelFraction"))->getFloatValue();
97  float pixel_barrel = std::min(dcsFrac,daqFrac);
98  pixel_barrel = std::min(pixel_barrel,dqmFrac);
99 //std::cout<<"Barrel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_barrel<<std::endl;
100  if(CertificationBarrel) CertificationBarrel->Fill(pixel_barrel);
101 
102  dcsFrac = (iGetter.get("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
103  daqFrac = (iGetter.get("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
104  dqmFrac = (iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction"))->getFloatValue();
105  float pixel_endcap = std::min(dcsFrac,daqFrac);
106  pixel_endcap = std::min(pixel_endcap,dqmFrac);
107 //std::cout<<"Endcap numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_endcap<<std::endl;
108  if(CertificationEndcap) CertificationEndcap->Fill(pixel_endcap);
109 
110 }
MonitorElement * CertificationPixel
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:301
void Fill(long long x)
MonitorElement * CertificationBarrel
T min(T a, T b)
Definition: MathUtil.h:58
MonitorElement * CertificationEndcap
void SiPixelCertification::dqmEndLuminosityBlock ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 32 of file SiPixelCertification.cc.

References DQMStore::IBooker::bookFloat(), MonitorElement::Fill(), DQMStore::IGetter::get(), min(), and DQMStore::IBooker::setCurrentFolder().

32  {
33 //cout<<"Entering SiPixelCertification::endLuminosityBlock: "<<endl;
34 
35  //If first run, book some histograms
36  if (firstLumi){
37  iBooker.setCurrentFolder("Pixel/EventInfo");
38  CertificationPixel= iBooker.bookFloat("CertificationSummary");
39  iBooker.setCurrentFolder("Pixel/EventInfo/CertificationContents");
40  CertificationBarrel= iBooker.bookFloat("PixelBarrelFraction");
41  CertificationEndcap= iBooker.bookFloat("PixelEndcapFraction");
42 
46 
47  firstLumi = false;
48  }
49 
50  edm::LogInfo( "SiPixelCertification") << "SiPixelCertification::endLuminosityBlock ";
51  // Compute and fill overall certification bits, for now use smallest single value:
52  float dcsFrac = (iGetter.get("Pixel/EventInfo/DCSSummary"))->getFloatValue();
53  float daqFrac = (iGetter.get("Pixel/EventInfo/DAQSummary"))->getFloatValue();
54  float dqmFrac = (iGetter.get("Pixel/EventInfo/reportSummary"))->getFloatValue();
55  float pixel_all = std::min(dcsFrac,daqFrac);
56  pixel_all = std::min(pixel_all,dqmFrac);
57 //std::cout<<"Pixel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_all<<std::endl;
58  CertificationPixel = iGetter.get("Pixel/EventInfo/CertificationSummary");
60 
61  dcsFrac = (iGetter.get("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
62  daqFrac = (iGetter.get("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
63  dqmFrac = (iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelBarrelFraction"))->getFloatValue();
64  float pixel_barrel = std::min(dcsFrac,daqFrac);
65  pixel_barrel = std::min(pixel_barrel,dqmFrac);
66 //std::cout<<"Barrel numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_barrel<<std::endl;
67  CertificationBarrel = iGetter.get("Pixel/EventInfo/CertificationContents/PixelBarrelFraction");
68  if(CertificationBarrel) CertificationBarrel->Fill(pixel_barrel);
69 
70  dcsFrac = (iGetter.get("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
71  daqFrac = (iGetter.get("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
72  dqmFrac = (iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction"))->getFloatValue();
73  float pixel_endcap = std::min(dcsFrac,daqFrac);
74  pixel_endcap = std::min(pixel_endcap,dqmFrac);
75 //std::cout<<"Endcap numbers: "<<dcsFrac<<" , "<<daqFrac<<" , "<<dqmFrac<<" , "<<pixel_endcap<<std::endl;
76  CertificationEndcap = iGetter.get("Pixel/EventInfo/CertificationContents/PixelEndcapFraction");
77  if(CertificationEndcap) CertificationEndcap->Fill(pixel_endcap);
78 
79 }
MonitorElement * CertificationPixel
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:301
void Fill(long long x)
MonitorElement * CertificationBarrel
T min(T a, T b)
Definition: MathUtil.h:58
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
MonitorElement * CertificationEndcap
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109

Member Data Documentation

MonitorElement* SiPixelCertification::CertificationBarrel
private

Definition at line 39 of file SiPixelCertification.h.

MonitorElement* SiPixelCertification::CertificationEndcap
private

Definition at line 40 of file SiPixelCertification.h.

MonitorElement* SiPixelCertification::CertificationPixel
private

Definition at line 38 of file SiPixelCertification.h.

bool SiPixelCertification::firstLumi
private

Definition at line 36 of file SiPixelCertification.h.