CMS 3D CMS Logo

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

#include <PresampleTask.h>

Inheritance diagram for ecaldqm::PresampleTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Types

enum  MESets { kPedestal, nMESets }
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

void analyze (const void *, Collections) override
 
bool filterRunType (const std::vector< short > &) override
 
 PresampleTask (const edm::ParameterSet &, const edm::ParameterSet &)
 
void runOnDigis (const EcalDigiCollection &)
 
 ~PresampleTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
virtual void beginEvent (const edm::Event &, const edm::EventSetup &)
 
 DQWorkerTask (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endEvent (const edm::Event &, const edm::EventSetup &)
 
virtual bool filterTrigger (const edm::TriggerResultsByName &)
 
virtual const std::vector
< std::pair< Collections,
Collections > > & 
getDependencies ()
 
virtual bool runsOn (unsigned)
 
virtual ~DQWorkerTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void bookMEs ()
 
 DQWorker (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
const std::vector< MESet * > & getMEs ()
 
virtual std::string const & getName ()
 
virtual bool isInitialized ()
 
virtual void reset ()
 
virtual void setInitialized (bool _init)
 
virtual void setVerbosity (int _verbosity)
 
virtual ~DQWorker ()
 

Static Public Member Functions

static void setMEData (std::vector< MEData > &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void setMEData (std::vector< MEData > &)
 

Additional Inherited Members

- Static Public Attributes inherited from ecaldqm::DQWorker
static std::map< std::string,
std::vector< MEData > > 
meData
 
- Protected Member Functions inherited from ecaldqm::DQWorker
MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
 
void meSet_ (unsigned, edm::ParameterSet const &)
 
- Protected Attributes inherited from ecaldqm::DQWorkerTask
uint32_t collectionMask_
 
std::vector< std::pair
< Collections, Collections > > 
dependencies_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Detailed Description

Definition at line 10 of file PresampleTask.h.

Member Enumeration Documentation

Enumerator
kPedestal 
nMESets 

Definition at line 21 of file PresampleTask.h.

Constructor & Destructor Documentation

ecaldqm::PresampleTask::PresampleTask ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 8 of file PresampleTask.cc.

References ecaldqm::DQWorkerTask::collectionMask_, ecaldqm::kEBDigi, and ecaldqm::kEEDigi.

8  :
9  DQWorkerTask(_params, _paths, "PresampleTask")
10  {
12  (0x1 << kEBDigi) |
13  (0x1 << kEEDigi);
14  }
DQWorkerTask(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
Definition: DQWorkerTask.cc:5
ecaldqm::PresampleTask::~PresampleTask ( )

Definition at line 16 of file PresampleTask.cc.

17  {
18  }

Member Function Documentation

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

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 29 of file PresampleTask.h.

References ecaldqm::kEBDigi, ecaldqm::kEEDigi, and runOnDigis().

29  {
30  switch(_collection){
31  case kEBDigi:
32  case kEEDigi:
33  runOnDigis(*static_cast<const EcalDigiCollection*>(_p));
34  break;
35  default:
36  break;
37  }
38  }
void runOnDigis(const EcalDigiCollection &)
bool ecaldqm::PresampleTask::filterRunType ( const std::vector< short > &  _runType)
overridevirtual
void ecaldqm::PresampleTask::runOnDigis ( const EcalDigiCollection _digis)

Definition at line 36 of file PresampleTask.cc.

References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), kPedestal, timingPdfMaker::mean, and ecaldqm::DQWorker::MEs_.

Referenced by analyze().

37  {
38  for(EcalDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
39  DetId id(digiItr->id());
40 
41  // EcalDataFrame is not a derived class of edm::DataFrame, but can take edm::DataFrame in the constructor
42  EcalDataFrame dataFrame(*digiItr);
43 
44  float mean(0.);
45  bool gainSwitch(false);
46 
47  for(int iSample(0); iSample < 3; iSample++){
48  if(dataFrame.sample(iSample).gainId() != 1){
49  gainSwitch = true;
50  break;
51  }
52 
53  mean += dataFrame.sample(iSample).adc();
54  }
55  if(gainSwitch) continue;
56 
57  mean /= 3.;
58 
59  MEs_[kPedestal]->fill(id, mean);
60  }
61  }
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator begin() const
Definition: DetId.h:18
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
const_iterator end() const
void ecaldqm::PresampleTask::setMEData ( std::vector< MEData > &  _data)
static