CMS 3D CMS Logo

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

#include <UMNioTask.h>

Inheritance diagram for UMNioTask:
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
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endRun (edm::Run const &r, edm::EventSetup const &) override
 
 UMNioTask (edm::ParameterSet const &)
 
 ~UMNioTask () 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

void _process (edm::Event const &, edm::EventSetup const &) override
 
int getOrbitGapIndex (uint8_t eventType, uint32_t laserType)
 
- Protected Member Functions inherited from hcaldqm::DQTask
virtual int _getCalibType (edm::Event const &)
 
virtual bool _isApplicable (edm::Event const &)
 
virtual void _resetMonitors (UpdateFreq)
 

Protected Attributes

hcaldqm::ContainerSingle2D _cEventType
 
hcaldqm::ContainerSingle2D _cTotalCharge
 
hcaldqm::ContainerSingleProf2D _cTotalChargeProfile
 
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
 
std::vector< uint32_t > _eventtypes
 
hcaldqm::filter::HashFilter _filter_uTCA
 
hcaldqm::filter::HashFilter _filter_VME
 
double _lowHBHE
 
double _lowHF
 
double _lowHO
 
edm::InputTag _tagHBHE
 
edm::InputTag _tagHF
 
edm::InputTag _tagHO
 
edm::InputTag _taguMN
 
edm::EDGetTokenT< HBHEDigiCollection_tokHBHE
 
edm::EDGetTokenT< HFDigiCollection_tokHF
 
edm::EDGetTokenT< HODigiCollection_tokHO
 
edm::EDGetTokenT< HcalUMNioDigi_tokuMN
 
- 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 23 of file UMNioTask.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file UMNioTask.cc.

References _eventtypes, _lowHBHE, _lowHF, _lowHO, _tagHBHE, _tagHF, _tagHO, _taguMN, _tokHBHE, _tokHF, _tokHO, _tokuMN, edm::ParameterSet::getUntrackedParameter(), hcaldqm::constants::nOrbitGapType, and hcaldqm::constants::tNull.

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  _taguMN = ps.getUntrackedParameter<edm::InputTag>("taguMN",
16  edm::InputTag("hcalDigis"));
17 
18  _tokHBHE = consumes<HBHEDigiCollection>(_tagHBHE);
19  _tokHO = consumes<HODigiCollection>(_tagHO);
20  _tokHF = consumes<HFDigiCollection>(_tagHF);
21  _tokuMN = consumes<HcalUMNioDigi>(_taguMN);
22 
23  _lowHBHE = ps.getUntrackedParameter<double>("lowHBHE",
24  20);
25  _lowHO = ps.getUntrackedParameter<double>("lowHO",
26  20);
27  _lowHF = ps.getUntrackedParameter<double>("lowHF",
28  20);
29 
30  // push all the event types to monitor - whole range basically
31  // This corresponds to all enum values in hcaldqm::constants::OrbitGapType
33  _eventtypes.push_back(type);
34  }
35 }
edm::InputTag _tagHBHE
Definition: UMNioTask.h:54
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: UMNioTask.h:59
type
Definition: HCALResponse.h:21
std::vector< uint32_t > _eventtypes
Definition: UMNioTask.h:50
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:6
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: UMNioTask.h:58
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
Definition: UMNioTask.h:60
edm::InputTag _tagHF
Definition: UMNioTask.h:56
double _lowHO
Definition: UMNioTask.h:63
edm::InputTag _taguMN
Definition: UMNioTask.h:53
edm::InputTag _tagHO
Definition: UMNioTask.h:55
double _lowHBHE
Definition: UMNioTask.h:63
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: UMNioTask.h:57
double _lowHF
Definition: UMNioTask.h:63
UMNioTask::~UMNioTask ( )
inlineoverride

Definition at line 27 of file UMNioTask.h.

References bookHistograms().

28  {}

Member Function Documentation

