CMS 3D CMS Logo

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

L1TrackTrigger r-z Hough Transform emulator. More...

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

Public Member Functions

 ProducerZHT (const ParameterSet &)
 
 ~ProducerZHT () 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 r-z Hough Transform emulator.

Author
Thomas Schuh
Date
2021, May

Definition at line 32 of file ProducerZHT.cc.

Constructor & Destructor Documentation

◆ ProducerZHT()

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

Definition at line 60 of file ProducerZHT.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>("LabelMHT");
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:307
EDGetTokenT< StreamsStub > edGetToken_
Definition: ProducerZHT.cc:43
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerZHT.cc:49
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerZHT.cc:45
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerZHT.cc:47
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerZHT.cc:51
char const * label

◆ ~ProducerZHT()

trackerTFP::ProducerZHT::~ProducerZHT ( )
inlineoverride

Definition at line 35 of file ProducerZHT.cc.

35 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 73 of file ProducerZHT.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:307
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerZHT.cc:49
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerZHT.cc:51
const Setup * setup_
Definition: ProducerZHT.cc:55
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:242
const DataFormats * dataFormats_
Definition: ProducerZHT.cc:57

◆ endJob()

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

Definition at line 40 of file ProducerZHT.cc.

40 {}

◆ produce()

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

Definition at line 85 of file ProducerZHT.cc.

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

85  {
86  // empty MHT products
89  // read in HT Product and produce MHT 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 in a region finer rough candidates in r-phi
97  // read in and organize input product
98  zht.consume(streams);
99  // fill output products
100  zht.produce(accepted, lost);
101  }
102  }
103  // store products
104  iEvent.emplace(edPutTokenAccepted_, std::move(accepted));
105  iEvent.emplace(edPutTokenLost_, std::move(lost));
106  }
EDGetTokenT< StreamsStub > edGetToken_
Definition: ProducerZHT.cc:43
int numStreams(Process p) const
Definition: DataFormats.h:500
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerZHT.cc:45
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerZHT.cc:47
int iEvent
Definition: GenABIO.cc:224
const Setup * setup_
Definition: ProducerZHT.cc:55
bool configurationSupported() const
Definition: Setup.h:60
const DataFormats * dataFormats_
Definition: ProducerZHT.cc:57
int numRegions() const
Definition: Setup.h:349
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ dataFormats_

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

Definition at line 57 of file ProducerZHT.cc.

Referenced by beginRun(), and produce().

◆ edGetToken_

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

Definition at line 43 of file ProducerZHT.cc.

Referenced by produce(), and ProducerZHT().

◆ edPutTokenAccepted_

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

Definition at line 45 of file ProducerZHT.cc.

Referenced by produce(), and ProducerZHT().

◆ edPutTokenLost_

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

Definition at line 47 of file ProducerZHT.cc.

Referenced by produce(), and ProducerZHT().

◆ esGetTokenDataFormats_

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

Definition at line 51 of file ProducerZHT.cc.

Referenced by beginRun(), and ProducerZHT().

◆ esGetTokenSetup_

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

Definition at line 49 of file ProducerZHT.cc.

Referenced by beginRun(), and ProducerZHT().

◆ iConfig_

ParameterSet trackerTFP::ProducerZHT::iConfig_
private

Definition at line 53 of file ProducerZHT.cc.

Referenced by beginRun(), and produce().

◆ setup_

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