CMS 3D CMS Logo

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

#include <AlignmentProducer.h>

Inheritance diagram for AlignmentProducer:
AlignmentProducerBase edm::ESProducerLooper edm::ESProducer edm::EventSetupRecordIntervalFinder edm::EDLooper edm::ESProxyFactoryProducer edm::EDLooperBase edm::eventsetup::DataProxyProvider

Public Member Functions

 AlignmentProducer (const edm::ParameterSet &)
 Constructor. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 Called at lumi block start, calling algorithm's beginLuminosityBlock. More...
 
void beginOfJob (const edm::EventSetup &) override
 Called at beginning of job. More...
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 Called at run start and calling algorithms beginRun. More...
 
Status duringLoop (const edm::Event &, const edm::EventSetup &) override
 Called at each event. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 Called at lumi block end, calling algorithm's endLuminosityBlock. More...
 
void endOfJob () override
 Called at end of job. More...
 
Status endOfLoop (const edm::EventSetup &, unsigned int iLoop) override
 Called at end of loop. More...
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 Called at run end - currently reading TkFittedLasBeam if an InpuTag is given for that. More...
 
virtual std::shared_ptr< CSCGeometryproduceCSC (const MuonGeometryRecord &)
 Produce the muon CSC geometry. More...
 
virtual std::shared_ptr< DTGeometryproduceDT (const MuonGeometryRecord &)
 Produce the muon DT geometry. More...
 
virtual std::shared_ptr< TrackerGeometryproduceTracker (const TrackerDigiGeometryRecord &)
 Produce the tracker geometry. More...
 
void startingNewLoop (unsigned int iLoop) override
 Called at beginning of loop. More...
 
 ~AlignmentProducer () override=default
 Destructor. More...
 
- Public Member Functions inherited from edm::ESProducerLooper
 ESProducerLooper ()
 
std::set< eventsetup::EventSetupRecordKeymodifyingRecords () const override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 
- Public Member Functions inherited from edm::EDLooper
 EDLooper ()
 
 EDLooper (EDLooper const &)=delete
 
EDLooperoperator= (EDLooper const &)=delete
 
 ~EDLooper () override
 
- Public Member Functions inherited from edm::EDLooperBase
virtual void attachTo (ActivityRegistry &)
 Override this method if you need to monitor the state of the processing. More...
 
void beginOfJob (EventSetupImpl const &)
 
virtual void beginOfJob (EventSetup const &)
 
virtual void beginOfJob ()
 
void copyInfo (ScheduleInfo const &)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doEndOfLoop (EventSetupImpl const &es)
 
void doEndRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger *)
 
virtual ~EDLooperBase () noexcept(false)
 

Private Member Functions

bool getAliClusterValueMap (const edm::Event &, edm::Handle< AliClusterValueMap > &) override
 
bool getBeamSpot (const edm::Event &, edm::Handle< reco::BeamSpot > &) override
 
bool getTkFittedLasBeamCollection (const edm::Run &, edm::Handle< TkFittedLasBeamCollection > &) override
 
bool getTrajTrackAssociationCollection (const edm::Event &, edm::Handle< TrajTrackAssociationCollection > &) override
 
bool getTsosVectorCollection (const edm::Run &, edm::Handle< TsosVectorCollection > &) override
 

Private Attributes

const unsigned int maxLoops_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Public Types inherited from edm::EDLooperBase
enum  Status { kContinue, kStop }
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from AlignmentProducerBase
 AlignmentProducerBase (const edm::ParameterSet &)
 
void beginLuminosityBlockImpl (const edm::LuminosityBlock &, const edm::EventSetup &)
 begin lumi block More...
 
void beginRunImpl (const edm::Run &, const edm::EventSetup &)
 begin run More...
 
void endLuminosityBlockImpl (const edm::LuminosityBlock &, const edm::EventSetup &)
 end lumi block More...
 
void endRunImpl (const edm::Run &, const edm::EventSetup &)
 end run More...
 
bool finish ()
 
void initAlignmentAlgorithm (const edm::EventSetup &, bool update=false)
 
int nEvent () const
 
bool processEvent (const edm::Event &, const edm::EventSetup &)
 Process event. More...
 
void startProcessing ()
 Start processing of events. More...
 
void terminateProcessing (const edm::EventSetup *=0)
 Terminate processing of events. More...
 
virtual ~AlignmentProducerBase ()(false)
 
- Protected Member Functions inherited from edm::ESProducerLooper
void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string()) override
 
void setIntervalFor (const eventsetup::EventSetupRecordKey &iKey, const IOVSyncValue &iTime, ValidityInterval &oInterval) override
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
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 TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EDLooperBase
ModuleChangermoduleChanger ()
 This only returns a non-zero value during the call to endOfLoop. More...
 
ScheduleInfo const * scheduleInfo () const
 This returns a non-zero value after the constructor has been called. More...
 
- Protected Attributes inherited from AlignmentProducerBase
const edm::InputTag beamSpotTag_
 BeamSpot. More...
 