void UMNioTask::_process ( edm::Event const &  e,
edm::EventSetup const &  es 
)
overrideprotectedvirtual

Implements hcaldqm::DQTask.

Definition at line 96 of file UMNioTask.cc.

References _cEventType, _cTotalCharge, _cTotalChargeProfile, hcaldqm::DQModule::_currentLS, hcaldqm::DQModule::_logger, _tagHBHE, _tagHF, _tagHO, _tokHBHE, _tokHF, _tokHO, _tokuMN, edm::SortedCollection< T, SORT >::begin(), Logger::dqmthrow(), edm::SortedCollection< T, SORT >::end(), HcalUMNioDigi::eventType(), hcaldqm::ContainerSingleProf2D::fill(), hcaldqm::ContainerSingle2D::fill(), edm::Event::getByToken(), getOrbitGapIndex(), edm::InputTag::instance(), edm::InputTag::label(), hcaldqm::utilities::sumQ(), and HcalUMNioDigi::valueUserWord().

Referenced by endRun().

98 {
100  if (!e.getByToken(_tokuMN, cumn))
101  return;
102 
103  uint8_t eventType = cumn->eventType();
104  uint32_t laserType = cumn->valueUserWord(0);
105  _cEventType.fill(_currentLS, getOrbitGapIndex(eventType, laserType));
106 
107  // Compute the Total Charge in the Detector...
111 
112  if (!e.getByToken(_tokHBHE, chbhe))
113  _logger.dqmthrow("Collection HBHEDigiCollection isn't available "
114  + _tagHBHE.label() + " " + _tagHBHE.instance());
115  if (!e.getByToken(_tokHO, cho))
116  _logger.dqmthrow("Collection HODigiCollection isn't available "
117  + _tagHO.label() + " " + _tagHO.instance());
118  if (!e.getByToken(_tokHF, chf))
119  _logger.dqmthrow("Collection HFDigiCollection isn't available "
120  + _tagHF.label() + " " + _tagHF.instance());
121 
122  for (HBHEDigiCollection::const_iterator it=chbhe->begin();
123  it!=chbhe->end(); ++it)
124  {
125  double sumQ = hcaldqm::utilities::sumQ<HBHEDataFrame>(*it, 2.5, 0, it->size()-1);
126  _cTotalCharge.fill(it->id(), _currentLS, sumQ);
128  }
130  it!=cho->end(); ++it)
131  {
132  double sumQ = hcaldqm::utilities::sumQ<HODataFrame>(*it, 8.5, 0, it->size()-1);
133  _cTotalCharge.fill(it->id(), _currentLS, sumQ);
135  }
137  it!=chf->end(); ++it)
138  {
139  double sumQ = hcaldqm::utilities::sumQ<HFDataFrame>(*it, 2.5, 0, it->size()-1);
140  _cTotalCharge.fill(it->id(), _currentLS, sumQ);
142  }
143 }
edm::InputTag _tagHBHE
Definition: UMNioTask.h:54
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: UMNioTask.h:59
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: UMNioTask.h:58
edm::EDGetTokenT< HcalUMNioDigi > _tokuMN
Definition: UMNioTask.h:60
std::vector< HBHEDataFrame >::const_iterator const_iterator
edm::InputTag _tagHF
Definition: UMNioTask.h:56
hcaldqm::ContainerSingleProf2D _cTotalChargeProfile
Definition: UMNioTask.h:73
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
uint32_t valueUserWord(int iword) const
uint8_t eventType() const
Logger _logger
Definition: DQModule.h:70
int getOrbitGapIndex(uint8_t eventType, uint32_t laserType)
Definition: UMNioTask.cc:67
edm::InputTag _tagHO
Definition: UMNioTask.h:55
const_iterator end() const
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: UMNioTask.h:57
hcaldqm::ContainerSingle2D _cTotalCharge
Definition: UMNioTask.h:72
virtual void fill(int, int)
hcaldqm::ContainerSingle2D _cEventType
Definition: UMNioTask.h:71
std::string const & instance() const
Definition: InputTag.h:37
const_iterator begin() const
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)
Definition: Utilities.h:121
void UMNioTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
override

