CMS 3D CMS Logo

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

#include <HFRaddamTask.h>

Inheritance diagram for HFRaddamTask:
hcaldqm::DQTask DQMEDAnalyzer hcaldqm::DQModule edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 HFRaddamTask (edm::ParameterSet const &)
 
 ~HFRaddamTask () override
 
- Public Member Functions inherited from hcaldqm::DQTask
void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQTask (edm::ParameterSet const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 ~DQTask () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- 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 ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) 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

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

edm::InputTag _tagHF
 
edm::InputTag _taguMN
 
edm::EDGetTokenT< HFDigiCollection_tokHF
 
edm::EDGetTokenT< HcalUMNioDigi_tokuMN
 
std::vector< hcaldqm::ContainerSingle1D_vcShape
 
std::vector< HcalDetId_vDetIds
 
- Protected Attributes inherited from hcaldqm::DQTask
ContainerI _cEvsPerLS
 
ContainerI _cEvsTotal
 
ContainerS _cProcessingTypeName
 
ContainerS _cRunKeyName
 
ContainerI _cRunKeyVal
 
edm::ESHandle< HcalDbService_dbService
 
HcalElectronicsMap const * _emap
 
int _procLSs
 
edm::InputTag _tagRaw
 
edm::EDGetTokenT< FEDRawDataCollection_tokRaw
 
std::vector< uint32_t > _vcdaqEids
 
ContainerXXX< uint32_t > _xQuality
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
- 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::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
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)
 

Detailed Description

Definition at line 18 of file HFRaddamTask.h.

Constructor & Destructor Documentation

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

Definition at line 8 of file HFRaddamTask.cc.

References _tagHF, _taguMN, _tokHF, _tokuMN, _vDetIds, edm::ParameterSet::getUntrackedParameter(), and HcalForward.

