CMS 3D CMS Logo

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

#include <SiStripMonitorCondDataOnDemandExample.h>

Inheritance diagram for SiStripMonitorCondDataOnDemandExample:
edm::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
void endJob () override
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
 SiStripMonitorCondDataOnDemandExample (const edm::ParameterSet &)
 
 ~SiStripMonitorCondDataOnDemandExample () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
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 Attributes

std::unique_ptr< SiStripClassToMonitorCondDatacondDataMonitoring_
 
int eventCounter_
 

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 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)
 

Detailed Description

Definition at line 27 of file SiStripMonitorCondDataOnDemandExample.h.

Constructor & Destructor Documentation

◆ SiStripMonitorCondDataOnDemandExample()

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

Definition at line 34 of file SiStripMonitorCondDataOnDemandExample.cc.

References condDataMonitoring_, and edm::EDConsumerBase::consumesCollector().

34  {
35  condDataMonitoring_ = std::make_unique<SiStripClassToMonitorCondData>(iConfig, consumesCollector());
36 }
std::unique_ptr< SiStripClassToMonitorCondData > condDataMonitoring_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.

◆ ~SiStripMonitorCondDataOnDemandExample()

SiStripMonitorCondDataOnDemandExample::~SiStripMonitorCondDataOnDemandExample ( )
overridedefault

Member Function Documentation

◆ analyze()

void SiStripMonitorCondDataOnDemandExample::analyze ( const edm::Event iEvent,
const edm::EventSetup eSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 56 of file SiStripMonitorCondDataOnDemandExample.cc.

References condDataMonitoring_.

56  {
57  // eventCounter_++;
58 
59  // on demand type I : eventSetup and detId to be passed
60  // output : ME's corresponding to that detId
61 
62  // if(eventCounter_==1){ condDataMonitoring_ ->
63  // getModMEsOnDemand(eSetup,369125542);}
64 
65  // on demand type II : eventSetup, subdetector-type(TIB/TOB/TEC/TID),
66  // subdetector-side for TEC/TID (0 for TIB and
67  // TOB) layer_number (0=all layers)
68 
69  // if(eventCounter_==2){ condDataMonitoring_ ->
70  // getLayerMEsOnDemand(eSetup,"TEC",0,1);} condDataMonitoring_ ->
71  // getModMEsOnDemand(eSetup,369125542);
72  condDataMonitoring_->getLayerMEsOnDemand(eSetup, "TEC", 2, 4);
73 
74 } // analyze
std::unique_ptr< SiStripClassToMonitorCondData > condDataMonitoring_

◆ beginJob()

void SiStripMonitorCondDataOnDemandExample::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 51 of file SiStripMonitorCondDataOnDemandExample.cc.

51 {} // beginJob

◆ beginRun()

void SiStripMonitorCondDataOnDemandExample::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
override

Definition at line 42 of file SiStripMonitorCondDataOnDemandExample.cc.

References condDataMonitoring_, eventCounter_, and writedatasetfile::run.

42  {
43  eventCounter_ = 0;
44  condDataMonitoring_->beginRun(run.run(), eSetup);
45 } // beginRun
std::unique_ptr< SiStripClassToMonitorCondData > condDataMonitoring_

◆ endJob()

void SiStripMonitorCondDataOnDemandExample::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 89 of file SiStripMonitorCondDataOnDemandExample.cc.

89 {} // endJob

◆ endRun()

void SiStripMonitorCondDataOnDemandExample::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
override

Definition at line 80 of file SiStripMonitorCondDataOnDemandExample.cc.

References condDataMonitoring_.

80  {
81  condDataMonitoring_->save();
82 
83 } // endRun
std::unique_ptr< SiStripClassToMonitorCondData > condDataMonitoring_

Member Data Documentation

◆ condDataMonitoring_

std::unique_ptr<SiStripClassToMonitorCondData> SiStripMonitorCondDataOnDemandExample::condDataMonitoring_
private

◆ eventCounter_

int SiStripMonitorCondDataOnDemandExample::eventCounter_
private

Definition at line 40 of file SiStripMonitorCondDataOnDemandExample.h.

Referenced by beginRun().