test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SelectiveReadoutTask.h
Go to the documentation of this file.
1 #ifndef SelectiveReadoutTask_H
2 #define SelectiveReadoutTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
13 
15 
16 namespace ecaldqm {
17 
19  public:
22 
23  void addDependencies(DependencySet&) override;
24 
25  void beginRun(edm::Run const&, edm::EventSetup const&) override;
26  void beginEvent(edm::Event const&, edm::EventSetup const&) override;
27 
28  bool analyze(void const*, Collections) override;
29 
30  void runOnSource(FEDRawDataCollection const&);
32  template<typename SRFlagCollection> void runOnSrFlags(SRFlagCollection const&, Collections);
33  template<typename DigiCollection> void runOnDigis(DigiCollection const&, Collections);
34 
35  enum Constants {
36  nFIRTaps = 6,
39  };
40 
41  private:
42  void setParams(edm::ParameterSet const&) override;
43 
44  void setFIRWeights_(std::vector<double> const&);
45 
46  bool useCondDb_;
48  std::vector<int> ZSFIRWeights_;
49 
50  std::set<std::pair<int, int> > suppressed_;
51  std::vector<short> flags_;
52  };
53 
54  inline bool SelectiveReadoutTask::analyze(void const* _p, Collections _collection){
55  switch(_collection){
56  case kSource:
57  if(_p) runOnSource(*static_cast<FEDRawDataCollection const*>(_p));
58  return true;
59  break;
60  case kEcalRawData:
61  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
62  return true;
63  break;
64  case kEBSrFlag:
65  if(_p) runOnSrFlags(*static_cast<EBSrFlagCollection const*>(_p), _collection);
66  return true;
67  break;
68  case kEESrFlag:
69  if(_p) runOnSrFlags(*static_cast<EESrFlagCollection const*>(_p), _collection);
70  return true;
71  break;
72  case kEBDigi:
73  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
74  return true;
75  break;
76  case kEEDigi:
77  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
78  return true;
79  break;
80  default:
81  break;
82  }
83  return false;
84  }
85 
86 }
87 
88 #endif
89 
void runOnDigis(DigiCollection const &, Collections)
void setFIRWeights_(std::vector< double > const &)
void beginEvent(edm::Event const &, edm::EventSetup const &) override
bool analyze(void const *, Collections) override
void runOnRawData(EcalRawDataCollection const &)
void setParams(edm::ParameterSet const &) override
void addDependencies(DependencySet &) override
void beginRun(edm::Run const &, edm::EventSetup const &) override
void runOnSrFlags(SRFlagCollection const &, Collections)
void runOnSource(FEDRawDataCollection const &)
std::set< std::pair< int, int > > suppressed_
Definition: Run.h:43