CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TotemT2RecHitProducer Class Reference
Inheritance diagram for TotemT2RecHitProducer:
edm::stream::EDProducer<>

Public Member Functions

 TotemT2RecHitProducer (const edm::ParameterSet &)
 
- 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
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

TotemT2RecHitProducerAlgorithm algo_
 
const bool applyCalib_
 A watcher to detect timing calibration changes. More...
 
edm::EDGetTokenT< edmNew::DetSetVector< TotemT2Digi > > digiToken_
 
edm::ESGetToken< TotemGeometry, TotemGeometryRcdgeometryToken_
 

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

Definition at line 31 of file TotemT2RecHitProducer.cc.

Constructor & Destructor Documentation

◆ TotemT2RecHitProducer()

TotemT2RecHitProducer::TotemT2RecHitProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 48 of file TotemT2RecHitProducer.cc.

50  geometryToken_(esConsumes<TotemGeometry, TotemGeometryRcd>()),
51  applyCalib_(iConfig.getParameter<bool>("applyCalibration")),
52  algo_(iConfig) {
53  produces<edmNew::DetSetVector<TotemT2RecHit> >();
54 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edmNew::DetSetVector< TotemT2Digi > > digiToken_
TotemT2RecHitProducerAlgorithm algo_
edm::ESGetToken< TotemGeometry, TotemGeometryRcd > geometryToken_
const bool applyCalib_
A watcher to detect timing calibration changes.

Member Function Documentation

◆ fillDescriptions()

void TotemT2RecHitProducer::fillDescriptions ( edm::ConfigurationDescriptions descr)
static

Definition at line 70 of file TotemT2RecHitProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

70  {
72 
73  desc.add<edm::InputTag>("digiTag", edm::InputTag("totemT2Digis", "TotemT2"))
74  ->setComment("input digis collection to retrieve");
75  desc.add<double>("timeSliceNs", 25.0 / 4.0)
76  ->setComment("conversion constant between timing bin size and nanoseconds");
77  desc.add<bool>("applyCalibration", false)->setComment("switch on/off the timing calibration (not in use)");
78 
79  descr.add("totemT2RecHits", desc);
80 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void TotemT2RecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 56 of file TotemT2RecHitProducer.cc.

References algo_, TotemT2RecHitProducerAlgorithm::build(), digiToken_, geometryToken_, edm::EventSetup::getData(), iEvent, and eostools::move().

56  {
57  auto pOut = std::make_unique<edmNew::DetSetVector<TotemT2RecHit> >();
58 
59  // get the digi collection
60  const auto& digis = iEvent.get(digiToken_);
61 
62  if (!digis.empty()) {
63  // produce the rechits collection
64  algo_.build(iSetup.getData(geometryToken_), digis, *pOut);
65  }
66 
67  iEvent.put(std::move(pOut));
68 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::EDGetTokenT< edmNew::DetSetVector< TotemT2Digi > > digiToken_
int iEvent
Definition: GenABIO.cc:224
void build(const TotemGeometry &, const edmNew::DetSetVector< TotemT2Digi > &, edmNew::DetSetVector< TotemT2RecHit > &) override
TotemT2RecHitProducerAlgorithm algo_
edm::ESGetToken< TotemGeometry, TotemGeometryRcd > geometryToken_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ algo_

TotemT2RecHitProducerAlgorithm TotemT2RecHitProducer::algo_
private

Definition at line 45 of file TotemT2RecHitProducer.cc.

Referenced by produce().

◆ applyCalib_

const bool TotemT2RecHitProducer::applyCalib_
private

A watcher to detect timing calibration changes.

Definition at line 44 of file TotemT2RecHitProducer.cc.

◆ digiToken_

edm::EDGetTokenT<edmNew::DetSetVector<TotemT2Digi> > TotemT2RecHitProducer::digiToken_
private

Definition at line 40 of file TotemT2RecHitProducer.cc.

Referenced by produce().

◆ geometryToken_

edm::ESGetToken<TotemGeometry, TotemGeometryRcd> TotemT2RecHitProducer::geometryToken_
private

Definition at line 41 of file TotemT2RecHitProducer.cc.

Referenced by produce().