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 
15 
17 
18 namespace ecaldqm {
19 
21  public:
23  ~SelectiveReadoutTask() override {}
24 
25  void addDependencies(DependencySet&) override;
26 
27  void beginRun(edm::Run const&, edm::EventSetup const&) override;
28  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
29 
30  bool analyze(void const*, Collections) override;
31 
32  void runOnSource(FEDRawDataCollection const&);
34  template <typename SRFlagCollection>
35  void runOnSrFlags(SRFlagCollection const&, Collections);
36  template <typename DigiCollection>
38  void setTokens(edm::ConsumesCollector&) override;
39 
40  enum Constants {
41  nFIRTaps = 6,
44  };
45 
46  private:
47  void setParams(edm::ParameterSet const&) override;
48 
49  void setFIRWeights_(std::vector<double> const&);
50 
51  bool useCondDb_;
53  std::vector<int> ZSFIRWeights_;
54 
55  std::set<std::pair<int, int> > suppressed_;
56  std::vector<short> flags_;
58  };
59 
60  inline bool SelectiveReadoutTask::analyze(void const* _p, Collections _collection) {
61  switch (_collection) {
62  case kSource:
63  if (_p)
64  runOnSource(*static_cast<FEDRawDataCollection const*>(_p));
65  return true;
66  break;
67  case kEcalRawData:
68  if (_p)
69  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
70  return true;
71  break;
72  case kEBSrFlag:
73  if (_p)
74  runOnSrFlags(*static_cast<EBSrFlagCollection const*>(_p), _collection);
75  return true;
76  break;
77  case kEESrFlag:
78  if (_p)
79  runOnSrFlags(*static_cast<EESrFlagCollection const*>(_p), _collection);
80  return true;
81  break;
82  case kEBDigi:
83  if (_p)
84  runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
85  return true;
86  break;
87  case kEEDigi:
88  if (_p)
89  runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
90  return true;
91  break;
92  default:
93  break;
94  }
95  return false;
96  }
97 
98 } // namespace ecaldqm
99 
100 #endif
ecaldqm::SelectiveReadoutTask::bytesPerCrystal
Definition: SelectiveReadoutTask.h:42
ecaldqm::SelectiveReadoutTask::analyze
bool analyze(void const *, Collections) override
Definition: SelectiveReadoutTask.h:60
ecaldqm
Definition: DQWorker.h:37
EcalSRSettingsRcd.h
ecaldqm::SelectiveReadoutTask
Definition: SelectiveReadoutTask.h:20
ecaldqm::SelectiveReadoutTask::Constants
Constants
Definition: SelectiveReadoutTask.h:40
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:39
ecaldqm::kEEDigi
Definition: Collections.h:26
ecaldqm::SelectiveReadoutTask::ZSFIRWeights_
std::vector< int > ZSFIRWeights_
Definition: SelectiveReadoutTask.h:53
ecaldqm::kEESrFlag
Definition: Collections.h:24
edm::SortedCollection
Definition: SortedCollection.h:49
EcalTrigTowerDetId::kEBTotalTowers
Definition: EcalTrigTowerDetId.h:116
ecaldqm::kEcalRawData
Definition: Collections.h:10
ecaldqm::SelectiveReadoutTask::SelectiveReadoutTask
SelectiveReadoutTask()
Definition: SelectiveReadoutTask.cc:17
ecaldqm::SelectiveReadoutTask::runOnDigis
void runOnDigis(DigiCollection const &, Collections)
Definition: SelectiveReadoutTask.cc:147
EcalSRSettings.h
ecaldqm::SelectiveReadoutTask::hSr
edm::ESGetToken< EcalSRSettings, EcalSRSettingsRcd > hSr
Definition: SelectiveReadoutTask.h:57
EcalRawDataCollections.h
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
EcalDigiCollections.h
ecaldqm::SelectiveReadoutTask::nFIRTaps
Definition: SelectiveReadoutTask.h:41
EcalTrigTowerDetId.h
ecaldqm::SelectiveReadoutTask::nRU
Definition: SelectiveReadoutTask.h:43
ecaldqm::SelectiveReadoutTask::suppressed_
std::set< std::pair< int, int > > suppressed_
Definition: SelectiveReadoutTask.h:55
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
ecaldqm::SelectiveReadoutTask::runOnSrFlags
void runOnSrFlags(SRFlagCollection const &, Collections)
Definition: SelectiveReadoutTask.cc:102
edm::ParameterSet
Definition: ParameterSet.h:47
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:23
edm::EventSetup
Definition: EventSetup.h:58
ecaldqm::SelectiveReadoutTask::runOnRawData
void runOnRawData(EcalRawDataCollection const &)
Definition: SelectiveReadoutTask.cc:91
ecaldqm::SelectiveReadoutTask::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: SelectiveReadoutTask.cc:44
ecaldqm::SelectiveReadoutTask::runOnSource
void runOnSource(FEDRawDataCollection const &)
Definition: SelectiveReadoutTask.cc:66
edm::ESGetToken< EcalSRSettings, EcalSRSettingsRcd >
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
ecaldqm::SelectiveReadoutTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: SelectiveReadoutTask.cc:61
ecaldqm::kEBDigi
Definition: Collections.h:25
DQWorkerTask.h
EcalScDetId.h
ecaldqm::SelectiveReadoutTask::useCondDb_
bool useCondDb_
Definition: SelectiveReadoutTask.h:51
ecaldqm::SelectiveReadoutTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: SelectiveReadoutTask.cc:35
ecaldqm::SelectiveReadoutTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: SelectiveReadoutTask.cc:25
edm::Event
Definition: Event.h:73
ecaldqm::SelectiveReadoutTask::flags_
std::vector< short > flags_
Definition: SelectiveReadoutTask.h:56
EcalChannelStatus.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
ecaldqm::SelectiveReadoutTask::iFirstSample_
int iFirstSample_
Definition: SelectiveReadoutTask.h:52
EcalScDetId::kSizeForDenseIndexing
Definition: EcalScDetId.h:188