CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
NoCQTask Class Reference

#include <NoCQTask.h>

Inheritance diagram for NoCQTask:
hcaldqm::DQTask DQMEDAnalyzer hcaldqm::DQModule edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
 NoCQTask (edm::ParameterSet const &)
 
virtual ~NoCQTask ()
 
- Public Member Functions inherited from hcaldqm::DQTask
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQTask (edm::ParameterSet const &)
 
virtual ~DQTask ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::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 ()
 
 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 & itemsToGetFromEvent () 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)
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule ()(false)
 

Protected Member Functions

virtual void _process (edm::Event const &, edm::EventSetup const &)
 
virtual void _resetMonitors (hcaldqm::UpdateFreq)
 
- Protected Member Functions inherited from hcaldqm::DQTask
virtual int _getCalibType (edm::Event const &)
 
virtual bool _isApplicable (edm::Event const &)
 
- 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)
 

Protected Attributes

hcaldqm::Container2D _cBadQuality_depth
 
hcaldqm::Container2D _cOccupancy_depth
 
hcaldqm::Container2D _cOccupancyCut_depth
 
hcaldqm::ContainerProf2D _cTimingCut_depth
 
double _cutSumQ_HBHE
 
double _cutSumQ_HF
 
double _cutSumQ_HO
 
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
 
HcalElectronicsMap const * _emap
 
edm::InputTag _tagHBHE
 
edm::InputTag _tagHF
 
edm::InputTag _tagHO
 
edm::InputTag _tagReport
 
edm::EDGetTokenT< HBHEDigiCollection_tokHBHE
 
edm::EDGetTokenT< HFDigiCollection_tokHF
 
edm::EDGetTokenT< HODigiCollection_tokHO
 
edm::EDGetTokenT< HcalUnpackerReport_tokReport
 
- Protected Attributes inherited from hcaldqm::DQTask
ContainerI _cEvsPerLS
 
ContainerI _cEvsTotal
 
ContainerS _cProcessingTypeName
 
ContainerS _cRunKeyName
 
ContainerI _cRunKeyVal
 
int _procLSs
 
edm::InputTag _tagRaw
 
edm::EDGetTokenT< FEDRawDataCollection_tokRaw
 
std::vector< uint32_t > _vcdaqEids
 
ContainerXXX< uint32_t > _xQuality
 
- Protected Attributes inherited from hcaldqm::DQModule
int _currentLS
 
int _debug
 
int _evsPerLS
 
int _evsTotal
 
Logger _logger
 
int _maxLS
 
ModuleType _mtype
 
std::string _name
 
ProcessingType _ptype
 
std::string _runkeyName
 
int _runkeyVal
 
std::string _subsystem
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 17 of file NoCQTask.h.

Constructor & Destructor Documentation

NoCQTask::NoCQTask ( edm::ParameterSet const &  ps)

Definition at line 6 of file NoCQTask.cc.

References _cutSumQ_HBHE, _cutSumQ_HF, _cutSumQ_HO, _tagHBHE, _tagHF, _tagHO, _tagReport, _tokHBHE, _tokHF, _tokHO, _tokReport, and edm::ParameterSet::getUntrackedParameter().

