CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LaserTask.h
Go to the documentation of this file.
1 #ifndef LaserTask_H
2 #define LaserTask_H
3 
5 
9 
10 namespace ecaldqm {
11 
12  class LaserTask : public DQWorkerTask {
13  public:
15  ~LaserTask();
16 
17  bool filterRunType(const std::vector<short>&);
18 
19  void bookMEs();
20 
21  void beginRun(const edm::Run &, const edm::EventSetup &);
22  void endEvent(const edm::Event &, const edm::EventSetup &);
23 
24  void analyze(const void*, Collections);
25 
27  void runOnDigis(const EcalDigiCollection&);
30 
31  std::vector<int> const& getLaserWavelengths() const { return laserWavelengths_; }
32  std::vector<int> const& getMGPAGainsPN() const { return MGPAGainsPN_; }
33 
34  enum Constants {
35  nWL = 4,
36  nPNGain = 2
37  };
38 
39  enum MESets {
40  kAmplitudeSummary, // profile2d
41  kAmplitude = kAmplitudeSummary + nWL, // profile2d
43  kTiming = kOccupancy + nWL, // profile2d
45  kAOverP = kShape + nWL, // profile2d
46  kPNAmplitude = kAOverP + nWL, // profile2d
47  kPNOccupancy = kPNAmplitude + nWL * nPNGain, // profile2d
49  };
50 
51  static void setMEData(std::vector<MEData>&);
52 
53  private:
54  std::vector<int> laserWavelengths_;
55  std::vector<int> MGPAGainsPN_;
56 
59  std::map<int, std::vector<float> > pnAmp_;
60  };
61 
62  inline void LaserTask::analyze(const void* _p, Collections _collection){
63  switch(_collection){
64  case kEcalRawData:
65  runOnRawData(*static_cast<const EcalRawDataCollection*>(_p));
66  break;
67  case kEBDigi:
68  case kEEDigi:
69  runOnDigis(*static_cast<const EcalDigiCollection*>(_p));
70  break;
71  case kPnDiodeDigi:
72  runOnPnDigis(*static_cast<const EcalPnDiodeDigiCollection*>(_p));
73  break;
74  case kEBUncalibRecHit:
75  case kEEUncalibRecHit:
76  runOnUncalibRecHits(*static_cast<const EcalUncalibratedRecHitCollection*>(_p), _collection);
77  break;
78  default:
79  break;
80  }
81  }
82 
83 }
84 
85 #endif
void runOnRawData(const EcalRawDataCollection &)
Definition: LaserTask.cc:134
void endEvent(const edm::Event &, const edm::EventSetup &)
Definition: LaserTask.cc:108
std::vector< int > MGPAGainsPN_
Definition: LaserTask.h:55
std::map< int, std::vector< float > > pnAmp_
Definition: LaserTask.h:59
void beginRun(const edm::Run &, const edm::EventSetup &)
Definition: LaserTask.cc:98
bool filterRunType(const std::vector< short > &)
Definition: LaserTask.cc:118
void runOnDigis(const EcalDigiCollection &)
Definition: LaserTask.cc:148
void analyze(const void *, Collections)
Definition: LaserTask.h:62
std::vector< int > const & getLaserWavelengths() const
Definition: LaserTask.h:31
void runOnUncalibRecHits(const EcalUncalibratedRecHitCollection &, Collections)
Definition: LaserTask.cc:207
int wavelength_[BinService::nDCC]
Definition: LaserTask.h:58
std::vector< int > laserWavelengths_
Definition: LaserTask.h:54
std::vector< int > const & getMGPAGainsPN() const
Definition: LaserTask.h:32
bool enable_[BinService::nDCC]
Definition: LaserTask.h:57
LaserTask(const edm::ParameterSet &, const edm::ParameterSet &)
Definition: LaserTask.cc:13
static void setMEData(std::vector< MEData > &)
Definition: LaserTask.cc:268
void runOnPnDigis(const EcalPnDiodeDigiCollection &)
Definition: LaserTask.cc:169
Definition: Run.h:33