CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
trackerTFP::ProducerHT Class Reference

L1TrackTrigger Hough Transform emulator. More...

Inheritance diagram for trackerTFP::ProducerHT:
edm::stream::EDProducer<>

Public Member Functions

 ProducerHT (const ParameterSet &)
 
 ~ProducerHT () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void beginRun (const Run &, const EventSetup &) override
 
virtual void endJob ()
 
void produce (Event &, const EventSetup &) override
 

Private Attributes

const DataFormatsdataFormats_ = nullptr
 
EDGetTokenT< StreamsStubedGetToken_
 
EDPutTokenT< StreamsStubedPutTokenAccepted_
 
EDPutTokenT< StreamsStubedPutTokenLost_
 
ESGetToken< DataFormats, DataFormatsRcdesGetTokenDataFormats_
 
ESGetToken< Setup, SetupRcdesGetTokenSetup_
 
ParameterSet iConfig_
 
const Setupsetup_ = nullptr
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

L1TrackTrigger Hough Transform emulator.

Author
Thomas Schuh
Date
2020, March

Definition at line 32 of file ProducerHT.cc.

Constructor & Destructor Documentation

◆ ProducerHT()

trackerTFP::ProducerHT::ProducerHT ( const ParameterSet iConfig)
explicit

Definition at line 60 of file ProducerHT.cc.

References edGetToken_, edPutTokenAccepted_, edPutTokenLost_, esGetTokenDataFormats_, esGetTokenSetup_, edm::ParameterSet::getParameter(), ProducerED_cfi::InputTag, and label.