6  :
7  DQTask(ps)
8 {
9  _tagHBHE = ps.getUntrackedParameter<edm::InputTag>("tagHBHE",
10  edm::InputTag("hcalDigis"));
11  _tagHO = ps.getUntrackedParameter<edm::InputTag>("tagHO",
12  edm::InputTag("hcalDigis"));
13  _tagHF = ps.getUntrackedParameter<edm::InputTag>("tagHF",
14  edm::InputTag("hcalDigis"));
15  _tagReport = ps.getUntrackedParameter<edm::InputTag>("tagReport",
16  edm::InputTag("hcalDigis"));
17 
18  _tokHBHE = consumes<HBHEDigiCollection>(_tagHBHE);
19  _tokHO = consumes<HODigiCollection>(_tagHO);
20  _tokHF = consumes<HFDigiCollection>(_tagHF);
21  _tokReport = consumes<HcalUnpackerReport>(_tagReport);
22 
23  _cutSumQ_HBHE = ps.getUntrackedParameter<double>("cutSumQ_HBHE", 20);
24  _cutSumQ_HO = ps.getUntrackedParameter<double>("cutSumQ_HO", 20);
25  _cutSumQ_HF = ps.getUntrackedParameter<double>("cutSumQ_HF", 20);
26 }
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:7
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: NoCQTask.h:40
edm::EDGetTokenT< HcalUnpackerReport > _tokReport
Definition: NoCQTask.h:41
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: NoCQTask.h:39
edm::InputTag _tagHF
Definition: NoCQTask.h:36
edm::InputTag _tagHBHE
Definition: NoCQTask.h:34
edm::InputTag _tagReport
Definition: NoCQTask.h:37
double _cutSumQ_HF
Definition: NoCQTask.h:43
edm::InputTag _tagHO
Definition: NoCQTask.h:35
double _cutSumQ_HO
Definition: NoCQTask.h:43
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: NoCQTask.h:38
double _cutSumQ_HBHE
Definition: NoCQTask.h:43
virtual NoCQTask::~NoCQTask ( )
inlinevirtual

Member Function Documentation

void NoCQTask::_process ( edm::Event const &  e,
edm::EventSetup const &   
)
protectedvirtual

Implements hcaldqm::DQTask.

Definition at line 69 of file NoCQTask.cc.

References _cBadQuality_depth, _cOccupancy_depth, _cOccupancyCut_depth, _cTimingCut_depth, _cutSumQ_HBHE, _cutSumQ_HF, _cutSumQ_HO, hcaldqm::DQModule::_logger, _tagHBHE, _tagHF, _tagHO, _tagReport, _tokHBHE, _tokHF, _tokHO, _tokReport, HcalUnpackerReport::bad_quality_begin(), HcalUnpackerReport::bad_quality_end(), edm::SortedCollection< T, SORT >::begin(), Logger::dqmthrow(), edm::SortedCollection< T, SORT >::end(), hcaldqm::Container2D::fill(), edm::Event::getByToken(), edm::InputTag::instance(), HcalGenericDetId::isHcalDetId(), edm::InputTag::label(), and hcaldqm::utilities::sumQ().

Referenced by ~NoCQTask().