const edm::InputTag clusterValueMapTag_
 ValueMap containing associtaion cluster-flag. More...
 
const bool doMuon_
 
const bool doTracker_
 
std::shared_ptr< CSCGeometrymuonCSCGeometry_
 
std::shared_ptr< DTGeometrymuonDTGeometry_
 
const edm::InputTag tjTkAssociationMapTag_
 Map with tracks/trajectories. More...
 
const edm::InputTag tkLasBeamTag_
 LAS beams in edm::Run (ignore if empty) More...
 
std::shared_ptr< TrackerGeometrytrackerGeometry_
 
const bool useExtras_
 

Detailed Description

Package : Alignment/CommonAlignmentProducer Description : calls alignment algorithms

Author
: Frederic Ronga

Definition at line 15 of file AlignmentProducer.h.

Constructor & Destructor Documentation

AlignmentProducer::AlignmentProducer ( const edm::ParameterSet config)

Constructor.

Definition at line 13 of file AlignmentProducer.cc.

References AlignmentProducerBase::doMuon_, AlignmentProducerBase::doTracker_, maxLoops_, produceCSC(), produceDT(), produceTracker(), and edm::ESProducer::setWhatProduced().

14  : AlignmentProducerBase{config}, maxLoops_{config.getUntrackedParameter<unsigned int>("maxLoops")} {
15  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::AlignmentProducer";
16 
17  // Tell the framework what data is being produced
18  if (doTracker_) {
20  }
21  if (doMuon_) {
24  }
25 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
T getUntrackedParameter(std::string const &, T const &) const
const unsigned int maxLoops_
virtual std::shared_ptr< TrackerGeometry > produceTracker(const TrackerDigiGeometryRecord &)
Produce the tracker geometry.
virtual std::shared_ptr< DTGeometry > produceDT(const MuonGeometryRecord &)
Produce the muon DT geometry.
virtual std::shared_ptr< CSCGeometry > produceCSC(const MuonGeometryRecord &)
Produce the muon CSC geometry.
AlignmentProducer::~AlignmentProducer ( )
overridedefault

Destructor.

Member Function Documentation

void AlignmentProducer::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup setup 
)
override

Called at lumi block start, calling algorithm's beginLuminosityBlock.

Definition at line 107 of file AlignmentProducer.cc.

References AlignmentProducerBase::beginLuminosityBlockImpl().

107  {
108  beginLuminosityBlockImpl(lumiBlock, setup);
109 }
void beginLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
begin lumi block
void AlignmentProducer::beginOfJob ( const edm::EventSetup iSetup)
override

Called at beginning of job.

Definition at line 46 of file AlignmentProducer.cc.

References AlignmentProducerBase::initAlignmentAlgorithm().

46  {
47  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::beginOfJob";
48  initAlignmentAlgorithm(iSetup);
49 }
void initAlignmentAlgorithm(const edm::EventSetup &, bool update=false)
void AlignmentProducer::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Called at run start and calling algorithms beginRun.

Definition at line 101 of file AlignmentProducer.cc.

References AlignmentProducerBase::beginRunImpl().

101 { beginRunImpl(run, setup); }
void beginRunImpl(const edm::Run &, const edm::EventSetup &)
begin run
edm::EDLooper::Status AlignmentProducer::duringLoop ( const edm::Event event,
const edm::EventSetup setup 
)
overridevirtual

Called at each event.

Implements edm::EDLooper.

Definition at line 93 of file AlignmentProducer.cc.

References edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, and AlignmentProducerBase::processEvent().

93  {
94  if (processEvent(event, setup))
95  return kContinue;
96  else
97  return kStop;
98 }
bool processEvent(const edm::Event &, const edm::EventSetup &)
Process event.
void AlignmentProducer::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup setup 
)
override

Called at lumi block end, calling algorithm's endLuminosityBlock.

Definition at line 112 of file AlignmentProducer.cc.

References DEFINE_FWK_LOOPER, and AlignmentProducerBase::endLuminosityBlockImpl().

112  {
113  endLuminosityBlockImpl(lumiBlock, setup);
114 }
void endLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
end lumi block
void AlignmentProducer::endOfJob ( )
overridevirtual

Called at end of job.

Reimplemented from edm::EDLooperBase.

Definition at line 52 of file AlignmentProducer.cc.

References AlignmentProducerBase::finish().

52  {
53  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::endOfJob";
54 
55  if (!finish()) {
56  edm::LogError("Alignment") << "@SUB=AlignmentProducer::endOfJob"
57  << "Did not process any events in last loop, do not dare to store to DB.";
58  }
59 }
edm::EDLooper::Status AlignmentProducer::endOfLoop ( const edm::EventSetup iSetup,
unsigned int  iLoop 
)
override

Called at end of loop.

Definition at line 69 of file AlignmentProducer.cc.

References edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, maxLoops_, AlignmentProducerBase::nEvent(), and AlignmentProducerBase::terminateProcessing().