8  :
9  DQTask(ps)
10 {
11  // List all the DetIds
12  _vDetIds.push_back(HcalDetId(HcalForward, -30, 35, 1));
13  _vDetIds.push_back(HcalDetId(HcalForward, -30, 71, 1));
14  _vDetIds.push_back(HcalDetId(HcalForward, -32, 15, 1));
15  _vDetIds.push_back(HcalDetId(HcalForward, -32, 51, 1));
16  _vDetIds.push_back(HcalDetId(HcalForward, -34, 35, 1));
17  _vDetIds.push_back(HcalDetId(HcalForward, -34, 71, 1));
18  _vDetIds.push_back(HcalDetId(HcalForward, -36, 15, 1));
19  _vDetIds.push_back(HcalDetId(HcalForward, -36, 51, 1));
20  _vDetIds.push_back(HcalDetId(HcalForward, -38, 35, 1));
21  _vDetIds.push_back(HcalDetId(HcalForward, -38, 71, 1));
22  _vDetIds.push_back(HcalDetId(HcalForward, -40, 15, 1));
23  _vDetIds.push_back(HcalDetId(HcalForward, -40, 51, 1));
24  _vDetIds.push_back(HcalDetId(HcalForward, -41, 35, 1));
25  _vDetIds.push_back(HcalDetId(HcalForward, -41, 71, 1));
26  _vDetIds.push_back(HcalDetId(HcalForward, -30, 15, 2));
27  _vDetIds.push_back(HcalDetId(HcalForward, -30, 51, 2));
28  _vDetIds.push_back(HcalDetId(HcalForward, -32, 35, 2));
29  _vDetIds.push_back(HcalDetId(HcalForward, -32, 71, 2));
30  _vDetIds.push_back(HcalDetId(HcalForward, -34, 15, 2));
31  _vDetIds.push_back(HcalDetId(HcalForward, -34, 51, 2));
32  _vDetIds.push_back(HcalDetId(HcalForward, -36, 35, 2));
33  _vDetIds.push_back(HcalDetId(HcalForward, -36, 71, 2));
34  _vDetIds.push_back(HcalDetId(HcalForward, -38, 15, 2));
35  _vDetIds.push_back(HcalDetId(HcalForward, -38, 51, 2));
36  _vDetIds.push_back(HcalDetId(HcalForward, -40, 35, 2));
37  _vDetIds.push_back(HcalDetId(HcalForward, -40, 71, 2));
38  _vDetIds.push_back(HcalDetId(HcalForward, -41, 15, 2));
39  _vDetIds.push_back(HcalDetId(HcalForward, -41, 51, 2));
40 
41  _vDetIds.push_back(HcalDetId(HcalForward, 30, 21, 1));
42  _vDetIds.push_back(HcalDetId(HcalForward, 30, 57, 1));
43  _vDetIds.push_back(HcalDetId(HcalForward, 32, 1, 1));
44  _vDetIds.push_back(HcalDetId(HcalForward, 32, 37, 1));
45  _vDetIds.push_back(HcalDetId(HcalForward, 34, 21, 1));
46  _vDetIds.push_back(HcalDetId(HcalForward, 34, 57, 1));
47  _vDetIds.push_back(HcalDetId(HcalForward, 36, 1, 1));
48  _vDetIds.push_back(HcalDetId(HcalForward, 36, 37, 1));
49  _vDetIds.push_back(HcalDetId(HcalForward, 38, 21, 1));
50  _vDetIds.push_back(HcalDetId(HcalForward, 38, 57, 1));
51  _vDetIds.push_back(HcalDetId(HcalForward, 40, 35, 1));
52  _vDetIds.push_back(HcalDetId(HcalForward, 40, 71, 1));
53  _vDetIds.push_back(HcalDetId(HcalForward, 41, 19, 1));
54  _vDetIds.push_back(HcalDetId(HcalForward, 41, 55, 1));
55  _vDetIds.push_back(HcalDetId(HcalForward, 30, 1, 2));
56  _vDetIds.push_back(HcalDetId(HcalForward, 30, 37, 2));
57  _vDetIds.push_back(HcalDetId(HcalForward, 32, 21, 2));
58  _vDetIds.push_back(HcalDetId(HcalForward, 32, 57, 2));
59  _vDetIds.push_back(HcalDetId(HcalForward, 34, 1, 2));
60  _vDetIds.push_back(HcalDetId(HcalForward, 34, 37, 2));
61  _vDetIds.push_back(HcalDetId(HcalForward, 36, 21, 2));
62  _vDetIds.push_back(HcalDetId(HcalForward, 36, 57, 2));
63  _vDetIds.push_back(HcalDetId(HcalForward, 38, 1, 2));
64  _vDetIds.push_back(HcalDetId(HcalForward, 38, 37, 2));
65  _vDetIds.push_back(HcalDetId(HcalForward, 40, 19, 2));
66  _vDetIds.push_back(HcalDetId(HcalForward, 40, 55, 2));
67  _vDetIds.push_back(HcalDetId(HcalForward, 41, 35, 2));
68  _vDetIds.push_back(HcalDetId(HcalForward, 41, 71, 2));
69 
70  // tags
71  _tagHF = ps.getUntrackedParameter<edm::InputTag>("tagHF",
72  edm::InputTag("hcalDigis"));
73  _taguMN = ps.getUntrackedParameter<edm::InputTag>("taguMN",
74  edm::InputTag("hcalDigis"));
75  _tokHF = consumes<HFDigiCollection>(_tagHF);
76  _tokuMN = consumes<HcalUMNioDigi>(_taguMN);
77 }
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:7
edm::InputTag _taguMN
Definition: HFRaddamTask.h:35
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
Definition: HFRaddamTask.h:37
edm::InputTag _tagHF
Definition: HFRaddamTask.h:34
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: HFRaddamTask.h:36
std::vector< HcalDetId > _vDetIds
Definition: HFRaddamTask.h:40
HFRaddamTask::~HFRaddamTask ( )
inlineoverride

Definition at line 22 of file HFRaddamTask.h.

References _isApplicable(), _process(), and bookHistograms().

23  {}

Member Function Documentation

bool HFRaddamTask::_isApplicable ( edm::Event const &  e)
overrideprotectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 124 of file HFRaddamTask.cc.

References hcaldqm::DQModule::_ptype, _tokuMN, DEFINE_FWK_MODULE, HcalUMNioDigi::eventType(), hcaldqm::constants::EVENTTYPE_LASER, hcaldqm::fOnline, edm::Event::getByToken(), hcaldqm::constants::tHFRaddam, and HcalUMNioDigi::valueUserWord().

Referenced by ~HFRaddamTask().

125 {
126  if (_ptype==fOnline)
127  {
129  if (!e.getByToken(_tokuMN, cumn))
130  return false;
131 
132  // event type check first
133  uint8_t eventType = cumn->eventType();
134  if (eventType!=constants::EVENTTYPE_LASER)
135  return false;
136 
137  // check if this analysis task is of the right laser type
138  uint32_t laserType = cumn->valueUserWord(0);
139  if (laserType==constants::tHFRaddam) return true;
140  }
141  else
142  {
143  // local, just return true as all the settings will be done in cfg
144  return true;
145  }
146 
147  return false;
148 }
ProcessingType _ptype
Definition: DQModule.h:59
uint32_t valueUserWord(int iword) const
uint8_t eventType() const
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
Definition: HFRaddamTask.h:37
uint8_t const EVENTTYPE_LASER
Definition: Constants.h:324
void HFRaddamTask::_process ( edm::Event const &  e,
edm::EventSetup const &  es 
)
overrideprotectedvirtual

Implements hcaldqm::DQTask.

