CMS 3D CMS Logo

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

#include <AlignmentProducerAsAnalyzer.h>

Inheritance diagram for AlignmentProducerAsAnalyzer:
AlignmentProducerBase edm::one::EDProducer< edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void accumulate (const edm::Event &, const edm::EventSetup &) override
 
 AlignmentProducerAsAnalyzer (const edm::ParameterSet &)
 Constructor. More...
 
void beginJob () override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endJob () override
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void endProcessBlockProduce (edm::ProcessBlock &processBlock) override
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
 ~AlignmentProducerAsAnalyzer () override=default
 Destructor. More...
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
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
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () 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

edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
edm::EDGetTokenT< AliClusterValueMapclusterValueMapToken_
 
edm::EDGetTokenT< TrajTrackAssociationCollectiontjTkAssociationMapToken_
 
edm::EDGetTokenT< TkFittedLasBeamCollectiontkLasBeamToken_
 
edm::EDPutTokenT< AlignmentTokentoken_
 
edm::EDGetTokenT< TsosVectorCollectiontsosVectorToken_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from AlignmentProducerBase
 AlignmentProducerBase (const edm::ParameterSet &, edm::ConsumesCollector)
 
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 *=nullptr)
 Terminate processing of events. More...
 
virtual ~AlignmentProducerBase () noexcept(false)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 
- 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_
 
edm::ESHandle< CSCGeometrymuonCSCGeometry_
 
edm::ESHandle< DTGeometrymuonDTGeometry_
 
edm::ESHandle< GEMGeometrymuonGEMGeometry_
 
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

Definition at line 28 of file AlignmentProducerAsAnalyzer.h.

Constructor & Destructor Documentation

◆ AlignmentProducerAsAnalyzer()

AlignmentProducerAsAnalyzer::AlignmentProducerAsAnalyzer ( const edm::ParameterSet config)

Constructor.

Definition at line 16 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::beamSpotTag_, beamSpotToken_, AlignmentProducerBase::clusterValueMapTag_, clusterValueMapToken_, TFileService::kSharedResource, AlignmentProducerBase::tjTkAssociationMapTag_, tjTkAssociationMapToken_, AlignmentProducerBase::tkLasBeamTag_, tkLasBeamToken_, and tsosVectorToken_.

18  token_(produces<AlignmentToken, edm::Transition::EndProcessBlock>()) {
19  usesResource(TFileService::kSharedResource);
20 
21  tjTkAssociationMapToken_ = consumes<TrajTrackAssociationCollection>(tjTkAssociationMapTag_);
22  beamSpotToken_ = consumes<reco::BeamSpot>(beamSpotTag_);
23  tkLasBeamToken_ = consumes<TkFittedLasBeamCollection>(tkLasBeamTag_);
24  tsosVectorToken_ = consumes<TsosVectorCollection>(tkLasBeamTag_);
25  clusterValueMapToken_ = consumes<AliClusterValueMap>(clusterValueMapTag_);
26 }
static const std::string kSharedResource
Definition: TFileService.h:76
AlignmentProducerBase(const edm::ParameterSet &, edm::ConsumesCollector)
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
Definition: config.py:1
edm::EDGetTokenT< TkFittedLasBeamCollection > tkLasBeamToken_
edm::EDGetTokenT< AliClusterValueMap > clusterValueMapToken_
edm::EDGetTokenT< TrajTrackAssociationCollection > tjTkAssociationMapToken_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const edm::InputTag beamSpotTag_
BeamSpot.
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
edm::EDPutTokenT< AlignmentToken > token_
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
edm::EDGetTokenT< TsosVectorCollection > tsosVectorToken_

◆ ~AlignmentProducerAsAnalyzer()

AlignmentProducerAsAnalyzer::~AlignmentProducerAsAnalyzer ( )
overridedefault

Destructor.

Member Function Documentation

◆ accumulate()

void AlignmentProducerAsAnalyzer::accumulate ( const edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 70 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::processEvent(), and singleTopDQM_cfi::setup.

70  {
72 }
bool processEvent(const edm::Event &, const edm::EventSetup &)
Process event.
Definition: event.py:1

◆ beginJob()

void AlignmentProducerAsAnalyzer::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 29 of file AlignmentProducerAsAnalyzer.cc.

29 {}

◆ beginLuminosityBlock()

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

Definition at line 43 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::beginLuminosityBlockImpl(), and singleTopDQM_cfi::setup.

44  {
45  beginLuminosityBlockImpl(lumiBlock, setup);
46 }
void beginLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
begin lumi block

◆ beginRun()

void AlignmentProducerAsAnalyzer::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Definition at line 35 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::beginRunImpl(), writedatasetfile::run, and singleTopDQM_cfi::setup.

35  {
37 }
void beginRunImpl(const edm::Run &, const edm::EventSetup &)
begin run

◆ endJob()

void AlignmentProducerAsAnalyzer::endJob ( )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 32 of file AlignmentProducerAsAnalyzer.cc.

Referenced by o2olib.O2ORunMgr::executeJob().

32 {}

◆ endLuminosityBlock()

void AlignmentProducerAsAnalyzer::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup setup 
)
override

Definition at line 49 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::endLuminosityBlockImpl(), and singleTopDQM_cfi::setup.

