CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
PedestalTask Class Reference

#include <PedestalTask.h>

Inheritance diagram for PedestalTask:
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 bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
 PedestalTask (edm::ParameterSet const &)
 
virtual ~PedestalTask ()
 
- Public Member Functions inherited from hcaldqm::DQTask
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQTask (edm::ParameterSet const &)
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup 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 ()
 
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 ()
 

Public Attributes

tuple pedestalTask
 

Protected Member Functions

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

Container2D _cPedestalMeans_depth
 
Container1D _cPedestalMeans_SubDet
 
Container2D _cPedestalRMSs_depth
 
Container1D _cPedestalRMSs_SubDet
 
ContainerCompact _cPedestals
 
edm::InputTag _tagHBHE
 
edm::InputTag _tagHF
 
edm::InputTag _tagHO
 
edm::InputTag _tagTrigger
 
edm::EDGetTokenT
< HBHEDigiCollection
_tokHBHE
 
edm::EDGetTokenT
< HFDigiCollection
_tokHF
 
edm::EDGetTokenT
< HODigiCollection
_tokHO
 
edm::EDGetTokenT
< HcalTBTriggerData
_tokTrigger
 
- 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
 
- Protected Attributes inherited from hcaldqm::DQModule
int _currentLS
 
int _debug
 
int _evsPerLS
 
int _evsTotal
 