69  {
70  if (0 == nEvent()) {
71  // beginOfJob is usually called by the framework in the first event of the first loop
72  // (a hack: beginOfJob needs the EventSetup that is not well defined without an event)
73  // and the algorithms rely on the initialisations done in beginOfJob. We cannot call
74  // this->beginOfJob(iSetup); here either since that will access the EventSetup to get
75  // some geometry information that is not defined either without having seen an event.
76  edm::LogError("Alignment") << "@SUB=AlignmentProducer::endOfLoop"
77  << "Did not process any events in loop " << iLoop
78  << ", stop processing without terminating algorithm.";
79  return kStop;
80  }
81 
82  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::endOfLoop"
83  << "Ending loop " << iLoop << ", terminating algorithm.";
84  terminateProcessing(&iSetup);
85 
86  if (iLoop == maxLoops_ - 1 || iLoop >= maxLoops_)
87  return kStop;
88  else
89  return kContinue;
90 }
void terminateProcessing(const edm::EventSetup *=0)
Terminate processing of events.
const unsigned int maxLoops_
void AlignmentProducer::endRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Called at run end - currently reading TkFittedLasBeam if an InpuTag is given for that.

Definition at line 104 of file AlignmentProducer.cc.

References AlignmentProducerBase::endRunImpl().

104 { endRunImpl(run, setup); }
void endRunImpl(const edm::Run &, const edm::EventSetup &)
end run
bool AlignmentProducer::getAliClusterValueMap ( const edm::Event event,
edm::Handle< AliClusterValueMap > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 92 of file AlignmentProducer.h.

References AlignmentProducerBase::clusterValueMapTag_.

92  {
93  return event.getByLabel(clusterValueMapTag_, result);
94 }
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.
bool AlignmentProducer::getBeamSpot ( const edm::Event event,
edm::Handle< reco::BeamSpot > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 76 of file AlignmentProducer.h.

References AlignmentProducerBase::beamSpotTag_.

76  {
77  return event.getByLabel(beamSpotTag_, result);
78 }
const edm::InputTag beamSpotTag_
BeamSpot.
bool AlignmentProducer::getTkFittedLasBeamCollection ( const edm::Run run,
edm::Handle< TkFittedLasBeamCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 81 of file AlignmentProducer.h.

References edm::Run::getByLabel(), and AlignmentProducerBase::tkLasBeamTag_.

82  {
83  return run.getByLabel(tkLasBeamTag_, result);
84 }
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:280
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
bool AlignmentProducer::getTrajTrackAssociationCollection ( const edm::Event event,
edm::Handle< TrajTrackAssociationCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 70 of file AlignmentProducer.h.

References AlignmentProducerBase::tjTkAssociationMapTag_.

71  {
72  return event.getByLabel(tjTkAssociationMapTag_, result);
73 }
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
bool AlignmentProducer::getTsosVectorCollection ( const edm::Run run,
edm::Handle< TsosVectorCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 87 of file AlignmentProducer.h.

References edm::Run::getByLabel(), and AlignmentProducerBase::tkLasBeamTag_.

87  {
88  return run.getByLabel(tkLasBeamTag_, result);
89 }
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:280
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
std::shared_ptr< CSCGeometry > AlignmentProducer::produceCSC ( const MuonGeometryRecord )
virtual

Produce the muon CSC geometry.

Definition at line 40 of file AlignmentProducer.cc.

References AlignmentProducerBase::muonCSCGeometry_.

Referenced by AlignmentProducer().

40  {
41  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::produceCSC";
42  return muonCSCGeometry_;
43 }
std::shared_ptr< CSCGeometry > muonCSCGeometry_
std::shared_ptr< DTGeometry > AlignmentProducer::produceDT ( const MuonGeometryRecord )
virtual

Produce the muon DT geometry.

Definition at line 34 of file AlignmentProducer.cc.

References AlignmentProducerBase::muonDTGeometry_.

Referenced by AlignmentProducer().

34  {
35  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::produceDT";
36  return muonDTGeometry_;
37 }
std::shared_ptr< DTGeometry > muonDTGeometry_
std::shared_ptr< TrackerGeometry > AlignmentProducer::produceTracker ( const TrackerDigiGeometryRecord )
virtual

Produce the tracker geometry.

Definition at line 28 of file AlignmentProducer.cc.

References AlignmentProducerBase::trackerGeometry_.

Referenced by AlignmentProducer().

28  {
29  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::produceTracker";
30  return trackerGeometry_;
31 }
std::shared_ptr< TrackerGeometry > trackerGeometry_
void AlignmentProducer::startingNewLoop ( unsigned int  iLoop)
overridevirtual

Called at beginning of loop.

Implements edm::EDLooperBase.

Definition at line 62 of file AlignmentProducer.cc.

References AlignmentProducerBase::startProcessing().

62  {
63  edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::startingNewLoop"
64  << "Starting loop number " << iLoop;
66 }
void startProcessing()
Start processing of events.

Member Data Documentation

const unsigned int AlignmentProducer::maxLoops_
private

Definition at line 66 of file AlignmentProducer.h.

Referenced by AlignmentProducer(), and endOfLoop().