CMS 3D CMS Logo

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

#include <Validation/RecoVertex/plugins/BeamSpotAnalyzer.cc>

Inheritance diagram for AnotherBeamSpotAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 AnotherBeamSpotAnalyzer (const edm::ParameterSet &)
 
 ~AnotherBeamSpotAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void endJob ()
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 

Private Attributes

BeamSpotHistogramMaker _bshm
 
edm::EDGetTokenT< reco::BeamSpot_recoBeamSpotToken
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 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)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 48 of file BeamSpotAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 80 of file BeamSpotAnalyzer.cc.

References _bshm, and BeamSpotHistogramMaker::book().

81  : _bshm(iConfig.getParameter<edm::ParameterSet>("bsHistogramMakerPSet"), consumesCollector())
82  , _recoBeamSpotToken(consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("bsCollection")))
83 {
84  //now do what ever initialization is needed
85 
86  //
87 
88  _bshm.book();
89 
90 }
T getParameter(std::string const &) const
void book(const std::string dirname="")
BeamSpotHistogramMaker _bshm
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< reco::BeamSpot > _recoBeamSpotToken
AnotherBeamSpotAnalyzer::~AnotherBeamSpotAnalyzer ( )

Definition at line 93 of file BeamSpotAnalyzer.cc.

94 {
95 
96  // do anything here that needs to be done at desctruction time
97  // (e.g. close files, deallocate resources etc.)
98 
99 }

Member Function Documentation

void AnotherBeamSpotAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Definition at line 108 of file BeamSpotAnalyzer.cc.

References _bshm, _recoBeamSpotToken, BeamSpotHistogramMaker::fill(), edm::Event::getByToken(), and edm::EventBase::orbitNumber().

109 {
110 
111  // get BS
112 
114  iEvent.getByToken(_recoBeamSpotToken,bs);
115  _bshm.fill(iEvent.orbitNumber(),*bs);
116 
117 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
void fill(const unsigned int orbit, const reco::BeamSpot &bs)
BeamSpotHistogramMaker _bshm
int orbitNumber() const
Definition: EventBase.h:67
edm::EDGetTokenT< reco::BeamSpot > _recoBeamSpotToken
void AnotherBeamSpotAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 122 of file BeamSpotAnalyzer.cc.

123 { }
void AnotherBeamSpotAnalyzer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
privatevirtual

Definition at line 126 of file BeamSpotAnalyzer.cc.

References _bshm, BeamSpotHistogramMaker::beginRun(), and edm::RunBase::run().

126  {
127 
128  _bshm.beginRun(iRun.run());
129 
130 }
RunNumber_t run() const
Definition: RunBase.h:40
void beginRun(const unsigned int nrun)
BeamSpotHistogramMaker _bshm
void AnotherBeamSpotAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 138 of file BeamSpotAnalyzer.cc.

References DEFINE_FWK_MODULE.

138  {
139 }
void AnotherBeamSpotAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
privatevirtual

Definition at line 133 of file BeamSpotAnalyzer.cc.

133  {
134 
135 }

Member Data Documentation

BeamSpotHistogramMaker AnotherBeamSpotAnalyzer::_bshm
private

Definition at line 63 of file BeamSpotAnalyzer.cc.

Referenced by analyze(), AnotherBeamSpotAnalyzer(), and beginRun().

edm::EDGetTokenT<reco::BeamSpot> AnotherBeamSpotAnalyzer::_recoBeamSpotToken
private

Definition at line 64 of file BeamSpotAnalyzer.cc.

Referenced by analyze().