CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
FakeAlignmentSource Class Reference

#include <Alignment/FakeAlignmentProducer/plugins/FakeAlignmentSource.cc>

Inheritance diagram for FakeAlignmentSource:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

 FakeAlignmentSource (const edm::ParameterSet &)
 
std::unique_ptr< AlignmentsproduceCSCAli (const CSCAlignmentRcd &)
 CSC and its APE. More...
 
std::unique_ptr< AlignmentErrorsExtendedproduceCSCAliErr (const CSCAlignmentErrorExtendedRcd &)
 
std::unique_ptr< AlignmentsproduceDTAli (const DTAlignmentRcd &)
 DT and its APE. More...
 
std::unique_ptr< AlignmentErrorsExtendedproduceDTAliErr (const DTAlignmentErrorExtendedRcd &)
 
std::unique_ptr< AlignmentsproduceGlobals (const GlobalPositionRcd &)
 GlobalPositions. More...
 
std::unique_ptr< AlignmentsproduceTkAli (const TrackerAlignmentRcd &)
 Tracker and its APE. More...
 
std::unique_ptr< AlignmentErrorsExtendedproduceTkAliErr (const TrackerAlignmentErrorExtendedRcd &)
 
std::unique_ptr< AlignmentSurfaceDeformationsproduceTrackerSurfaceDeformation (const TrackerSurfaceDeformationRcd &)
 Tracker surface deformations. More...
 
 ~FakeAlignmentSource () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &ioSyncVal, edm::ValidityInterval &iov) override
 provide (dummy) IOV More...
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Attributes

bool produceCSC_
 
bool produceDT_
 
bool produceGlobalPosition_
 
bool produceTracker_
 
bool produceTrackerSurfaceDeformation_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 

Detailed Description

Description: Producer of fake alignment data for all geometries (currently: Tracker, DT and CSC) (including IOV, in contrast to FakeAlignmentProducer)

Implementation: The alignment objects are filled with dummy/empty data, reconstruction Geometry should notice that and not pass to GeometryAligner.

Definition at line 46 of file FakeAlignmentSource.cc.

Constructor & Destructor Documentation

◆ FakeAlignmentSource()

FakeAlignmentSource::FakeAlignmentSource ( const edm::ParameterSet iConfig)

Definition at line 95 of file FakeAlignmentSource.cc.

References edm::ParameterSet::getParameter(), produceCSC_, produceCSCAli(), produceCSCAliErr(), produceDT_, produceDTAli(), produceDTAliErr(), produceGlobalPosition_, produceGlobals(), produceTkAli(), produceTkAliErr(), produceTracker_, produceTrackerSurfaceDeformation(), produceTrackerSurfaceDeformation_, edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

96  : produceTracker_(iConfig.getParameter<bool>("produceTracker")),
97  produceDT_(iConfig.getParameter<bool>("produceDT")),
98  produceCSC_(iConfig.getParameter<bool>("produceCSC")),
99  produceGlobalPosition_(iConfig.getParameter<bool>("produceGlobalPosition")),
100  produceTrackerSurfaceDeformation_(iConfig.getParameter<bool>("produceTrackerSurfaceDeformation")) {
101  // This 'appendToDataLabel' is used by the framework to distinguish providers
102  // with different settings and to request a special one by e.g.
103  // iSetup.get<TrackerDigiGeometryRecord>().get("theLabel", tkGeomHandle);
104 
105  edm::LogInfo("Alignments") << "@SUB=FakeAlignmentSource"
106  << "Providing data with label '" << iConfig.getParameter<std::string>("appendToDataLabel")
107  << "'.";
108 
109  // Tell framework what data is produced by which method:
110  if (produceTracker_) {
113  }
114  if (produceDT_) {
117  }
118  if (produceCSC_) {
121  }
124  }
127  }
128 
129  // Tell framework to provide IOV for the above data:
130  if (produceTracker_) {
131  this->findingRecord<TrackerAlignmentRcd>();
132  this->findingRecord<TrackerAlignmentErrorExtendedRcd>();
133  }
134  if (produceDT_) {
135  this->findingRecord<DTAlignmentRcd>();
136  this->findingRecord<DTAlignmentErrorExtendedRcd>();
137  }
138  if (produceCSC_) {
139  this->findingRecord<CSCAlignmentRcd>();
140  this->findingRecord<CSCAlignmentErrorExtendedRcd>();
141  }
143  this->findingRecord<GlobalPositionRcd>();
144  }
146  this->findingRecord<TrackerSurfaceDeformationRcd>();
147  }
148 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< Alignments > produceGlobals(const GlobalPositionRcd &)
GlobalPositions.
std::unique_ptr< AlignmentErrorsExtended > produceCSCAliErr(const CSCAlignmentErrorExtendedRcd &)
std::unique_ptr< Alignments > produceCSCAli(const CSCAlignmentRcd &)
CSC and its APE.
std::unique_ptr< Alignments > produceDTAli(const DTAlignmentRcd &)
DT and its APE.
std::unique_ptr< AlignmentErrorsExtended > produceTkAliErr(const TrackerAlignmentErrorExtendedRcd &)
std::unique_ptr< AlignmentSurfaceDeformations > produceTrackerSurfaceDeformation(const TrackerSurfaceDeformationRcd &)
Tracker surface deformations.
std::unique_ptr< Alignments > produceTkAli(const TrackerAlignmentRcd &)
Tracker and its APE.
Log< level::Info, false > LogInfo
std::unique_ptr< AlignmentErrorsExtended > produceDTAliErr(const DTAlignmentErrorExtendedRcd &)