60  : iConfig_(iConfig) {
61  const string& label = iConfig.getParameter<string>("LabelGP");
62  const string& branchAccepted = iConfig.getParameter<string>("BranchAcceptedStubs");
63  const string& branchLost = iConfig.getParameter<string>("BranchLostStubs");
64  // book in- and output ED products
65  edGetToken_ = consumes<StreamsStub>(InputTag(label, branchAccepted));
66  edPutTokenAccepted_ = produces<StreamsStub>(branchAccepted);
67  edPutTokenLost_ = produces<StreamsStub>(branchLost);
68  // book ES products
69  esGetTokenSetup_ = esConsumes<Setup, SetupRcd, Transition::BeginRun>();
70  esGetTokenDataFormats_ = esConsumes<DataFormats, DataFormatsRcd, Transition::BeginRun>();
71  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
char const * label
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerHT.cc:49
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerHT.cc:45
ParameterSet iConfig_
Definition: ProducerHT.cc:53
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerHT.cc:51
EDGetTokenT< StreamsStub > edGetToken_
Definition: ProducerHT.cc:43
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerHT.cc:47

◆ ~ProducerHT()

trackerTFP::ProducerHT::~ProducerHT ( )
inlineoverride

Definition at line 35 of file ProducerHT.cc.

35 {}

Member Function Documentation

◆ beginRun()

void trackerTFP::ProducerHT::beginRun ( const Run iRun,
const EventSetup iSetup 
)
overrideprivate

Definition at line 73 of file ProducerHT.cc.

References tt::Setup::checkHistory(), tt::Setup::configurationSupported(), dataFormats_, esGetTokenDataFormats_, esGetTokenSetup_, edm::EventSetup::getData(), edm::ParameterSet::getParameter(), iConfig_, edm::Run::processHistory(), and setup_.

73  {
74  // helper class to store configurations
75  setup_ = &iSetup.getData(esGetTokenSetup_);
77  return;
78  // check process history if desired
79  if (iConfig_.getParameter<bool>("CheckHistory"))
81  // helper class to extract structured data from tt::Frames
83  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerHT.cc:49
bool configurationSupported() const
Definition: Setup.h:60
ProcessHistory const & processHistory() const
Definition: Run.cc:115
void checkHistory(const edm::ProcessHistory &processHistory) const
Definition: Setup.cc:238
ParameterSet iConfig_
Definition: ProducerHT.cc:53
const Setup * setup_
Definition: ProducerHT.cc:55
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerHT.cc:51
const DataFormats * dataFormats_
Definition: ProducerHT.cc:57

◆ endJob()

virtual void trackerTFP::ProducerHT::endJob ( void  )
inlineprivatevirtual

Definition at line 40 of file ProducerHT.cc.

40 {}

◆ produce()

void trackerTFP::ProducerHT::produce ( Event iEvent,
const EventSetup iSetup 
)
overrideprivate

Definition at line 85 of file ProducerHT.cc.

References tt::Setup::configurationSupported(), dataFormats_, edGetToken_, edPutTokenAccepted_, edPutTokenLost_, patZpeak::handle, trackerTFP::ht, iConfig_, iEvent, eostools::move(), tt::Setup::numRegions(), trackerTFP::DataFormats::numStreams(), HLT_2023v12_cff::region, setup_, and HLT_2023v12_cff::streams.

85  {
86  // empty HT products
89  // read in DTC Product and produce TFP product
92  iEvent.getByToken<StreamsStub>(edGetToken_, handle);
93  const StreamsStub& streams = *handle.product();
94  for (int region = 0; region < setup_->numRegions(); region++) {
95  // object to find initial rough candidates in r-phi in a region
97  // read in and organize input product
98  ht.consume(streams);
99  // fill output products
100  ht.produce(accepted, lost);
101  }
102  }
103  // store products
104  iEvent.emplace(edPutTokenAccepted_, move(accepted));
105  iEvent.emplace(edPutTokenLost_, move(lost));
106  }
int numStreams(Process p) const
Definition: DataFormats.h:500
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
int iEvent
Definition: GenABIO.cc:224
bool configurationSupported() const
Definition: Setup.h:60
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerHT.cc:45
ParameterSet iConfig_
Definition: ProducerHT.cc:53
int numRegions() const
Definition: Setup.h:345
const Setup * setup_
Definition: ProducerHT.cc:55
const DataFormats * dataFormats_
Definition: ProducerHT.cc:57
def move(src, dest)
Definition: eostools.py:511
EDGetTokenT< StreamsStub > edGetToken_
Definition: ProducerHT.cc:43
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerHT.cc:47

Member Data Documentation

◆ dataFormats_

const DataFormats* trackerTFP::ProducerHT::dataFormats_ = nullptr
private

Definition at line 57 of file ProducerHT.cc.

Referenced by beginRun(), and produce().

◆ edGetToken_

EDGetTokenT<StreamsStub> trackerTFP::ProducerHT::edGetToken_
private

Definition at line 43 of file ProducerHT.cc.

Referenced by produce(), and ProducerHT().

◆ edPutTokenAccepted_

EDPutTokenT<StreamsStub> trackerTFP::ProducerHT::edPutTokenAccepted_
private

Definition at line 45 of file ProducerHT.cc.

Referenced by produce(), and ProducerHT().

◆ edPutTokenLost_

EDPutTokenT<StreamsStub> trackerTFP::ProducerHT::edPutTokenLost_
private

Definition at line 47 of file ProducerHT.cc.

Referenced by produce(), and ProducerHT().

◆ esGetTokenDataFormats_

ESGetToken<DataFormats, DataFormatsRcd> trackerTFP::ProducerHT::esGetTokenDataFormats_
private

Definition at line 51 of file ProducerHT.cc.

Referenced by beginRun(), and ProducerHT().

◆ esGetTokenSetup_

ESGetToken<Setup, SetupRcd> trackerTFP::ProducerHT::esGetTokenSetup_
private

Definition at line 49 of file ProducerHT.cc.

Referenced by beginRun(), and ProducerHT().

◆ iConfig_

ParameterSet trackerTFP::ProducerHT::iConfig_
private

Definition at line 53 of file ProducerHT.cc.

Referenced by beginRun(), and produce().

◆ setup_

const Setup* trackerTFP::ProducerHT::setup_ = nullptr
private