CMS 3D CMS Logo

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

Public Member Functions

 CTPPSDiamondRecHitProducer (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

CTPPSDiamondRecHitProducerAlgorithm algo_
 
bool applyCalib_
 
edm::ESWatcher< PPSTimingCalibrationRcdcalibWatcher_
 A watcher to detect timing calibration changes. More...
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
 
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecordgeometryToken_
 
edm::ESWatcher< PPSTimingCalibrationLUTRcdlutWatcher_
 
edm::ESGetToken< PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcdtimingCalibrationLUTToken_
 
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcdtimingCalibrationToken_
 

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 36 of file CTPPSDiamondRecHitProducer.cc.

Constructor & Destructor Documentation

◆ CTPPSDiamondRecHitProducer()

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

Definition at line 58 of file CTPPSDiamondRecHitProducer.cc.

References applyCalib_, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, timingCalibrationLUTToken_, and timingCalibrationToken_.

60  geometryToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()),
61  applyCalib_(iConfig.getParameter<bool>("applyCalibration")),
62  algo_(iConfig) {
63  if (applyCalib_) {
64  timingCalibrationToken_ = esConsumes<PPSTimingCalibration, PPSTimingCalibrationRcd>(
65  edm::ESInputTag(iConfig.getParameter<std::string>("timingCalibrationTag")));
66  timingCalibrationLUTToken_ = esConsumes<PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd>();
67  }
68  produces<edm::DetSetVector<CTPPSDiamondRecHit> >();
69 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
edm::ESGetToken< PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd > timingCalibrationLUTToken_
CTPPSDiamondRecHitProducerAlgorithm algo_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 88 of file CTPPSDiamondRecHitProducer.cc.

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

88  {
90 
91  desc.add<edm::InputTag>("digiTag", edm::InputTag("ctppsDiamondRawToDigi", "TimingDiamond"))
92  ->setComment("input digis collection to retrieve");
93  desc.add<std::string>("timingCalibrationTag", ":PPSDiamondTimingCalibration")
94  ->setComment("input tag for timing calibrations retrieval");
95  desc.add<double>("timeSliceNs", 25.0 / 1024.0)
96  ->setComment("conversion constant between HPTDC timing bin size and nanoseconds");
97  desc.add<bool>("applyCalibration", true)->setComment("switch on/off the timing calibration");
98 
99  descr.add("ctppsDiamondRecHits", desc);
100 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 71 of file CTPPSDiamondRecHitProducer.cc.

References algo_, applyCalib_, CTPPSDiamondRecHitProducerAlgorithm::build(), calibWatcher_, edm::ESWatcher< T >::check(), digiToken_, geometryToken_, edm::EventSetup::getData(), iEvent, lutWatcher_, eostools::move(), or, TimingRecHitProducerAlgorithm< G, D, R >::setCalibration(), timingCalibrationLUTToken_, and timingCalibrationToken_.

71  {
72  auto pOut = std::make_unique<edm::DetSetVector<CTPPSDiamondRecHit> >();
73 
74  // get the digi collection
75  const auto& digis = iEvent.get(digiToken_);
76 
77  if (!digis.empty()) {
78  if (applyCalib_ && (calibWatcher_.check(iSetup) or lutWatcher_.check(iSetup)))
80 
81  // produce the rechits collection
82  algo_.build(iSetup.getData(geometryToken_), digis, *pOut);
83  }
84 
85  iEvent.put(std::move(pOut));
86 }
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &) override
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
edm::ESWatcher< PPSTimingCalibrationLUTRcd > lutWatcher_
int iEvent
Definition: GenABIO.cc:224
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
void setCalibration(const PPSTimingCalibration &calib, const PPSTimingCalibrationLUT &calibLUT)
edm::ESGetToken< PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd > timingCalibrationLUTToken_
CTPPSDiamondRecHitProducerAlgorithm algo_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
A watcher to detect timing calibration changes.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ algo_

CTPPSDiamondRecHitProducerAlgorithm CTPPSDiamondRecHitProducer::algo_
private

Definition at line 55 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ applyCalib_

bool CTPPSDiamondRecHitProducer::applyCalib_
private

Definition at line 54 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().

◆ calibWatcher_

edm::ESWatcher<PPSTimingCalibrationRcd> CTPPSDiamondRecHitProducer::calibWatcher_
private

A watcher to detect timing calibration changes.

Definition at line 51 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ digiToken_

edm::EDGetTokenT<edm::DetSetVector<CTPPSDiamondDigi> > CTPPSDiamondRecHitProducer::digiToken_
private

Definition at line 45 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ geometryToken_

edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> CTPPSDiamondRecHitProducer::geometryToken_
private

Definition at line 48 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ lutWatcher_

edm::ESWatcher<PPSTimingCalibrationLUTRcd> CTPPSDiamondRecHitProducer::lutWatcher_
private

Definition at line 52 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

◆ timingCalibrationLUTToken_

edm::ESGetToken<PPSTimingCalibrationLUT, PPSTimingCalibrationLUTRcd> CTPPSDiamondRecHitProducer::timingCalibrationLUTToken_
private

Definition at line 47 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().

◆ timingCalibrationToken_

edm::ESGetToken<PPSTimingCalibration, PPSTimingCalibrationRcd> CTPPSDiamondRecHitProducer::timingCalibrationToken_
private

Definition at line 46 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().