CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ecaldqm::TimingTask Class Reference

#include <TimingTask.h>

Inheritance diagram for ecaldqm::TimingTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Member Functions

bool analyze (void const *, Collections) override
 
bool filterRunType (short const *) override
 
void runOnRecHits (EcalRecHitCollection const &, Collections)
 
 TimingTask ()
 
 ~TimingTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
virtual void addDependencies (DependencySet &)
 
virtual void beginEvent (edm::Event const &, edm::EventSetup const &)
 
 DQWorkerTask ()
 
virtual void endEvent (edm::Event const &, edm::EventSetup const &)
 
virtual bool filterTrigger (edm::TriggerResultsByName const &)
 
void recoverStats ()
 
virtual void setTokens (edm::ConsumesCollector &)
 
void softReset ()
 
virtual ~DQWorkerTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void bookMEs (DQMStore::IBooker &)
 
 DQWorker ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
std::string const & getName () const
 
bool onlineMode () const
 
virtual void releaseMEs ()
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setTime (time_t _t)
 
virtual ~DQWorker ()
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

float energyThresholdEB_
 
float energyThresholdEE_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerTask
typedef
EcalDCCHeaderBlock::EcalDCCEventSettings 
EventSettings
 
- Static Public Member Functions inherited from ecaldqm::DQWorkerTask
static void fillDescriptions (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void fillDescriptions (edm::ParameterSetDescription &_desc)
 
- Protected Member Functions inherited from ecaldqm::DQWorkerTask
void setME (edm::ParameterSet const &) final
 
- Protected Member Functions inherited from ecaldqm::DQWorker
void initialize (std::string const &_name, edm::ParameterSet const &)
 
void print_ (std::string const &, int=0) const
 
virtual void setSource (edm::ParameterSet const &)
 
void setVerbosity (int _verbosity)
 
- Protected Attributes inherited from ecaldqm::DQWorkerTask
std::set< std::string > resettable_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Detailed Description

Definition at line 10 of file TimingTask.h.

Constructor & Destructor Documentation

ecaldqm::TimingTask::TimingTask ( )

Definition at line 11 of file TimingTask.cc.

11  :
12  DQWorkerTask(),
15  {
16  }
float energyThresholdEE_
Definition: TimingTask.h:25
float energyThresholdEB_
Definition: TimingTask.h:24
ecaldqm::TimingTask::~TimingTask ( )
inline

Definition at line 13 of file TimingTask.h.

13 {}

Member Function Documentation

bool ecaldqm::TimingTask::analyze ( void const *  _p,
Collections  _collection 
)
inlineoverridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 28 of file TimingTask.h.

References ecaldqm::kEBRecHit, ecaldqm::kEERecHit, and runOnRecHits().

28  {
29  switch(_collection){
30  case kEBRecHit:
31  case kEERecHit:
32  if(_p) runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
33  return true;
34  break;
35  default:
36  break;
37  }
38  return false;
39  }
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: TimingTask.cc:41
bool ecaldqm::TimingTask::filterRunType ( short const *  _runType)
overridevirtual
void ecaldqm::TimingTask::runOnRecHits ( EcalRecHitCollection const &  _hits,
Collections  _collection 
)

Definition at line 41 of file TimingTask.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, energyThresholdEB_, energyThresholdEE_, hit::id, ecaldqm::kEBRecHit, EcalRecHit::kGood, EcalRecHit::kOutOfTime, ecaldqm::DQWorker::MEs_, dtDQMClient_cfg::threshold, and cond::rpcobgas::time.

Referenced by analyze().

42  {
43  MESet& meTimeAmp(MEs_.at("TimeAmp"));
44  MESet& meTimeAmpAll(MEs_.at("TimeAmpAll"));
45  MESet& meTimeAll(MEs_.at("TimeAll"));
46  MESet& meTimeAllMap(MEs_.at("TimeAllMap"));
47  MESet& meTimeMap(MEs_.at("TimeMap"));
48  MESet& meTime1D(MEs_.at("Time1D"));
49 
50  uint32_t mask(~((0x1 << EcalRecHit::kGood) | (0x1 << EcalRecHit::kOutOfTime)));
51  float threshold(_collection == kEBRecHit ? energyThresholdEB_ : energyThresholdEE_);
52 
53  std::for_each(_hits.begin(), _hits.end(), [&](EcalRecHitCollection::value_type const& hit){
54  if(hit.checkFlagMask(mask)) return;
55 
56  DetId id(hit.id());
57 
58  float time(hit.time());
59  float energy(hit.energy());
60 
61  meTimeAmp.fill(id, energy, time);
62  meTimeAmpAll.fill(id, energy, time);
63 
64  if(energy > threshold){
65  meTimeAll.fill(id, time);
66  meTimeMap.fill(id, time);
67  meTime1D.fill(id, time);
68  meTimeAllMap.fill(id, time);
69  }
70  });
71  }
float energyThresholdEE_
Definition: TimingTask.h:25
unsigned int id
Definition: DetId.h:18
MESetCollection MEs_
Definition: DQWorker.h:75
float energyThresholdEB_
Definition: TimingTask.h:24
void ecaldqm::TimingTask::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 19 of file TimingTask.cc.

References energyThresholdEB_, energyThresholdEE_, and edm::ParameterSet::getUntrackedParameter().

20  {
21  energyThresholdEB_ = _params.getUntrackedParameter<double>("energyThresholdEB");
22  energyThresholdEE_ = _params.getUntrackedParameter<double>("energyThresholdEE");
23  }
float energyThresholdEE_
Definition: TimingTask.h:25
float energyThresholdEB_
Definition: TimingTask.h:24

Member Data Documentation

float ecaldqm::TimingTask::energyThresholdEB_
private

Definition at line 24 of file TimingTask.h.

Referenced by runOnRecHits(), and setParams().

float ecaldqm::TimingTask::energyThresholdEE_
private

Definition at line 25 of file TimingTask.h.

Referenced by runOnRecHits(), and setParams().