CMS 3D CMS Logo

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::EDProducer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources, edm::EndLuminosityBlockProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 SiPixelCertification (const edm::ParameterSet &)
 
 ~SiPixelCertification ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () override final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) override
 
virtual void produce (edm::Event &, edm::EventSetup const &) override final
 
virtual ~DQMEDHarvester ()=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources, edm::EndLuminosityBlockProducer >
 EDProducer ()=default
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
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::getElement(), 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.getElement("Pixel/EventInfo/DCSSummary"))->getFloatValue();
87  float daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQSummary"))->getFloatValue();
88  float dqmFrac = (iGetter.getElement("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.getElement("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
95  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
96  dqmFrac = (iGetter.getElement("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.getElement("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
103  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
104  dqmFrac = (iGetter.getElement("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 * getElement(const std::string &path)
Definition: DQMStore.cc:309
MonitorElement * CertificationPixel
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 
)
overrideprivate

Definition at line 32 of file SiPixelCertification.cc.

References DQMStore::IBooker::bookFloat(), MonitorElement::Fill(), DQMStore::IGetter::getElement(), 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.getElement("Pixel/EventInfo/DCSSummary"))->getFloatValue();
53  float daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQSummary"))->getFloatValue();
54  float dqmFrac = (iGetter.getElement("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.getElement("Pixel/EventInfo/CertificationSummary");
60 
61  dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSContents/PixelBarrelFraction"))->getFloatValue();
62  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelBarrelFraction"))->getFloatValue();
63  dqmFrac = (iGetter.getElement("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.getElement("Pixel/EventInfo/CertificationContents/PixelBarrelFraction");
68  if(CertificationBarrel) CertificationBarrel->Fill(pixel_barrel);
69 
70  dcsFrac = (iGetter.getElement("Pixel/EventInfo/DCSContents/PixelEndcapFraction"))->getFloatValue();
71  daqFrac = (iGetter.getElement("Pixel/EventInfo/DAQContents/PixelEndcapFraction"))->getFloatValue();
72  dqmFrac = (iGetter.getElement("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.getElement("Pixel/EventInfo/CertificationContents/PixelEndcapFraction");
77  if(CertificationEndcap) CertificationEndcap->Fill(pixel_endcap);
78 
79 }
MonitorElement * getElement(const std::string &path)
Definition: DQMStore.cc:309
MonitorElement * CertificationPixel
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:277
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.