CMS 3D CMS Logo

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

L1TrackTrigger Geometric Processor emulator. More...

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

Public Member Functions

 ProducerGP (const ParameterSet &)
 
 ~ProducerGP () 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< TTDTCedGetToken_
 
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 Geometric Processor emulator.

Author
Thomas Schuh
Date
2020, March

Definition at line 33 of file ProducerGP.cc.

Constructor & Destructor Documentation

◆ ProducerGP()

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

Definition at line 61 of file ProducerGP.cc.

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

61  : iConfig_(iConfig) {
62  const string& label = iConfig.getParameter<string>("LabelDTC");
63  const string& branchAccepted = iConfig.getParameter<string>("BranchAcceptedStubs");
64  const string& branchLost = iConfig.getParameter<string>("BranchLostStubs");
65  // book in- and output ED products
66  edGetToken_ = consumes<TTDTC>(InputTag(label, branchAccepted));
67  edPutTokenAccepted_ = produces<StreamsStub>(branchAccepted);
68  edPutTokenLost_ = produces<StreamsStub>(branchLost);
69  // book ES products
70  esGetTokenSetup_ = esConsumes<Setup, SetupRcd, Transition::BeginRun>();
71  esGetTokenDataFormats_ = esConsumes<DataFormats, DataFormatsRcd, Transition::BeginRun>();
72  }
ParameterSet iConfig_
Definition: ProducerGP.cc:54
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
EDGetTokenT< TTDTC > edGetToken_
Definition: ProducerGP.cc:44
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerGP.cc:46
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerGP.cc:52
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerGP.cc:48
char const * label
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerGP.cc:50

◆ ~ProducerGP()

trackerTFP::ProducerGP::~ProducerGP ( )
inlineoverride

Definition at line 36 of file ProducerGP.cc.

36 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 74 of file ProducerGP.cc.

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

74  {
75  setup_ = &iSetup.getData(esGetTokenSetup_);
77  return;
78  // check process history if desired
79  if (iConfig_.getParameter<bool>("CheckHistory"))
82  }
ParameterSet iConfig_
Definition: ProducerGP.cc:54
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
Definition: ProducerGP.cc:52
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Definition: ProducerGP.cc:50
const Setup * setup_
Definition: ProducerGP.cc:56
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: ProducerGP.cc:58

◆ endJob()

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

Definition at line 41 of file ProducerGP.cc.

41 {}

◆ produce()

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

Definition at line 84 of file ProducerGP.cc.

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

84  {
85  // empty GP products
88  // read in DTC Product and produce TFP product
91  iEvent.getByToken<TTDTC>(edGetToken_, handle);
92  const TTDTC& ttDTC = *handle.product();
93  for (int region = 0; region < setup_->numRegions(); region++) {
94  // object to route Stubs of one region to one stream per sector
96  // read in and organize input product
97  gp.consume(ttDTC);
98  // fill output products
99  gp.produce(accepted, lost);
100  }
101  }
102  // store products
103  iEvent.emplace(edPutTokenAccepted_, std::move(accepted));
104  iEvent.emplace(edPutTokenLost_, std::move(lost));
105  }
ParameterSet iConfig_
Definition: ProducerGP.cc:54
EDGetTokenT< TTDTC > edGetToken_
Definition: ProducerGP.cc:44
EDPutTokenT< StreamsStub > edPutTokenAccepted_
Definition: ProducerGP.cc:46
int numStreams(Process p) const
Definition: DataFormats.h:500
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
EDPutTokenT< StreamsStub > edPutTokenLost_
Definition: ProducerGP.cc:48
int iEvent
Definition: GenABIO.cc:224
const Setup * setup_
Definition: ProducerGP.cc:56
bool configurationSupported() const
Definition: Setup.h:60
Class to store hardware like structured TTStub Collection used by Track Trigger emulators.
Definition: TTDTC.h:17
const DataFormats * dataFormats_
Definition: ProducerGP.cc:58
int numRegions() const
Definition: Setup.h:349
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ dataFormats_

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

Definition at line 58 of file ProducerGP.cc.

Referenced by beginRun(), and produce().

◆ edGetToken_

EDGetTokenT<TTDTC> trackerTFP::ProducerGP::edGetToken_
private

Definition at line 44 of file ProducerGP.cc.

Referenced by produce(), and ProducerGP().

◆ edPutTokenAccepted_

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

Definition at line 46 of file ProducerGP.cc.

Referenced by produce(), and ProducerGP().

◆ edPutTokenLost_

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

Definition at line 48 of file ProducerGP.cc.

Referenced by produce(), and ProducerGP().

◆ esGetTokenDataFormats_

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

Definition at line 52 of file ProducerGP.cc.

Referenced by beginRun(), and ProducerGP().

◆ esGetTokenSetup_

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

Definition at line 50 of file ProducerGP.cc.

Referenced by beginRun(), and ProducerGP().

◆ iConfig_

ParameterSet trackerTFP::ProducerGP::iConfig_
private

Definition at line 54 of file ProducerGP.cc.

Referenced by beginRun(), and produce().

◆ setup_

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