CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
hcaldqm::DQHarvester Class Referenceabstract

#include <DQHarvester.h>

Inheritance diagram for hcaldqm::DQHarvester:
DQMEDHarvester hcaldqm::DQModule edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase HcalOfflineHarvesting HcalOnlineHarvesting

Public Member Functions

virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQHarvester (edm::ParameterSet const &)
 
virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual ~DQHarvester ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::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 ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule ()
 

Protected Member Functions

virtual void _dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)=0
 
virtual void _dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)=0
 
- 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

HcalElectronicsMap const * _emap
 
int _totalLS
 
std::vector< uint32_t > _vcdaqEids
 
std::vector< int > _vFEDs
 
std::vector< uint32_t > _vhashFEDs
 
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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 18 of file DQHarvester.h.

Constructor & Destructor Documentation

hcaldqm::DQHarvester::DQHarvester ( edm::ParameterSet const &  ps)

Definition at line 5 of file DQHarvester.cc.

5  :
6  DQModule(ps)
7  {}
DQModule(edm::ParameterSet const &)
Definition: DQModule.cc:6
virtual hcaldqm::DQHarvester::~DQHarvester ( )
inlinevirtual

Definition at line 22 of file DQHarvester.h.

22 {}

Member Function Documentation

virtual void hcaldqm::DQHarvester::_dqmEndJob ( DQMStore::IBooker ,
DQMStore::IGetter  
)
protectedpure virtual

Implemented in HcalOnlineHarvesting, and HcalOfflineHarvesting.

Referenced by dqmEndJob().

virtual void hcaldqm::DQHarvester::_dqmEndLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter ,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
protectedpure virtual
void hcaldqm::DQHarvester::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
virtual

Reimplemented from DQMEDHarvester.

Reimplemented in HcalOnlineHarvesting, and HcalOfflineHarvesting.

Definition at line 9 of file DQHarvester.cc.