50  {
51  endLuminosityBlockImpl(lumiBlock, setup);
52 }
void endLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
end lumi block

◆ endProcessBlockProduce()

void AlignmentProducerAsAnalyzer::endProcessBlockProduce ( edm::ProcessBlock processBlock)
override

Definition at line 54 of file AlignmentProducerAsAnalyzer.cc.

References edm::ProcessBlock::emplace(), AlignmentProducerBase::finish(), AlignmentProducerBase::terminateProcessing(), and token_.

54  {
55  const AlignmentToken valueToPut{};
56  processBlock.emplace(token_, valueToPut);
57 
59  if (!finish()) {
60  edm::LogError("Alignment") << "@SUB=AlignmentProducerAsAnalyzer::endJob"
61  << "Did not process any events, do not dare to store to DB.";
62  }
63 
64  // message is used by the MillePede log parser to check the end of the job
65  edm::LogInfo("Alignment") << "@SUB=AlignmentProducerAsAnalyzer::endJob"
66  << "Finished alignment producer job.";
67 }
void terminateProcessing(const edm::EventSetup *=nullptr)
Terminate processing of events.
Log< level::Error, false > LogError
Log< level::Info, false > LogInfo
edm::EDPutTokenT< AlignmentToken > token_
void emplace(EDPutTokenT< PROD > token, Args &&... args)
Definition: ProcessBlock.h:171

◆ endRun()

void AlignmentProducerAsAnalyzer::endRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Definition at line 40 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::endRunImpl(), writedatasetfile::run, and singleTopDQM_cfi::setup.

40 { endRunImpl(run, setup); }
void endRunImpl(const edm::Run &, const edm::EventSetup &)
end run

◆ getAliClusterValueMap()

bool AlignmentProducerAsAnalyzer::getAliClusterValueMap ( const edm::Event event,
edm::Handle< AliClusterValueMap > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 96 of file AlignmentProducerAsAnalyzer.h.

References clusterValueMapToken_, and mps_fire::result.

97  {
98  return event.getByToken(clusterValueMapToken_, result);
99 }
edm::EDGetTokenT< AliClusterValueMap > clusterValueMapToken_

◆ getBeamSpot()

bool AlignmentProducerAsAnalyzer::getBeamSpot ( const edm::Event event,
edm::Handle< reco::BeamSpot > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 79 of file AlignmentProducerAsAnalyzer.h.

References beamSpotToken_, and mps_fire::result.

79  {
80  return event.getByToken(beamSpotToken_, result);
81 }
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_

◆ getTkFittedLasBeamCollection()

bool AlignmentProducerAsAnalyzer::getTkFittedLasBeamCollection ( const edm::Run run,
edm::Handle< TkFittedLasBeamCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 84 of file AlignmentProducerAsAnalyzer.h.

References mps_fire::result, writedatasetfile::run, and tkLasBeamToken_.

85  {
86  return run.getByToken(tkLasBeamToken_, result);
87 }
edm::EDGetTokenT< TkFittedLasBeamCollection > tkLasBeamToken_

◆ getTrajTrackAssociationCollection()

bool AlignmentProducerAsAnalyzer::getTrajTrackAssociationCollection ( const edm::Event event,
edm::Handle< TrajTrackAssociationCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 73 of file AlignmentProducerAsAnalyzer.h.

References mps_fire::result, and tjTkAssociationMapToken_.

74  {
75  return event.getByToken(tjTkAssociationMapToken_, result);
76 }
edm::EDGetTokenT< TrajTrackAssociationCollection > tjTkAssociationMapToken_

◆ getTsosVectorCollection()

bool AlignmentProducerAsAnalyzer::getTsosVectorCollection ( const edm::Run run,
edm::Handle< TsosVectorCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 90 of file AlignmentProducerAsAnalyzer.h.

References mps_fire::result, writedatasetfile::run, and tsosVectorToken_.

91  {
92  return run.getByToken(tsosVectorToken_, result);
93 }
edm::EDGetTokenT< TsosVectorCollection > tsosVectorToken_

Member Data Documentation

◆ beamSpotToken_

edm::EDGetTokenT<reco::BeamSpot> AlignmentProducerAsAnalyzer::beamSpotToken_
private

Definition at line 66 of file AlignmentProducerAsAnalyzer.h.

Referenced by AlignmentProducerAsAnalyzer(), and getBeamSpot().

◆ clusterValueMapToken_

edm::EDGetTokenT<AliClusterValueMap> AlignmentProducerAsAnalyzer::clusterValueMapToken_
private

◆ tjTkAssociationMapToken_

edm::EDGetTokenT<TrajTrackAssociationCollection> AlignmentProducerAsAnalyzer::tjTkAssociationMapToken_
private

◆ tkLasBeamToken_

edm::EDGetTokenT<TkFittedLasBeamCollection> AlignmentProducerAsAnalyzer::tkLasBeamToken_
private

◆ token_

edm::EDPutTokenT<AlignmentToken> AlignmentProducerAsAnalyzer::token_
private

Definition at line 58 of file AlignmentProducerAsAnalyzer.h.

Referenced by endProcessBlockProduce().

◆ tsosVectorToken_

edm::EDGetTokenT<TsosVectorCollection> AlignmentProducerAsAnalyzer::tsosVectorToken_
private