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::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 AlignmentProducerAsAnalyzer (const edm::ParameterSet &)
 Constructor. More...
 
void analyze (const edm::Event &, const edm::EventSetup &) override
 
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 endRun (const edm::Run &, const edm::EventSetup &) override
 
 ~AlignmentProducerAsAnalyzer () override=default
 Destructor. More...
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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::EDGetTokenT< TsosVectorCollectiontsosVectorToken_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
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 &)
 
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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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<typename ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
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)
 
- 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

Definition at line 28 of file AlignmentProducerAsAnalyzer.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 20 of file AlignmentProducerAsAnalyzer.cc.

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

20  :
21  AlignmentProducerBase{config}
22 {
23  usesResource(TFileService::kSharedResource);
24 
25  tjTkAssociationMapToken_ = consumes<TrajTrackAssociationCollection>(tjTkAssociationMapTag_);
26  beamSpotToken_ = consumes<reco::BeamSpot>(beamSpotTag_);
27  tkLasBeamToken_ = consumes<TkFittedLasBeamCollection>(tkLasBeamTag_);
28  tsosVectorToken_ = consumes<TsosVectorCollection>(tkLasBeamTag_);
29  clusterValueMapToken_ = consumes<AliClusterValueMap>(clusterValueMapTag_);
30 }
static const std::string kSharedResource
Definition: TFileService.h:76
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
edm::EDGetTokenT< TkFittedLasBeamCollection > tkLasBeamToken_
edm::EDGetTokenT< AliClusterValueMap > clusterValueMapToken_
edm::EDGetTokenT< TrajTrackAssociationCollection > tjTkAssociationMapToken_
const edm::InputTag beamSpotTag_
BeamSpot.
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
edm::EDGetTokenT< TsosVectorCollection > tsosVectorToken_
AlignmentProducerAsAnalyzer::~AlignmentProducerAsAnalyzer ( )
overridedefault

Destructor.

Member Function Documentation

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

Definition at line 94 of file AlignmentProducerAsAnalyzer.cc.

References DEFINE_FWK_MODULE, and AlignmentProducerBase::processEvent().

95 {
96  processEvent(event, setup);
97 }
bool processEvent(const edm::Event &, const edm::EventSetup &)
Process event.
void AlignmentProducerAsAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 35 of file AlignmentProducerAsAnalyzer.cc.

36 {
37 }
void AlignmentProducerAsAnalyzer::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup setup 
)
override

Definition at line 76 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::beginLuminosityBlockImpl().

78 {
79  beginLuminosityBlockImpl(lumiBlock, setup);
80 }
void beginLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
begin lumi block
void AlignmentProducerAsAnalyzer::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Definition at line 60 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::beginRunImpl().

61 {
62  beginRunImpl(run, setup);
63 }
void beginRunImpl(const edm::Run &, const edm::EventSetup &)
begin run
void AlignmentProducerAsAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 42 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::finish(), and AlignmentProducerBase::terminateProcessing().

Referenced by o2olib.O2ORunMgr::executeJob().

43 {
45  if (!finish()) {
46  edm::LogError("Alignment")
47  << "@SUB=AlignmentProducerAsAnalyzer::endJob"
48  << "Did not process any events, do not dare to store to DB.";
49  }
50 
51  // message is used by the MillePede log parser to check the end of the job
52  edm::LogInfo("Alignment")
53  << "@SUB=AlignmentProducerAsAnalyzer::endJob"
54  << "Finished alignment producer job.";
55 }
void terminateProcessing(const edm::EventSetup *=0)
Terminate processing of events.
void AlignmentProducerAsAnalyzer::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup setup 
)
override

Definition at line 85 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::endLuminosityBlockImpl().

87 {
88  endLuminosityBlockImpl(lumiBlock, setup);
89 }
void endLuminosityBlockImpl(const edm::LuminosityBlock &, const edm::EventSetup &)
end lumi block
void AlignmentProducerAsAnalyzer::endRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Definition at line 68 of file AlignmentProducerAsAnalyzer.cc.

References AlignmentProducerBase::endRunImpl().

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

Implements AlignmentProducerBase.

Definition at line 118 of file AlignmentProducerAsAnalyzer.h.

References clusterValueMapToken_.

119  {
120  return event.getByToken(clusterValueMapToken_, result);
121 }
edm::EDGetTokenT< AliClusterValueMap > clusterValueMapToken_
bool AlignmentProducerAsAnalyzer::getBeamSpot ( const edm::Event event,
edm::Handle< reco::BeamSpot > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 91 of file AlignmentProducerAsAnalyzer.h.

References beamSpotToken_.

92  {
93  return event.getByToken(beamSpotToken_, result);
94 }
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
bool AlignmentProducerAsAnalyzer::getTkFittedLasBeamCollection ( const edm::Run run,
edm::Handle< TkFittedLasBeamCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 100 of file AlignmentProducerAsAnalyzer.h.

References edm::Run::getByToken(), and tkLasBeamToken_.

101  {
102  return run.getByToken(tkLasBeamToken_, result);
103 }
edm::EDGetTokenT< TkFittedLasBeamCollection > tkLasBeamToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Run.h:343
bool AlignmentProducerAsAnalyzer::getTrajTrackAssociationCollection ( const edm::Event event,
edm::Handle< TrajTrackAssociationCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 82 of file AlignmentProducerAsAnalyzer.h.

References tjTkAssociationMapToken_.

83  {
84  return event.getByToken(tjTkAssociationMapToken_, result);
85 }
edm::EDGetTokenT< TrajTrackAssociationCollection > tjTkAssociationMapToken_
bool AlignmentProducerAsAnalyzer::getTsosVectorCollection ( const edm::Run run,
edm::Handle< TsosVectorCollection > &  result 
)
inlineoverrideprivatevirtual

Implements AlignmentProducerBase.

Definition at line 109 of file AlignmentProducerAsAnalyzer.h.

References edm::Run::getByToken(), and tsosVectorToken_.

110  {
111  return run.getByToken(tsosVectorToken_, result);
112 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Run.h:343
edm::EDGetTokenT< TsosVectorCollection > tsosVectorToken_

Member Data Documentation

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

Definition at line 71 of file AlignmentProducerAsAnalyzer.h.

Referenced by AlignmentProducerAsAnalyzer(), and getBeamSpot().

edm::EDGetTokenT<AliClusterValueMap> AlignmentProducerAsAnalyzer::clusterValueMapToken_
private
edm::EDGetTokenT<TrajTrackAssociationCollection> AlignmentProducerAsAnalyzer::tjTkAssociationMapToken_
private
edm::EDGetTokenT<TkFittedLasBeamCollection> AlignmentProducerAsAnalyzer::tkLasBeamToken_
private
edm::EDGetTokenT<TsosVectorCollection> AlignmentProducerAsAnalyzer::tsosVectorToken_
private