CMS 3D CMS Logo

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

L1TrackTrigger Mini Hough Transform emulator. More...

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

Public Member Functions

 ProducerMHT (const ParameterSet &)
 
 ~ProducerMHT () 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 Mini Hough Transform emulator.

Author
Thomas Schuh
Date
2020, May

Definition at line 32 of file ProducerMHT.cc.

Constructor & Destructor Documentation

◆ ProducerMHT()

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

Definition at line 60 of file ProducerMHT.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>("LabelHT");
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  }
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerMHT.cc:51
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerMHT.cc:49
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerMHT.cc:45
EDGetTokenT< StreamsStub > edGetToken_
Definition: ProducerMHT.cc:43
char const * label
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerMHT.cc:47

◆ ~ProducerMHT()

trackerTFP::ProducerMHT::~ProducerMHT ( )
inlineoverride

Definition at line 35 of file ProducerMHT.cc.

35 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 73 of file ProducerMHT.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  }
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerMHT.cc:51
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerMHT.cc:49
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
const DataFormats * dataFormats_
Definition: ProducerMHT.cc:57
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
const Setup * setup_
Definition: ProducerMHT.cc:55

◆ endJob()

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

Definition at line 40 of file ProducerMHT.cc.

40 {}

◆ produce()

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

Definition at line 85 of file ProducerMHT.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_, and HLT_2023v12_cff::streams.

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  mht.consume(streams);
99  // fill output products
100  mht.produce(accepted, lost);
101  }
102  }
103  // store products
104  iEvent.emplace(edPutTokenAccepted_, std::move(accepted));
105  iEvent.emplace(edPutTokenLost_, std::move(lost));
106  }
int numStreams(Process p) const
Definition: DataFormats.h:500
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerMHT.cc:45
EDGetTokenT< StreamsStub > edGetToken_
Definition: ProducerMHT.cc:43
int iEvent
Definition: GenABIO.cc:224
const DataFormats * dataFormats_
Definition: ProducerMHT.cc:57
bool configurationSupported() const
Definition: Setup.h:60
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerMHT.cc:47
int numRegions() const
Definition: Setup.h:345
const Setup * setup_
Definition: ProducerMHT.cc:55
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ dataFormats_

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

Definition at line 57 of file ProducerMHT.cc.

Referenced by beginRun(), and produce().

◆ edGetToken_

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

Definition at line 43 of file ProducerMHT.cc.

Referenced by produce(), and ProducerMHT().

◆ edPutTokenAccepted_

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

Definition at line 45 of file ProducerMHT.cc.

Referenced by produce(), and ProducerMHT().

◆ edPutTokenLost_

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

Definition at line 47 of file ProducerMHT.cc.

Referenced by produce(), and ProducerMHT().

◆ esGetTokenDataFormats_

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

Definition at line 51 of file ProducerMHT.cc.

Referenced by beginRun(), and ProducerMHT().

◆ esGetTokenSetup_

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

Definition at line 49 of file ProducerMHT.cc.

Referenced by beginRun(), and ProducerMHT().

◆ iConfig_

ParameterSet trackerTFP::ProducerMHT::iConfig_
private

Definition at line 53 of file ProducerMHT.cc.

Referenced by beginRun(), and produce().

◆ setup_

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