test
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
RadDamTask Class Reference

#include <RadDamTask.h>

Inheritance diagram for RadDamTask:
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 &)
 
 RadDamTask (edm::ParameterSet const &)
 
virtual ~RadDamTask ()
 
- 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 raddamTask
 

Protected Member Functions

virtual bool _isApplicable (edm::Event const &)
 
virtual void _process (edm::Event const &, edm::EventSetup const &)
 
- 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::EDGetTokenT
< HFDigiCollection
_tokHF
 
std::vector< ContainerSingle1D_vcShape
 
std::vector< HcalDetId_vDetIds
 
- 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
 
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
 

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 RadDamTask.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file RadDamTask.cc.

References _tagHF, _tokHF, _vDetIds, edm::ParameterSet::getUntrackedParameter(), HcalForward, and HLT_25ns10e33_v2_cff::InputTag.

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

Definition at line 23 of file RadDamTask.h.

24  {}

Member Function Documentation

bool RadDamTask::_isApplicable ( edm::Event const &  e)
protectedvirtual

Reimplemented from hcaldqm::DQTask.

Definition at line 118 of file RadDamTask.cc.

References hcaldqm::DQTask::_getCalibType(), hcaldqm::DQModule::_ptype, diJetCalib::calibType, hcaldqm::fOnline, and hc_RADDAM.

119 {
120  if (_ptype==fOnline)
121  {
122  // globla-online
123  int calibType = this->_getCalibType(e);
124  return (calibType==hc_RADDAM);
125  }
126  else
127  {
128  // local, just return true as all the settings will be done in cfg
129  return true;
130  }
131 
132  return false;
133 }
virtual int _getCalibType(edm::Event const &)
Definition: DQTask.cc:174
tuple calibType
Definition: diJetCalib.py:20
ProcessingType _ptype
Definition: DQModule.h:59
void RadDamTask::_process ( edm::Event const &  e,
edm::EventSetup const &  es 
)
protectedvirtual

Implements hcaldqm::DQTask.

Definition at line 96 of file RadDamTask.cc.

References hcaldqm::DQModule::_logger, _tagHF, _tokHF, _vcShape, _vDetIds, Logger::dqmthrow(), lumiContext::fill, edm::Event::getByToken(), i, HFDataFrame::id(), edm::InputTag::instance(), j, edm::InputTag::label(), HcalQIESample::nominal_fC(), HFDataFrame::sample(), and HFDataFrame::size().

98 {
100  if (!e.getByToken(_tokHF, chf))
101  _logger.dqmthrow("Collection HFDigiCollection isn't avalaible"
102  + _tagHF.label() + " " + _tagHF.instance());
103 
104  for (HFDigiCollection::const_iterator it=chf->begin();
105  it!=chf->end(); ++it)
106  {
107  const HFDataFrame digi = (const HFDataFrame)(*it);
108  for (unsigned int i=0; i<_vDetIds.size(); i++)
109  if (digi.id()==_vDetIds[i])
110  {
111  for (int j=0; j<digi.size(); j++)
112  _vcShape[i].fill(j,
113  digi.sample(j).nominal_fC()-2.5);
114  }
115  }
116 }
int i
Definition: DBlmapReader.cc:9
string fill
Definition: lumiContext.py:319
edm::EDGetTokenT< HFDigiCollection > _tokHF
Definition: RadDamTask.h:36
std::vector< HFDataFrame >::const_iterator const_iterator
edm::InputTag _tagHF
Definition: RadDamTask.h:35
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
const HcalQIESample & sample(int i) const
access a sample
Definition: HFDataFrame.h:39
int j
Definition: DBlmapReader.cc:9
Logger _logger
Definition: DQModule.h:70
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:26
double nominal_fC() const
get the nominal FC (no calibrations applied)
std::string const & label() const
Definition: InputTag.h:36
std::vector< HcalDetId > _vDetIds
Definition: RadDamTask.h:39
const HcalDetId & id() const
Definition: HFDataFrame.h:22
std::string const & instance() const
Definition: InputTag.h:37
std::vector< ContainerSingle1D > _vcShape
Definition: RadDamTask.h:46
void RadDamTask::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQTask.

Definition at line 73 of file RadDamTask.cc.

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

75 {
76  // Initialize all the Single Containers
77  for (std::vector<HcalDetId>::const_iterator it=_vDetIds.begin();
78  it!=_vDetIds.end(); ++it)
79  {
80  _vcShape.push_back(ContainerSingle1D(_name,
81  "Shape",
84  }
85 
86  DQTask::bookHistograms(ib, r, es);
87  char aux[200];
88  for (unsigned int i=0; i<_vDetIds.size(); i++)
89  {
90  sprintf(aux, "ieta%diphi%dd%d", _vDetIds[i].ieta(),
91  _vDetIds[i].iphi(), _vDetIds[i].depth());
92  _vcShape[i].book(ib, _subsystem, aux);
93  }
94 }
int i
Definition: DBlmapReader.cc:9
void bookHistograms(fwlite::EventContainer &eventCont)
std::string _name
Definition: DQModule.h:57
std::string _subsystem
Definition: DQModule.h:64
std::vector< HcalDetId > _vDetIds
Definition: RadDamTask.h:39
std::vector< ContainerSingle1D > _vcShape
Definition: RadDamTask.h:46

Member Data Documentation

edm::InputTag RadDamTask::_tagHF
protected

Definition at line 35 of file RadDamTask.h.

Referenced by _process(), and RadDamTask().

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

Definition at line 36 of file RadDamTask.h.

Referenced by _process(), and RadDamTask().

std::vector<ContainerSingle1D> RadDamTask::_vcShape
protected

Definition at line 46 of file RadDamTask.h.

Referenced by _process(), and bookHistograms().

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

Definition at line 39 of file RadDamTask.h.

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

tuple RadDamTask.raddamTask
Initial value:
1 = cms.EDAnalyzer(
2  "RadDamTask",
3 
4  # standard parameters
5  name = cms.untracked.string("RadDamTask"),
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  tagHF = cms.untracked.InputTag("hcalDigis"),
15  tagRaw = cms.untracked.InputTag('hltHcalCalibrationRaw')
16 )

Definition at line 3 of file RadDamTask.py.