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 one::DQMEDAnalyzer< one::DQMLuminosityBlockElements > hcaldqm::DQModule one::dqmimplementation::DQMBaseClass< T... >

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 bookHistograms (DQMStore::IBooker &, edm::Run 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 one::DQMEDAnalyzer< one::DQMLuminosityBlockElements >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 
- 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 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 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
 

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

Definition at line 21 of file HFRaddamTask.h.

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

21 {}

Member Function Documentation

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

Reimplemented from hcaldqm::DQTask.

Definition at line 107 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().

107  {
108  if (_ptype == fOnline) {
110  if (!e.getByToken(_tokuMN, cumn))
111  return false;
112 
113  // event type check first
114  uint8_t eventType = cumn->eventType();
115  if (eventType != constants::EVENTTYPE_LASER)
116  return false;
117 
118  // check if this analysis task is of the right laser type
119  uint32_t laserType = cumn->valueUserWord(0);
120  if (laserType == constants::tHFRaddam)
121  return true;
122  } else {
123  // local, just return true as all the settings will be done in cfg
124  return true;
125  }
126 
127  return false;
128 }
ProcessingType _ptype
Definition: DQModule.h:43
uint32_t valueUserWord(int iword) const
uint8_t eventType() const
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
Definition: HFRaddamTask.h:34
uint8_t const EVENTTYPE_LASER
Definition: Constants.h:280
void HFRaddamTask::_process ( edm::Event const &  e,
edm::EventSetup const &  es 
)
overrideprotectedvirtual

Implements hcaldqm::DQTask.

Definition at line 92 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().

92  {
94  if (!e.getByToken(_tokHF, chf))
95  _logger.dqmthrow("Collection HFDigiCollection isn't avalaible" + _tagHF.label() + " " + _tagHF.instance());
96 
97  for (HFDigiCollection::const_iterator it = chf->begin(); it != chf->end(); ++it) {
98  const HFDataFrame digi = (const HFDataFrame)(*it);
99  for (unsigned int i = 0; i < _vDetIds.size(); i++)
100  if (digi.id() == _vDetIds[i]) {
101  for (int j = 0; j < digi.size(); j++)
102  _vcShape[i].fill(j, digi.sample(j).nominal_fC() - 2.5);
103  }
104  }
105 }
std::vector< T >::const_iterator const_iterator
std::vector< hcaldqm::ContainerSingle1D > _vcShape
Definition: HFRaddamTask.h:44
HcalQIESample const & sample(int i) const
access a sample
Definition: HFDataFrame.h:43
void dqmthrow(std::string const &msg) const
Definition: Logger.h:12
HcalDetId const & id() const
Definition: HFDataFrame.h:26
Logger _logger
Definition: DQModule.h:54
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:31
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:30
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: HFRaddamTask.h:33
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:37
const_iterator begin() const
void HFRaddamTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
override

Definition at line 75 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().

75  {
76  // Initialize all the Single Containers
77  for (std::vector<HcalDetId>::const_iterator it = _vDetIds.begin(); it != _vDetIds.end(); ++it) {
79  "Shape",
82  }
83 
84  DQTask::bookHistograms(ib, r, es);
85  char aux[200];
86  for (unsigned int i = 0; i < _vDetIds.size(); i++) {
87  sprintf(aux, "ieta%diphi%dd%d", _vDetIds[i].ieta(), _vDetIds[i].iphi(), _vDetIds[i].depth());
88  _vcShape[i].book(ib, _subsystem, aux);
89  }
90 }
std::vector< hcaldqm::ContainerSingle1D > _vcShape
Definition: HFRaddamTask.h:44
std::string _name
Definition: DQModule.h:41
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
std::string _subsystem
Definition: DQModule.h:48
std::vector< HcalDetId > _vDetIds
Definition: HFRaddamTask.h:37

Member Data Documentation

edm::InputTag HFRaddamTask::_tagHF
protected

Definition at line 31 of file HFRaddamTask.h.

Referenced by _process(), and HFRaddamTask().

edm::InputTag HFRaddamTask::_taguMN
protected

Definition at line 32 of file HFRaddamTask.h.

Referenced by HFRaddamTask().

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

Definition at line 33 of file HFRaddamTask.h.

Referenced by _process(), and HFRaddamTask().

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

Definition at line 34 of file HFRaddamTask.h.

Referenced by _isApplicable(), and HFRaddamTask().

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

Definition at line 44 of file HFRaddamTask.h.

Referenced by _process(), and bookHistograms().

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

Definition at line 37 of file HFRaddamTask.h.

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