Definition at line 37 of file UMNioTask.cc.

References _cEventType, _cTotalCharge, _cTotalChargeProfile, hcaldqm::DQTask::_emap, _eventtypes, hcaldqm::DQModule::_maxLS, hcaldqm::DQModule::_name, hcaldqm::DQModule::_ptype, hcaldqm::DQModule::_subsystem, hcaldqm::ContainerSingleProf2D::book(), hcaldqm::ContainerSingle2D::book(), bookHistograms(), hcaldqm::quantity::ffC_10000, hcaldqm::fLocal, hcaldqm::quantity::fN, hcaldqm::quantity::fSubdetPM, edm::EventSetup::get(), HcalDbService::getHcalMapping(), hcaldqm::ContainerSingleProf2D::initialize(), hcaldqm::ContainerSingle2D::initialize(), edm::RunAuxiliary::run(), and edm::Run::runAuxiliary().

Referenced by ~UMNioTask().

39 {
40  if (_ptype==fLocal)
41  if (r.runAuxiliary().run()==1)
42  return;
43 
44  DQTask::bookHistograms(ib, r, es);
45 
47  es.get<HcalDbRecord>().get(dbService);
48  _emap = dbService->getHcalMapping();
49 
50  _cEventType.initialize(_name, "EventType",
54  _cTotalCharge.initialize(_name, "TotalCharge",
58  _cTotalChargeProfile.initialize(_name, "TotalChargeProfile",
65 }
std::vector< uint32_t > _eventtypes
Definition: UMNioTask.h:50
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
hcaldqm::ContainerSingleProf2D _cTotalChargeProfile
Definition: UMNioTask.h:73
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
ProcessingType _ptype
Definition: DQModule.h:59
std::string _name
Definition: DQModule.h:57
HcalElectronicsMap const * _emap
Definition: DQTask.h:73
void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0) override
const HcalElectronicsMap * getHcalMapping() const
std::string _subsystem
Definition: DQModule.h:64
hcaldqm::ContainerSingle2D _cTotalCharge
Definition: UMNioTask.h:72
void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerSingle2D _cEventType
Definition: UMNioTask.h:71
void UMNioTask::endLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
override

Definition at line 144 of file UMNioTask.cc.

References DEFINE_FWK_MODULE.

Referenced by endRun().

146 {
147  DQTask::endLuminosityBlock(lb, es);
148 }
void UMNioTask::endRun ( edm::Run const &  r,
edm::EventSetup const &   
)
inlineoverride

Definition at line 32 of file UMNioTask.h.

References _process(), hcaldqm::DQModule::_ptype, endLuminosityBlock(), hcaldqm::fLocal, getOrbitGapIndex(), edm::RunAuxiliary::run(), and edm::Run::runAuxiliary().

33  {
35  {
36  if (r.runAuxiliary().run()==1)
37  return;
38  }
39  }
ProcessingType _ptype
Definition: DQModule.h:59
int UMNioTask::getOrbitGapIndex ( uint8_t  eventType,
uint32_t  laserType 
)
protected

Definition at line 67 of file UMNioTask.cc.

References _eventtypes, hcaldqm::constants::EVENTTYPE_LASER, hcaldqm::constants::EVENTTYPE_LED, hcaldqm::constants::EVENTTYPE_PEDESTAL, spr::find(), hcaldqm::constants::tHBHEHPD, hcaldqm::constants::tHBMMega, hcaldqm::constants::tHBPMega, hcaldqm::constants::tHEMMega, hcaldqm::constants::tHEPMega, hcaldqm::constants::tHF, hcaldqm::constants::tHO, hcaldqm::constants::tLED, hcaldqm::constants::tPedestal, and hcaldqm::constants::tUnknown.

Referenced by _process(), and endRun().

67  {
68  constants::OrbitGapType orbitGapType;
69  if (eventType == constants::EVENTTYPE_PEDESTAL) {
70  orbitGapType = tPedestal;
71  } else if (eventType == constants::EVENTTYPE_LED) {
72  orbitGapType = tLED;
73  } else if (eventType == constants::EVENTTYPE_LASER) {
74  switch (laserType)
75  {
76  //case tNull : return "Null";
77  //case tHFRaddam : return "HFRaddam";
78  case 3 : return tHBHEHPD;
79  case 4 : return tHO;
80  case 5 : return tHF;
81  //case tZDC : return "ZDC";
82  case 7 : return tHEPMega;
83  case 8 : return tHEMMega;
84  case 9 : return tHBPMega;
85  case 10 : return tHBMMega;
86  //case tCRF : return "CRF";
87  //case tCalib : return "Calib";
88  //case tSafe : return "Safe";
89  default : return tUnknown;
90  }
91  }
92  return (int)(std::find(_eventtypes.begin(), _eventtypes.end(), orbitGapType) - _eventtypes.begin());
93 }
std::vector< uint32_t > _eventtypes
Definition: UMNioTask.h:50
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
uint8_t const EVENTTYPE_LED
Definition: Constants.h:325
uint8_t const EVENTTYPE_LASER
Definition: Constants.h:324
uint8_t const EVENTTYPE_PEDESTAL
Definition: Constants.h:323

Member Data Documentation

hcaldqm::ContainerSingle2D UMNioTask::_cEventType
protected

Definition at line 71 of file UMNioTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::ContainerSingle2D UMNioTask::_cTotalCharge
protected

Definition at line 72 of file UMNioTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::ContainerSingleProf2D UMNioTask::_cTotalChargeProfile
protected

Definition at line 73 of file UMNioTask.h.

Referenced by _process(), and bookHistograms().

hcaldqm::electronicsmap::ElectronicsMap UMNioTask::_ehashmap
protected

Definition at line 66 of file UMNioTask.h.

std::vector<uint32_t> UMNioTask::_eventtypes
protected

Definition at line 50 of file UMNioTask.h.

Referenced by bookHistograms(), getOrbitGapIndex(), and UMNioTask().

hcaldqm::filter::HashFilter UMNioTask::_filter_uTCA
protected

Definition at line 67 of file UMNioTask.h.

hcaldqm::filter::HashFilter UMNioTask::_filter_VME
protected

Definition at line 68 of file UMNioTask.h.

double UMNioTask::_lowHBHE
protected

Definition at line 63 of file UMNioTask.h.

Referenced by UMNioTask().

double UMNioTask::_lowHF
protected

Definition at line 63 of file UMNioTask.h.

Referenced by UMNioTask().

double UMNioTask::_lowHO
protected

Definition at line 63 of file UMNioTask.h.

Referenced by UMNioTask().

edm::InputTag UMNioTask::_tagHBHE
protected

Definition at line 54 of file UMNioTask.h.

Referenced by _process(), and UMNioTask().

edm::InputTag UMNioTask::_tagHF
protected

Definition at line 56 of file UMNioTask.h.

Referenced by _process(), and UMNioTask().

edm::InputTag UMNioTask::_tagHO
protected

Definition at line 55 of file UMNioTask.h.

Referenced by _process(), and UMNioTask().

edm::InputTag UMNioTask::_taguMN
protected

Definition at line 53 of file UMNioTask.h.

Referenced by UMNioTask().

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

Definition at line 57 of file UMNioTask.h.

Referenced by _process(), and UMNioTask().

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

Definition at line 59 of file UMNioTask.h.

Referenced by _process(), and UMNioTask().

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

Definition at line 58 of file UMNioTask.h.

Referenced by _process(), and UMNioTask().

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

Definition at line 60 of file UMNioTask.h.

Referenced by _process(), and UMNioTask().