CMS 3D CMS Logo

ProducerHPH.cc
Go to the documentation of this file.
1 // This ESproducer produces configuration needed by HitPatternHelper
2 //
3 // Created by J.Li on 1/23/21.
4 //
5 
17 
18 #include <memory>
19 
20 using namespace std;
21 using namespace edm;
22 
23 namespace hph {
24 
25  class ProducerHPH : public ESProducer {
26  public:
27  ProducerHPH(const ParameterSet& iConfig);
28  ~ProducerHPH() override {}
29  unique_ptr<Setup> produce(const SetupRcd& Rcd);
30 
31  private:
36  };
37 
38  ProducerHPH::ProducerHPH(const ParameterSet& iConfig) : iConfig_(iConfig) {
39  auto cc = setWhatProduced(this);
40  esGetTokenSetup_ = cc.consumes();
41  esGetTokenDataFormats_ = cc.consumes();
42  esGetTokenLayerEncoding_ = cc.consumes();
43  }
44 
45  unique_ptr<Setup> ProducerHPH::produce(const SetupRcd& Rcd) {
46  const tt::Setup& setupTT = Rcd.get(esGetTokenSetup_);
47  const trackerTFP::DataFormats& dataFormats = Rcd.get(esGetTokenDataFormats_);
48  const trackerTFP::LayerEncoding& layerEncoding = Rcd.get(esGetTokenLayerEncoding_);
49  return make_unique<Setup>(iConfig_, setupTT, dataFormats, layerEncoding);
50  }
51 
52 } // namespace hph
53 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
ESGetToken< trackerTFP::LayerEncoding, trackerTFP::LayerEncodingRcd > esGetTokenLayerEncoding_
Definition: ProducerHPH.cc:35
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
unique_ptr< Setup > produce(const SetupRcd &Rcd)
Definition: ProducerHPH.cc:45
const ParameterSet iConfig_
Definition: ProducerHPH.cc:32
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
ESGetToken< tt::Setup, tt::SetupRcd > esGetTokenSetup_
Definition: ProducerHPH.cc:33
HLT enums.
ESGetToken< trackerTFP::DataFormats, trackerTFP::DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerHPH.cc:34
Class to encode layer ids for Kalman Filter Layers consitent with rough r-z track parameters are coun...
Definition: LayerEncoding.h:19
Class to calculate and provide dataformats used by Track Trigger emulator.
Definition: DataFormats.h:216
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
~ProducerHPH() override
Definition: ProducerHPH.cc:28