CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< PPSTimingCalibrationRcd
calibWatcher_
 A watcher to detect timing calibration changes. More...
 
edm::EDGetTokenT
< edm::DetSetVector
< CTPPSDiamondDigi > > 
digiToken_
 
edm::ESGetToken< CTPPSGeometry,
VeryForwardRealGeometryRecord
geometryToken_
 
edm::ESGetToken
< PPSTimingCalibration,
PPSTimingCalibrationRcd
timingCalibrationToken_
 

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

Constructor & Destructor Documentation

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

Definition at line 55 of file CTPPSDiamondRecHitProducer.cc.

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

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

Member Function Documentation

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

Definition at line 89 of file CTPPSDiamondRecHitProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, edm::ParameterDescriptionNode::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

Definition at line 67 of file CTPPSDiamondRecHitProducer.cc.

References algo_, applyCalib_, CTPPSDiamondRecHitProducerAlgorithm::build(), calibWatcher_, edm::ESWatcher< T >::check(), digiToken_, relativeConstraints::geometry, geometryToken_, edm::Event::getByToken(), edm::EventSetup::getHandle(), eostools::move(), edm::Event::put(), CTPPSDiamondRecHitProducerAlgorithm::setCalibration(), and timingCalibrationToken_.

67  {
68  auto pOut = std::make_unique<edm::DetSetVector<CTPPSDiamondRecHit> >();
69 
70  // get the digi collection
72  iEvent.getByToken(digiToken_, digis);
73 
74  if (!digis->empty()) {
75  if (applyCalib_ && calibWatcher_.check(iSetup)) {
77  algo_.setCalibration(*hTimingCalib);
78  }
79  // get the geometry
81 
82  // produce the rechits collection
83  algo_.build(*geometry, *digis, *pOut);
84  }
85 
86  iEvent.put(std::move(pOut));
87 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
void build(const CTPPSGeometry &, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
def move
Definition: eostools.py:511
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
CTPPSDiamondRecHitProducerAlgorithm algo_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
A watcher to detect timing calibration changes.

Member Data Documentation

CTPPSDiamondRecHitProducerAlgorithm CTPPSDiamondRecHitProducer::algo_
private

Definition at line 52 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

bool CTPPSDiamondRecHitProducer::applyCalib_
private

Definition at line 51 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().

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

A watcher to detect timing calibration changes.

Definition at line 49 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

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

Definition at line 44 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

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

Definition at line 46 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

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

Definition at line 45 of file CTPPSDiamondRecHitProducer.cc.

Referenced by CTPPSDiamondRecHitProducer(), and produce().