Definition at line 102 of file HFRaddamTask.cc.

References hcaldqm::DQModule::_logger, _tagHF, _tokHF, _vcShape, _vDetIds, edm::SortedCollection< T, SORT >::begin(), Logger::dqmthrow(), edm::SortedCollection< T, SORT >::end(), lumiContext::fill, edm::Event::getByToken(), mps_fire::i, HFDataFrame::id(), edm::InputTag::instance(), edm::InputTag::label(), HcalQIESample::nominal_fC(), HFDataFrame::sample(), and HFDataFrame::size().

Referenced by ~HFRaddamTask().

104 {
106  if (!e.getByToken(_tokHF, chf))
107  _logger.dqmthrow("Collection HFDigiCollection isn't avalaible"
108  + _tagHF.label() + " " + _tagHF.instance());
109 
110  for (HFDigiCollection::const_iterator it=chf->begin();
111  it!=chf->end(); ++it)
112  {
113  const HFDataFrame digi = (const HFDataFrame)(*it);
114  for (unsigned int i=0; i<_vDetIds.size(); i++)
115  if (digi.id()==_vDetIds[i])
116  {
117  for (int j=0; j<digi.size(); j++)
118  _vcShape[i].fill(j,
119  digi.sample(j).nominal_fC()-2.5);
120  }
121  }
122 }
std::vector< HFDataFrame >::const_iterator const_iterator
std::vector< hcaldqm::ContainerSingle1D > _vcShape
Definition: HFRaddamTask.h:47
HcalQIESample const & sample(int i) const
access a sample
Definition: HFDataFrame.h:43
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
HcalDetId const & id() const
Definition: HFDataFrame.h:26
Logger _logger
Definition: DQModule.h:70
constexpr double nominal_fC() const
get the nominal FC (no calibrations applied)
Definition: HcalQIESample.h:61
const_iterator end() const
edm::InputTag _tagHF
Definition: HFRaddamTask.h:34
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:30
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: HFRaddamTask.h:36
std::string const & label() const
Definition: InputTag.h:36
std::string const & instance() const
Definition: InputTag.h:37
std::vector< HcalDetId > _vDetIds
Definition: HFRaddamTask.h:40
const_iterator begin() const
void HFRaddamTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 79 of file HFRaddamTask.cc.

References hcaldqm::DQModule::_name, hcaldqm::DQModule::_subsystem, _vcShape, _vDetIds, printConversionInfo::aux, bookHistograms(), egammaForCoreTracking_cff::depth, hcaldqm::quantity::ffC_3000, hcaldqm::quantity::fTiming_TS, and mps_fire::i.

Referenced by ~HFRaddamTask().

81 {
82  // Initialize all the Single Containers
83  for (std::vector<HcalDetId>::const_iterator it=_vDetIds.begin();
84  it!=_vDetIds.end(); ++it)
85  {
86  _vcShape.push_back(ContainerSingle1D(_name,
87  "Shape",
90  }
91 
92  DQTask::bookHistograms(ib, r, es);
93  char aux[200];
94  for (unsigned int i=0; i<_vDetIds.size(); i++)
95  {
96  sprintf(aux, "ieta%diphi%dd%d", _vDetIds[i].ieta(),
97  _vDetIds[i].iphi(), _vDetIds[i].depth());
98  _vcShape[i].book(ib, _subsystem, aux);
99  }
100 }
std::vector< hcaldqm::ContainerSingle1D > _vcShape
Definition: HFRaddamTask.h:47
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
std::string _name
Definition: DQModule.h:57
std::string _subsystem
Definition: DQModule.h:64
std::vector< HcalDetId > _vDetIds
Definition: HFRaddamTask.h:40

Member Data Documentation

edm::InputTag HFRaddamTask::_tagHF
protected

Definition at line 34 of file HFRaddamTask.h.

Referenced by _process(), and HFRaddamTask().

edm::InputTag HFRaddamTask::_taguMN
protected

Definition at line 35 of file HFRaddamTask.h.

Referenced by HFRaddamTask().

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

Definition at line 36 of file HFRaddamTask.h.

Referenced by _process(), and HFRaddamTask().

edm::EDGetTokenT<HcalUMNioDigi> HFRaddamTask::_tokuMN
protected

Definition at line 37 of file HFRaddamTask.h.

Referenced by _isApplicable(), and HFRaddamTask().

std::vector<hcaldqm::ContainerSingle1D> HFRaddamTask::_vcShape
protected

Definition at line 47 of file HFRaddamTask.h.

Referenced by _process(), and bookHistograms().

std::vector<HcalDetId> HFRaddamTask::_vDetIds
protected

Definition at line 40 of file HFRaddamTask.h.

Referenced by _process(), bookHistograms(), and HFRaddamTask().