71 {
76 
77  if (!e.getByToken(_tokHBHE, chbhe))
78  _logger.dqmthrow("Collection HBHEDigiCollection isn't available"
79  + _tagHBHE.label() + " " + _tagHBHE.instance());
80  if (!e.getByToken(_tokHO, cho))
81  _logger.dqmthrow("Collection HODigiCollection isn't available"
82  + _tagHO.label() + " " + _tagHO.instance());
83  if (!e.getByToken(_tokHF, chf))
84  _logger.dqmthrow("Collection HFDigiCollection isn't available"
85  + _tagHF.label() + " " + _tagHF.instance());
86  if (!e.getByToken(_tokReport, creport))
87  _logger.dqmthrow("Collection HcalUnpackerReport isn't available"+
89 
90  // RAW Bad Quality
91  for (std::vector<DetId>::const_iterator it=creport->bad_quality_begin();
92  it!=creport->bad_quality_end(); ++it)
93  {
94  if (!HcalGenericDetId(*it).isHcalDetId())
95  continue;
96 
98  }
99 
100  // DIGI HBH, HO, HF
101  for (HBHEDigiCollection::const_iterator it=chbhe->begin(); it!=chbhe->end();
102  ++it)
103  {
104  double sumQ = hcaldqm::utilities::sumQ<HBHEDataFrame>(*it, 2.5, 0, it->size()-1);
105  HcalDetId const& did = it->id();
106 
107  _cOccupancy_depth.fill(did);
108  if (sumQ>_cutSumQ_HBHE)
109  {
110  double timing = hcaldqm::utilities::aveTS<HBHEDataFrame>(*it, 2.5, 0,
111  it->size()-1);
113  _cTimingCut_depth.fill(did, timing);
114  }
115  }
116 
117  for (HODigiCollection::const_iterator it=cho->begin(); it!=cho->end();
118  ++it)
119  {
120  double sumQ = hcaldqm::utilities::sumQ<HODataFrame>(*it, 8.5, 0, it->size()-1);
121  HcalDetId const& did = it->id();
122 
123  _cOccupancy_depth.fill(did);
124  if (sumQ>_cutSumQ_HO)
125  {
126  double timing = hcaldqm::utilities::aveTS<HODataFrame>(*it, 8.5, 0,
127  it->size()-1);
129  _cTimingCut_depth.fill(did, timing);
130  }
131  }
132 
133  for (HFDigiCollection::const_iterator it=chf->begin(); it!=chf->end();
134  ++it)
135  {
136  double sumQ = hcaldqm::utilities::sumQ<HFDataFrame>(*it, 2.5, 0, it->size()-1);
137  HcalDetId const& did = it->id();
138 
139  _cOccupancy_depth.fill(did);
140  if (sumQ>_cutSumQ_HF)
141  {
142  double timing = hcaldqm::utilities::aveTS<HFDataFrame>(*it, 2.5, 0, it->size()-1);
144  _cTimingCut_depth.fill(did, timing);
145  }
146  }
147 }
hcaldqm::Container2D _cOccupancy_depth
Definition: NoCQTask.h:49
std::vector< HBHEDataFrame >::const_iterator const_iterator
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: NoCQTask.h:40
edm::EDGetTokenT< HcalUnpackerReport > _tokReport
Definition: NoCQTask.h:41
hcaldqm::ContainerProf2D _cTimingCut_depth
Definition: NoCQTask.h:48
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: NoCQTask.h:39
edm::InputTag _tagHF
Definition: NoCQTask.h:36
DetIdVector::const_iterator bad_quality_begin() const
Logger _logger
Definition: DQModule.h:70
edm::InputTag _tagHBHE
Definition: NoCQTask.h:34
bool isHcalDetId() const
const_iterator end() const
edm::InputTag _tagReport
Definition: NoCQTask.h:37
double _cutSumQ_HF
Definition: NoCQTask.h:43
hcaldqm::Container2D _cBadQuality_depth
Definition: NoCQTask.h:51
std::string const & label() const
Definition: InputTag.h:36
virtual void fill(HcalDetId const &) override
Definition: Container2D.cc:59
edm::InputTag _tagHO
Definition: NoCQTask.h:35
double _cutSumQ_HO
Definition: NoCQTask.h:43
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: NoCQTask.h:38
std::string const & instance() const
Definition: InputTag.h:37
hcaldqm::Container2D _cOccupancyCut_depth
Definition: NoCQTask.h:50
const_iterator begin() const
double _cutSumQ_HBHE
Definition: NoCQTask.h:43
DetIdVector::const_iterator bad_quality_end() const
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)
Definition: Utilities.h:79
void NoCQTask::_resetMonitors ( hcaldqm::UpdateFreq  uf)
protectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 64 of file NoCQTask.cc.

Referenced by ~NoCQTask().

65 {
66  DQTask::_resetMonitors(uf);
67 }
void NoCQTask::beginLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQTask.

Definition at line 149 of file NoCQTask.cc.

Referenced by ~NoCQTask().

151 {
152  DQTask::beginLuminosityBlock(lb, es);
153 }
void NoCQTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQTask.

Definition at line 28 of file NoCQTask.cc.

