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
ecaldqm::SelectiveReadoutTask::bytesPerCrystal
Definition: SelectiveReadoutTask.h:39
ecaldqm::SelectiveReadoutTask::analyze
bool analyze(void const *, Collections) override
Definition: SelectiveReadoutTask.h:56
ecaldqm
Definition: DQWorker.h:24
ecaldqm::SelectiveReadoutTask
Definition: SelectiveReadoutTask.h:18
ecaldqm::SelectiveReadoutTask::Constants
Constants
Definition: SelectiveReadoutTask.h:37
ecaldqm::SelectiveReadoutTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: SelectiveReadoutTask.cc:62
ecaldqm::DependencySet
Definition: DQWorkerTask.h:44
ecaldqm::kSource
Definition: Collections.h:9
edm::Run
Definition: Run.h:45
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
ecaldqm::SelectiveReadoutTask::addDependencies
void addDependencies(DependencySet &) override
Definition: SelectiveReadoutTask.cc:38
ecaldqm::kEEDigi
Definition: Collections.h:26
ecaldqm::SelectiveReadoutTask::ZSFIRWeights_
std::vector< int > ZSFIRWeights_
Definition: SelectiveReadoutTask.h:50
ecaldqm::kEESrFlag
Definition: Collections.h:24
edm::SortedCollection
Definition: SortedCollection.h:49
ecaldqm::kEcalRawData
Definition: Collections.h:10
ecaldqm::SelectiveReadoutTask::SelectiveReadoutTask
SelectiveReadoutTask()
Definition: SelectiveReadoutTask.cc:20
ecaldqm::SelectiveReadoutTask::runOnDigis
void runOnDigis(DigiCollection const &, Collections)
Definition: SelectiveReadoutTask.cc:148
EcalRawDataCollections.h
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
EcalDigiCollections.h
ecaldqm::SelectiveReadoutTask::nFIRTaps
Definition: SelectiveReadoutTask.h:38
EcalTrigTowerDetId.h
ecaldqm::SelectiveReadoutTask::nRU
Definition: SelectiveReadoutTask.h:40
ecaldqm::SelectiveReadoutTask::suppressed_
std::set< std::pair< int, int > > suppressed_
Definition: SelectiveReadoutTask.h:52
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
ecaldqm::SelectiveReadoutTask::runOnSrFlags
void runOnSrFlags(SRFlagCollection const &, Collections)
Definition: SelectiveReadoutTask.cc:103
edm::ParameterSet
Definition: ParameterSet.h:36
ecaldqm::SelectiveReadoutTask::setFIRWeights_
void setFIRWeights_(std::vector< double > const &)
Definition: SelectiveReadoutTask.cc:286
ecaldqm::kEBSrFlag
Definition: Collections.h:23
FEDRawDataCollection.h
ecaldqm::Collections
Collections
Definition: Collections.h:8
ecaldqm::SelectiveReadoutTask::~SelectiveReadoutTask
~SelectiveReadoutTask() override
Definition: SelectiveReadoutTask.h:21
edm::EventSetup
Definition: EventSetup.h:57
ecaldqm::SelectiveReadoutTask::runOnRawData
void runOnRawData(EcalRawDataCollection const &)
Definition: SelectiveReadoutTask.cc:92
ecaldqm::SelectiveReadoutTask::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: SelectiveReadoutTask.cc:43
ecaldqm::SelectiveReadoutTask::runOnSource
void runOnSource(FEDRawDataCollection const &)
Definition: SelectiveReadoutTask.cc:67
EcalTrigTowerDetId::kEBTotalTowers
Definition: EcalTrigTowerDetId.h:116
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
ecaldqm::kEBDigi
Definition: Collections.h:25
DQWorkerTask.h
EcalScDetId.h
ecaldqm::SelectiveReadoutTask::useCondDb_
bool useCondDb_
Definition: SelectiveReadoutTask.h:48
EcalScDetId::kSizeForDenseIndexing
Definition: EcalScDetId.h:188
ecaldqm::SelectiveReadoutTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: SelectiveReadoutTask.cc:28
edm::Event
Definition: Event.h:73
ecaldqm::SelectiveReadoutTask::flags_
std::vector< short > flags_
Definition: SelectiveReadoutTask.h:53
EcalChannelStatus.h
ecaldqm::SelectiveReadoutTask::iFirstSample_
int iFirstSample_
Definition: SelectiveReadoutTask.h:49