Logger _logger
 
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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
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::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (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 19 of file PedestalTask.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file PedestalTask.cc.

References _cPedestalMeans_depth, _cPedestalMeans_SubDet, _cPedestalRMSs_depth, _cPedestalRMSs_SubDet, hcaldqm::DQModule::_name, _tagHBHE, _tagHF, _tagHO, _tagTrigger, _tokHBHE, _tokHF, _tokHO, _tokTrigger, hcaldqm::axis::fADC_15, hcaldqm::axis::fADC_5, hcaldqm::axis::fdepth, hcaldqm::axis::fEntries, hcaldqm::axis::fieta, hcaldqm::axis::fiphi, hcaldqm::axis::fSubDet, hcaldqm::axis::fXaxis, hcaldqm::axis::fYaxis, edm::ParameterSet::getUntrackedParameter(), hcaldqm::Container2D::initialize(), hcaldqm::Container1D::initialize(), and HLT_FULL_cff::InputTag.

5  :
6  DQTask(ps)
7 {
8  // Containers
9  _cPedestalMeans_SubDet.initialize(_name+"/Means/SubDet",
10  "PedestalMeans",
14  _cPedestalRMSs_SubDet.initialize(_name+"/PedestalRMSs/SubDet",
15  "PedestalRMSs",
19  _cPedestalMeans_depth.initialize(_name+"/PedestalMeans/depth",
20  "PedestalMeans",
24  _cPedestalRMSs_depth.initialize(_name+"/PedestalRMSs/depth", "PedestalRMSs",
28 
29  // tags
30  _tagHBHE = ps.getUntrackedParameter<edm::InputTag>("tagHBHE",
31  edm::InputTag("hcalDigis"));
32  _tagHO = ps.getUntrackedParameter<edm::InputTag>("tagHO",
33  edm::InputTag("hcalDigis"));
34  _tagHF = ps.getUntrackedParameter<edm::InputTag>("tagHF",
35  edm::InputTag("hcalDigis"));
36  _tagTrigger = ps.getUntrackedParameter<edm::InputTag>("tagTrigger",
37  edm::InputTag("tbunpacker"));
38  _tokHBHE = consumes<HBHEDigiCollection>(_tagHBHE);
39  _tokHO = consumes<HODigiCollection>(_tagHO);
40  _tokHF = consumes<HFDigiCollection>(_tagHF);
41  _tokTrigger = consumes<HcalTBTriggerData>(_tagTrigger);
42 }
Container1D _cPedestalRMSs_SubDet
Definition: PedestalTask.h:52
edm::InputTag _tagHF
Definition: PedestalTask.h:41
virtual void initialize(std::string const &folder, std::string nametitle, mapper::MapperType mt, axis::Axis *xaxis, axis::Axis *yaxis=new axis::CoordinateAxis(axis::fYaxis, axis::fiphi), axis::Axis *zaxis=new axis::ValueAxis(axis::fZaxis, axis::fEntries), int debug=0)
Definition: Container2D.cc:30
DQTask(edm::ParameterSet const &)
Definition: DQTask.cc:7
edm::InputTag _tagHBHE
Definition: PedestalTask.h:39
Container1D _cPedestalMeans_SubDet
Definition: PedestalTask.h:51
edm::InputTag _tagHO
Definition: PedestalTask.h:40
edm::EDGetTokenT< HcalTBTriggerData > _tokTrigger
Definition: PedestalTask.h:46
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: PedestalTask.h:45
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: PedestalTask.h:43
virtual void initialize(std::string const &folder, std::string const &nametitle, mapper::MapperType mt, axis::Axis *xaxis, axis::Axis *yaxis=new ValueAxis(fYaxis, fEntries), int debug=0)
Definition: Container1D.cc:28
std::string _name
Definition: DQModule.h:50
Container2D _cPedestalMeans_depth
Definition: PedestalTask.h:55
edm::InputTag _tagTrigger
Definition: PedestalTask.h:42
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: PedestalTask.h:44
Container2D _cPedestalRMSs_depth
Definition: PedestalTask.h:56
virtual PedestalTask::~PedestalTask ( )
inlinevirtual

Definition at line 23 of file PedestalTask.h.

24  {}

Member Function Documentation

void PedestalTask::_dump ( )
protectedvirtual
bool PedestalTask::_isApplicable ( edm::Event const &  e)
protectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 121 of file PedestalTask.cc.

References hcaldqm::DQTask::_getCalibType(), hcaldqm::DQModule::_logger, hcaldqm::DQModule::_ptype, _tagTrigger, _tokTrigger, Logger::dqmthrow(), hcaldqm::fOnline, edm::Event::getByToken(), hc_Pedestal, edm::InputTag::instance(), and edm::InputTag::label().

122 {
123  if (_ptype==fOnline)
124  {
125  // online-global
126  return this->_getCalibType(e)==hc_Pedestal;
127  }
128  else
129  {
130  // local
132  if (!e.getByToken(_tokTrigger, ctrigger))
133  _logger.dqmthrow("Collection HcalTBTriggerData isn't available"
134  + _tagTrigger.label() + " " + _tagTrigger.instance());
135  return ctrigger->wasSpillIgnorantPedestalTrigger();
136  }
137 
138  return false;
139 }
virtual int _getCalibType(edm::Event const &)
Definition: DQTask.cc:107
edm::EDGetTokenT< HcalTBTriggerData > _tokTrigger
Definition: PedestalTask.h:46
ProcessingType _ptype
Definition: DQModule.h:52
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
Logger _logger
Definition: DQModule.h:62
edm::InputTag _tagTrigger
Definition: PedestalTask.h:42
std::string const & label() const
Definition: InputTag.h:36
std::string const & instance() const
Definition: InputTag.h:37
void PedestalTask::_process ( edm::Event const &  e,
edm::EventSetup const &  es 
)
protectedvirtual

Implements hcaldqm::DQTask.

Definition at line 71 of file PedestalTask.cc.

References _cPedestals, _dump(), hcaldqm::DQModule::_evsTotal, hcaldqm::DQModule::_logger, hcaldqm::DQModule::_ptype, _tagHBHE, _tagHF, _tagHO, _tokHBHE, _tokHF, _tokHO, hcaldqm::constants::CALIBEVENTS_MIN, hcaldqm::constants::CAPS_NUM, Logger::dqmthrow(), hcaldqm::ContainerCompact::fill(), hcaldqm::fOnline, edm::Event::getByToken(), i, HFDataFrame::id(), HBHEDataFrame::id(), HODataFrame::id(), edm::InputTag::instance(), edm::InputTag::label(), HBHEDataFrame::size(), HFDataFrame::size(), and HODataFrame::size().

73 {
77 
78  if (!e.getByToken(_tokHBHE, chbhe))
79  _logger.dqmthrow("Collection HBHEDigiCollection isn't available"
80  + _tagHBHE.label() + " " + _tagHBHE.instance());
81  if (!e.getByToken(_tokHO, cho))
82  _logger.dqmthrow("Collection HODigiCollection isn't available"
83  + _tagHO.label() + " " + _tagHO.instance());
84  if (!e.getByToken(_tokHF, chf))
85  _logger.dqmthrow("Collection HFDigiCollection isn't available"
86  + _tagHF.label() + " " + _tagHF.instance());
87 
88  for (HBHEDigiCollection::const_iterator it=chbhe->begin();
89  it!=chbhe->end(); ++it)
90  {
91  const HBHEDataFrame digi = (const HBHEDataFrame)(*it);
92  int digiSizeToUse = floor(digi.size()/constants::CAPS_NUM)*
94  for (int i=0; i<digiSizeToUse; i++)
95  _cPedestals.fill(digi.id(), it->sample(i).adc());
96  }
97  for (HODigiCollection::const_iterator it=cho->begin();
98  it!=cho->end(); ++it)
99  {
100  const HODataFrame digi = (const HODataFrame)(*it);
101  int digiSizeToUse = floor(digi.size()/constants::CAPS_NUM)*
103  for (int i=0; i<digiSizeToUse; i++)
104  _cPedestals.fill(digi.id(), it->sample(i).adc());
105  }
106  for (HFDigiCollection::const_iterator it=chf->begin();
107  it!=chf->end(); ++it)
108  {
109  const HFDataFrame digi = (const HFDataFrame)(*it);
110  int digiSizeToUse = floor(digi.size()/constants::CAPS_NUM)*
112  for (int i=0; i<digiSizeToUse; i++)
113  _cPedestals.fill(digi.id(), it->sample(i).adc());
114  }
115 
116  if (_ptype==fOnline && _evsTotal>0 &&
118  this->_dump();
119 }
edm::InputTag _tagHF
Definition: PedestalTask.h:41
int i
Definition: DBlmapReader.cc:9
ContainerCompact _cPedestals
Definition: PedestalTask.h:48
int size() const
total number of samples in the digi
Definition: HBHEDataFrame.h:26
edm::InputTag _tagHBHE
Definition: PedestalTask.h:39
std::vector< HBHEDataFrame >::const_iterator const_iterator
edm::InputTag _tagHO
Definition: PedestalTask.h:40
const HcalDetId & id() const
Definition: HODataFrame.h:23
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: PedestalTask.h:45
ProcessingType _ptype
Definition: DQModule.h:52
int const CAPS_NUM
Definition: Constants.h:131
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
int size() const
total number of samples in the digi
Definition: HODataFrame.h:27
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: PedestalTask.h:43
Logger _logger
Definition: DQModule.h:62
int const CALIBEVENTS_MIN
Definition: Constants.h:167
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:26
virtual void fill(HcalDetId const &, double)
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: PedestalTask.h:44
virtual void _dump()
Definition: PedestalTask.cc:59
const HcalDetId & id() const
Definition: HBHEDataFrame.h:22
const HcalDetId & id() const
Definition: HFDataFrame.h:22
std::string const & instance() const
Definition: InputTag.h:37
void PedestalTask::_resetMonitors ( UpdateFreq  uf)
protectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 54 of file PedestalTask.cc.

55 {
56  DQTask::_resetMonitors(uf);
57 }
void PedestalTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQTask.

Definition at line 44 of file PedestalTask.cc.

References _cPedestalMeans_depth, _cPedestalMeans_SubDet, _cPedestalRMSs_depth, _cPedestalRMSs_SubDet, hcaldqm::DQModule::_subsystem, hcaldqm::Container2D::book(), hcaldqm::Container1D::book(), and bookHistograms().

46 {
47  DQTask::bookHistograms(ib, r, es);
52 }
Container1D _cPedestalRMSs_SubDet
Definition: PedestalTask.h:52
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
Definition: Container2D.cc:233
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
Definition: Container1D.cc:198
Container1D _cPedestalMeans_SubDet
Definition: PedestalTask.h:51
void bookHistograms(fwlite::EventContainer &eventCont)
Container2D _cPedestalMeans_depth
Definition: PedestalTask.h:55
Container2D _cPedestalRMSs_depth
Definition: PedestalTask.h:56
std::string _subsystem
Definition: DQModule.h:57
virtual void PedestalTask::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlinevirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 28 of file PedestalTask.h.

29  {this->_dump();}
virtual void _dump()
Definition: PedestalTask.cc:59

Member Data Documentation

Container2D PedestalTask::_cPedestalMeans_depth
protected

Definition at line 55 of file PedestalTask.h.

Referenced by _dump(), bookHistograms(), and PedestalTask().

Container1D PedestalTask::_cPedestalMeans_SubDet
protected

Definition at line 51 of file PedestalTask.h.

Referenced by _dump(), bookHistograms(), and PedestalTask().

Container2D PedestalTask::_cPedestalRMSs_depth
protected

Definition at line 56 of file PedestalTask.h.

Referenced by _dump(), bookHistograms(), and PedestalTask().

Container1D PedestalTask::_cPedestalRMSs_SubDet
protected

Definition at line 52 of file PedestalTask.h.

Referenced by _dump(), bookHistograms(), and PedestalTask().

ContainerCompact PedestalTask::_cPedestals
protected

Definition at line 48 of file PedestalTask.h.

Referenced by _dump(), and _process().

edm::InputTag PedestalTask::_tagHBHE
protected

Definition at line 39 of file PedestalTask.h.

Referenced by _process(), and PedestalTask().

edm::InputTag PedestalTask::_tagHF
protected

Definition at line 41 of file PedestalTask.h.

Referenced by _process(), and PedestalTask().

edm::InputTag PedestalTask::_tagHO
protected

Definition at line 40 of file PedestalTask.h.

Referenced by _process(), and PedestalTask().

edm::InputTag PedestalTask::_tagTrigger
protected

Definition at line 42 of file PedestalTask.h.

Referenced by _isApplicable(), and PedestalTask().

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

Definition at line 43 of file PedestalTask.h.

Referenced by _process(), and PedestalTask().

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

Definition at line 45 of file PedestalTask.h.

Referenced by _process(), and PedestalTask().

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

Definition at line 44 of file PedestalTask.h.

Referenced by _process(), and PedestalTask().

edm::EDGetTokenT<HcalTBTriggerData> PedestalTask::_tokTrigger
protected

Definition at line 46 of file PedestalTask.h.

Referenced by _isApplicable(), and PedestalTask().

tuple PedestalTask.pedestalTask
Initial value:
1 = cms.EDAnalyzer(
2  "PedestalTask",
3 
4  # standard parameters
5  name = cms.untracked.string("PedestalTask"),
6  debug = cms.untracked.int32(0),
7  runkeyVal = cms.untracked.int32(0),
8  runkeyName = cms.untracked.string("pp_run"),
9  ptype = cms.untracked.int32(0),
10  mtype = cms.untracked.bool(True),
11  subsystem = cms.untracked.string('HcalCalib'),
12 
13  # tags
14  tagHBHE = cms.untracked.InputTag("hcalDigis"),
15  tagHO = cms.untracked.InputTag("hcalDigis"),
16  tagHF = cms.untracked.InputTag("hcalDigis"),
17  tagRaw = cms.untracked.InputTag('hltHcalCalibrationRaw')
18 )

Definition at line 3 of file PedestalTask.py.