◆ ~FakeAlignmentSource()

FakeAlignmentSource::~FakeAlignmentSource ( )
inlineoverride

Definition at line 49 of file FakeAlignmentSource.cc.

49 {}

Member Function Documentation

◆ produceCSCAli()

std::unique_ptr<Alignments> FakeAlignmentSource::produceCSCAli ( const CSCAlignmentRcd )
inline

CSC and its APE.

Definition at line 64 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

64 { return std::make_unique<Alignments>(); }

◆ produceCSCAliErr()

std::unique_ptr<AlignmentErrorsExtended> FakeAlignmentSource::produceCSCAliErr ( const CSCAlignmentErrorExtendedRcd )
inline

Definition at line 65 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

65  {
66  return std::make_unique<AlignmentErrorsExtended>();
67  }

◆ produceDTAli()

std::unique_ptr<Alignments> FakeAlignmentSource::produceDTAli ( const DTAlignmentRcd )
inline

DT and its APE.

Definition at line 58 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

58 { return std::make_unique<Alignments>(); }

◆ produceDTAliErr()

std::unique_ptr<AlignmentErrorsExtended> FakeAlignmentSource::produceDTAliErr ( const DTAlignmentErrorExtendedRcd )
inline

Definition at line 59 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

59  {
60  return std::make_unique<AlignmentErrorsExtended>();
61  }

◆ produceGlobals()

std::unique_ptr<Alignments> FakeAlignmentSource::produceGlobals ( const GlobalPositionRcd )
inline

GlobalPositions.

Definition at line 70 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

70 { return std::make_unique<Alignments>(); }

◆ produceTkAli()

std::unique_ptr<Alignments> FakeAlignmentSource::produceTkAli ( const TrackerAlignmentRcd )
inline

Tracker and its APE.

Definition at line 52 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

52 { return std::make_unique<Alignments>(); }

◆ produceTkAliErr()

std::unique_ptr<AlignmentErrorsExtended> FakeAlignmentSource::produceTkAliErr ( const TrackerAlignmentErrorExtendedRcd )
inline

Definition at line 53 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

53  {
54  return std::make_unique<AlignmentErrorsExtended>();
55  }

◆ produceTrackerSurfaceDeformation()

std::unique_ptr<AlignmentSurfaceDeformations> FakeAlignmentSource::produceTrackerSurfaceDeformation ( const TrackerSurfaceDeformationRcd )
inline

Tracker surface deformations.

Definition at line 73 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

73  {
74  return std::make_unique<AlignmentSurfaceDeformations>();
75  }

◆ setIntervalFor()

void FakeAlignmentSource::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ioSyncVal,
edm::ValidityInterval iov 
)
overrideprotectedvirtual

provide (dummy) IOV

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 150 of file FakeAlignmentSource.cc.

References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().

152  {
153  // Implementation copied from SiStripGainFakeESSource: unlimited IOV
154  outValidity = edm::ValidityInterval(ioSyncVal.beginOfTime(), ioSyncVal.endOfTime());
155 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88

Member Data Documentation

◆ produceCSC_

bool FakeAlignmentSource::produceCSC_
private

Definition at line 86 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

◆ produceDT_

bool FakeAlignmentSource::produceDT_
private

Definition at line 85 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

◆ produceGlobalPosition_

bool FakeAlignmentSource::produceGlobalPosition_
private

Definition at line 87 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

◆ produceTracker_

bool FakeAlignmentSource::produceTracker_
private

Definition at line 84 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().

◆ produceTrackerSurfaceDeformation_

bool FakeAlignmentSource::produceTrackerSurfaceDeformation_
private

Definition at line 88 of file FakeAlignmentSource.cc.

Referenced by FakeAlignmentSource().