References _emap, hcaldqm::DQModule::_ptype, _vcdaqEids, _vFEDs, _vhashFEDs, _xQuality, hcaldqm::hashfunctions::fDChannel, hcaldqm::utilities::fed2crate(), hcaldqm::constants::FED_uTCA_MIN, hcaldqm::constants::FED_VME_MAX, hcaldqm::constants::FED_VME_MIN, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), hcaldqm::fLocal, HcalGenericDetId::genericSubdet(), edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), hcaldqm::utilities::getFEDList(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), HcalGenericDetId::HcalGenUnknown, hcaldqm::ContainerXXX< STDTYPE >::initialize(), HcalGenericDetId::isHcalDetId(), FEDNumbering::MAXHCALuTCAFEDID, edm::ESHandle< class >::product(), hcaldqm::ContainerXXX< STDTYPE >::push(), edm::RunAuxiliary::run(), edm::Run::runAuxiliary(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

11  {
12  if (_ptype==fLocal)
13  if (r.runAuxiliary().run()==1)
14  return;
15 
16  // TEMPORARY FIX
17  _vhashFEDs.clear(); _vcdaqEids.clear();
18 
19  // - get the Hcal Electronics Map
20  // - collect all the FED numbers and FED's rawIds
22  es.get<HcalDbRecord>().get(dbs);
23  _emap = dbs->getHcalMapping();
24 
26  for (std::vector<int>::const_iterator it=_vFEDs.begin();
27  it!=_vFEDs.end(); ++it)
28  if (*it>FED_VME_MAX)
29  _vhashFEDs.push_back(HcalElectronicsId(
31  FIBERCH_MIN, false).rawId());
32  else
34  FIBER_VME_MIN, SPIGOT_MIN, (*it)-FED_VME_MIN).rawId());
35 
36  // get the FEDs registered at cDAQ
39  "RunInfoRcd"));
40  if (es.find(recordKey))
41  {
43  es.get<RunInfoRcd>().get(ri);
44  std::vector<int> vfeds= ri->m_fed_in;
45  for (std::vector<int>::const_iterator it=vfeds.begin();
46  it!=vfeds.end(); ++it)
47  {
48  if (*it>=constants::FED_VME_MIN && *it<=FED_VME_MAX)
49  _vcdaqEids.push_back(HcalElectronicsId(
52  (*it)-FED_VME_MIN).rawId());
53  else if (*it>=constants::FED_uTCA_MIN &&
55  _vcdaqEids.push_back(HcalElectronicsId(
57  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
58  }
59  }
60 
61  // get the Hcal Channels Quality for channels that are not 0
64  es.get<HcalChannelQualityRcd>().get("withTopo", hcq);
65  const HcalChannelQuality *cq = hcq.product();
66  std::vector<DetId> detids = cq->getAllChannels();
67  for (std::vector<DetId>::const_iterator it=detids.begin();
68  it!=detids.end(); ++it)
69  {
70  if (HcalGenericDetId(*it).genericSubdet()==
72  continue;
73 
74  if (HcalGenericDetId(*it).isHcalDetId())
75  {
76  HcalDetId did(*it);
77  uint32_t mask = (cq->getValues(did))->getValue();
78  if (mask!=0)
79  _xQuality.push(did, mask);
80  }
81  }
82  }
ContainerXXX< uint32_t > _xQuality
Definition: DQHarvester.h:41
std::vector< uint32_t > _vhashFEDs
Definition: DQHarvester.h:39
uint16_t fed2crate(int fed)
Definition: Utilities.cc:12
int const SPIGOT_MIN
Definition: Constants.h:85
virtual void push(HcalDetId const &, STDTYPE)
Definition: ContainerXXX.h:261
const Item * getValues(DetId fId, bool throwOnFail=true) const
int const FIBER_VME_MIN
Definition: Constants.h:90
int const FED_uTCA_MIN
Definition: Constants.h:52
int const FIBERCH_MIN
Definition: Constants.h:100
ProcessingType _ptype
Definition: DQModule.h:59
int const FED_VME_MIN
Definition: Constants.h:47
std::vector< DetId > getAllChannels() const
int const FIBER_uTCA_MIN1
Definition: Constants.h:93
bool isHcalDetId() const
HcalElectronicsMap const * _emap
Definition: DQHarvester.h:32
T const * product() const
Definition: ESHandle.h:86
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:47
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
std::vector< int > _vFEDs
Definition: DQHarvester.h:38
std::vector< uint32_t > _vcdaqEids
Definition: DQHarvester.h:44
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:85
HcalGenericSubdetector genericSubdet() const
int const FED_VME_MAX
Definition: Constants.h:48
Readout chain identification for Hcal.
int const SLOT_uTCA_MIN
Definition: Constants.h:72
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void hcaldqm::DQHarvester::dqmEndJob ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
virtual

Implements DQMEDHarvester.

Definition at line 93 of file DQHarvester.cc.

References _dqmEndJob().

95  {
96  _dqmEndJob(ib, ig);
97  }
virtual void _dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &)=0
void hcaldqm::DQHarvester::dqmEndLuminosityBlock ( DQMStore::IBooker ib,
DQMStore::IGetter ig,
edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
virtual

Reimplemented from DQMEDHarvester.

Definition at line 84 of file DQHarvester.cc.

References hcaldqm::DQModule::_currentLS, _dqmEndLuminosityBlock(), _totalLS, and edm::LuminosityBlockBase::luminosityBlock().

87  {
88  // should be the same - just in case!
89  _currentLS = lb.luminosityBlock();
90  _totalLS++;
91  _dqmEndLuminosityBlock(ib, ig, lb, es);
92  }
virtual void _dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)=0

Member Data Documentation

HcalElectronicsMap const* hcaldqm::DQHarvester::_emap
protected

Definition at line 32 of file DQHarvester.h.

Referenced by beginRun().

int hcaldqm::DQHarvester::_totalLS
protected

Definition at line 35 of file DQHarvester.h.

Referenced by dqmEndLuminosityBlock().

std::vector<uint32_t> hcaldqm::DQHarvester::_vcdaqEids
protected

Definition at line 44 of file DQHarvester.h.

Referenced by beginRun().

std::vector<int> hcaldqm::DQHarvester::_vFEDs
protected
std::vector<uint32_t> hcaldqm::DQHarvester::_vhashFEDs
protected

Definition at line 39 of file DQHarvester.h.

Referenced by HcalOnlineHarvesting::_dqmEndLuminosityBlock(), and beginRun().

ContainerXXX<uint32_t> hcaldqm::DQHarvester::_xQuality
protected

Definition at line 41 of file DQHarvester.h.

Referenced by beginRun().