CMS 3D CMS Logo

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:
21  ~SelectiveReadoutTask() override {}
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>
33  void runOnSrFlags(SRFlagCollection const&, Collections);
34  template <typename DigiCollection>
36 
37  enum Constants {
38  nFIRTaps = 6,
41  };
42 
43  private:
44  void setParams(edm::ParameterSet const&) override;
45 
46  void setFIRWeights_(std::vector<double> const&);
47 
48  bool useCondDb_;
50  std::vector<int> ZSFIRWeights_;
51 
52  std::set<std::pair<int, int> > suppressed_;
53  std::vector<short> flags_;
54  };
55 
56  inline bool SelectiveReadoutTask::analyze(void const* _p, Collections _collection) {
57  switch (_collection) {
58  case kSource:
59  if (_p)
60  runOnSource(*static_cast<FEDRawDataCollection const*>(_p));
61  return true;
62  break;
63  case kEcalRawData:
64  if (_p)
65  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
66  return true;
67  break;
68  case kEBSrFlag:
69  if (_p)
70  runOnSrFlags(*static_cast<EBSrFlagCollection const*>(_p), _collection);
71  return true;
72  break;
73  case kEESrFlag:
74  if (_p)
75  runOnSrFlags(*static_cast<EESrFlagCollection const*>(_p), _collection);
76  return true;
77  break;
78  case kEBDigi:
79  if (_p)
80  runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
81  return true;
82  break;
83  case kEEDigi:
84  if (_p)
85  runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
86  return true;
87  break;
88  default:
89  break;
90  }
91  return false;
92  }
93 
94 } // namespace ecaldqm
95 
96 #endif
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:45