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 | Protected Attributes
ecaldqm::PNPresampleTask Class Reference

#include <PNPresampleTask.h>

Inheritance diagram for ecaldqm::PNPresampleTask:
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)
 
void beginRun (const edm::Run &, const edm::EventSetup &)
 
void endEvent (const edm::Event &, const edm::EventSetup &)
 
bool filterRunType (const std::vector< short > &)
 
 PNPresampleTask (const edm::ParameterSet &, const edm::ParameterSet &)
 
void runOnPnDigis (const EcalPnDiodeDigiCollection &)
 
 ~PNPresampleTask ()
 
- 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 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 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 > &)
 

Protected Attributes

bool enable_ [BinService::nDCC]
 
- 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_
 

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 &)
 

Detailed Description

Definition at line 10 of file PNPresampleTask.h.

Member Enumeration Documentation

Enumerator
kPedestal 
nMESets 

Definition at line 24 of file PNPresampleTask.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file PNPresampleTask.cc.

References ecaldqm::DQWorkerTask::collectionMask_, and ecaldqm::kPnDiodeDigi.

7  :
8  DQWorkerTask(_params, _paths, "PNPresampleTask")
9  {
11  (0x1 << kPnDiodeDigi);
12  }
DQWorkerTask(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
Definition: DQWorkerTask.cc:5
ecaldqm::PNPresampleTask::~PNPresampleTask ( )

Definition at line 14 of file PNPresampleTask.cc.

15  {
16  }

Member Function Documentation

void ecaldqm::PNPresampleTask::analyze ( const void *  _p,
Collections  _collection 
)
inlinevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 35 of file PNPresampleTask.h.

References ecaldqm::kPnDiodeDigi, and runOnPnDigis().

35  {
36  switch(_collection){
37  case kPnDiodeDigi:
38  runOnPnDigis(*static_cast<const EcalPnDiodeDigiCollection*>(_p));
39  break;
40  default:
41  break;
42  }
43  }
void runOnPnDigis(const EcalPnDiodeDigiCollection &)
void ecaldqm::PNPresampleTask::beginRun ( const edm::Run ,
const edm::EventSetup  
)
virtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 19 of file PNPresampleTask.cc.

References enable_.

20  {
21  for(int idcc(0); idcc < 54; idcc++)
22  enable_[idcc] = false;
23  }
bool enable_[BinService::nDCC]
void ecaldqm::PNPresampleTask::endEvent ( const edm::Event ,
const edm::EventSetup  
)
virtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 26 of file PNPresampleTask.cc.

References enable_.

27  {
28  for(int idcc(0); idcc < 54; idcc++)
29  enable_[idcc] = false;
30  }
bool enable_[BinService::nDCC]
bool ecaldqm::PNPresampleTask::filterRunType ( const std::vector< short > &  _runType)
virtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 33 of file PNPresampleTask.cc.

References enable_, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, EcalDCCHeaderBlock::TESTPULSE_GAP, and EcalDCCHeaderBlock::TESTPULSE_MGPA.

34  {
35  bool enable(false);
36 
37  for(int iDCC(0); iDCC < 54; iDCC++){
38  if(_runType[iDCC] == EcalDCCHeaderBlock::LASER_STD ||
39  _runType[iDCC] == EcalDCCHeaderBlock::LASER_GAP ||
40  _runType[iDCC] == EcalDCCHeaderBlock::TESTPULSE_MGPA ||
41  _runType[iDCC] == EcalDCCHeaderBlock::TESTPULSE_GAP){
42  enable = true;
43  enable_[iDCC] = true;
44  }
45  }
46 
47  return enable;
48  }
bool enable_[BinService::nDCC]
void ecaldqm::PNPresampleTask::runOnPnDigis ( const EcalPnDiodeDigiCollection _digis)

Definition at line 51 of file PNPresampleTask.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), kPedestal, timingPdfMaker::mean, and ecaldqm::DQWorker::MEs_.

Referenced by analyze().

52  {
53  for(EcalPnDiodeDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
54  const EcalPnDiodeDetId& id(digiItr->id());
55 
56  float mean(0.);
57  bool gainSwitch(false);
58 
59  for(int iSample(0); iSample < 4; iSample++){
60  if(digiItr->sample(iSample).gainId() != 1){
61  gainSwitch = true;
62  break;
63  }
64  mean += digiItr->sample(iSample).adc();
65  }
66  if(gainSwitch) continue;
67 
68  mean /= 4.;
69 
70  MEs_[kPedestal]->fill(id, mean);
71  }
72  }
std::vector< T >::const_iterator const_iterator
const_iterator end() const
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
const_iterator begin() const
void ecaldqm::PNPresampleTask::setMEData ( std::vector< MEData > &  _data)
static

Member Data Documentation

bool ecaldqm::PNPresampleTask::enable_[BinService::nDCC]
protected

Definition at line 32 of file PNPresampleTask.h.

Referenced by beginRun(), endEvent(), and filterRunType().