References _cBadQuality_depth, _cOccupancy_depth, _cOccupancyCut_depth, _cTimingCut_depth, _emap, hcaldqm::DQModule::_name, hcaldqm::DQModule::_subsystem, hcaldqm::ContainerProf2D::book(), hcaldqm::Container2D::book(), bookHistograms(), hcaldqm::hashfunctions::fdepth, hcaldqm::quantity::fieta, hcaldqm::quantity::fiphi, hcaldqm::quantity::fN, hcaldqm::quantity::fTiming_TS200, edm::EventSetup::get(), HcalDbService::getHcalMapping(), hcaldqm::ContainerProf2D::initialize(), and hcaldqm::Container2D::initialize().

Referenced by ~NoCQTask().

30 {
31  DQTask::bookHistograms(ib, r, es);
32 
34  es.get<HcalDbRecord>().get(dbs);
35  _emap = dbs->getHcalMapping();
36 
37  _cTimingCut_depth.initialize(_name, "TimingCut",
42  _cOccupancy_depth.initialize(_name, "Occupancy",
47  _cOccupancyCut_depth.initialize(_name, "OccupancyCut",
52  _cBadQuality_depth.initialize(_name, "BadQuality",
57 
62 }
hcaldqm::Container2D _cOccupancy_depth
Definition: NoCQTask.h:49
void bookHistograms(fwlite::EventContainer &eventCont)
HcalElectronicsMap const * _emap
Definition: NoCQTask.h:45
hcaldqm::ContainerProf2D _cTimingCut_depth
Definition: NoCQTask.h:48
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fEnergy), int debug=0)
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:32
std::string _name
Definition: DQModule.h:57
hcaldqm::Container2D _cBadQuality_depth
Definition: NoCQTask.h:51
const HcalElectronicsMap * getHcalMapping() const
std::string _subsystem
Definition: DQModule.h:64
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: Container2D.cc:895
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
hcaldqm::Container2D _cOccupancyCut_depth
Definition: NoCQTask.h:50
void NoCQTask::endLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQTask.

Definition at line 155 of file NoCQTask.cc.

References DEFINE_FWK_MODULE.

Referenced by ~NoCQTask().

157 {
158  DQTask::endLuminosityBlock(lb, es);
159 }

Member Data Documentation

hcaldqm::Container2D NoCQTask::_cBadQuality_depth
protected

Definition at line 51 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::Container2D NoCQTask::_cOccupancy_depth
protected

Definition at line 49 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::Container2D NoCQTask::_cOccupancyCut_depth
protected

Definition at line 50 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::ContainerProf2D NoCQTask::_cTimingCut_depth
protected

Definition at line 48 of file NoCQTask.h.

Referenced by _process(), and bookHistograms().

double NoCQTask::_cutSumQ_HBHE
protected

Definition at line 43 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

double NoCQTask::_cutSumQ_HF
protected

Definition at line 43 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

double NoCQTask::_cutSumQ_HO
protected

Definition at line 43 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

hcaldqm::electronicsmap::ElectronicsMap NoCQTask::_ehashmap
protected

Definition at line 46 of file NoCQTask.h.

HcalElectronicsMap const* NoCQTask::_emap
protected

Definition at line 45 of file NoCQTask.h.

Referenced by bookHistograms().

edm::InputTag NoCQTask::_tagHBHE
protected

Definition at line 34 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::InputTag NoCQTask::_tagHF
protected

Definition at line 36 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::InputTag NoCQTask::_tagHO
protected

Definition at line 35 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::InputTag NoCQTask::_tagReport
protected

Definition at line 37 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HBHEDigiCollection> NoCQTask::_tokHBHE
protected

Definition at line 38 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HFDigiCollection> NoCQTask::_tokHF
protected

Definition at line 40 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HODigiCollection> NoCQTask::_tokHO
protected

Definition at line 39 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().

edm::EDGetTokenT<HcalUnpackerReport> NoCQTask::_tokReport
protected

Definition at line 41 of file NoCQTask.h.

Referenced by _process(), and NoCQTask().