CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edmtest::L1TriggerScalerESAnalyzer Class Reference
Inheritance diagram for edmtest::L1TriggerScalerESAnalyzer:
edm::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginJob () override
 
void beginRun (const edm::Run &, const edm::EventSetup &context) override
 
void endRun (const edm::Run &, const edm::EventSetup &context) override
 
 L1TriggerScalerESAnalyzer (edm::ParameterSet const &p)
 
 L1TriggerScalerESAnalyzer (int i)
 
 ~L1TriggerScalerESAnalyzer () override
 
- 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 noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept 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 noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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

const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcdscaler1Token_
 
const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcdscaler2Token_
 

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 17 of file L1TriggerScalerESAnalyzer.cc.

Constructor & Destructor Documentation

◆ L1TriggerScalerESAnalyzer() [1/2]

edmtest::L1TriggerScalerESAnalyzer::L1TriggerScalerESAnalyzer ( edm::ParameterSet const &  p)
inlineexplicit

Definition at line 19 of file L1TriggerScalerESAnalyzer.cc.

20  : scaler1Token_(esConsumes<L1TriggerScaler, L1TriggerScalerRcd, edm::Transition::BeginRun>()),
21  scaler2Token_(esConsumes<L1TriggerScaler, L1TriggerScalerRcd>()) {
22  edm::LogVerbatim("L1TriggerScaler") << "L1TriggerScalerESAnalyzer";
23  }
Log< level::Info, true > LogVerbatim
const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcd > scaler1Token_
const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcd > scaler2Token_

◆ L1TriggerScalerESAnalyzer() [2/2]

edmtest::L1TriggerScalerESAnalyzer::L1TriggerScalerESAnalyzer ( int  i)
inlineexplicit

Definition at line 24 of file L1TriggerScalerESAnalyzer.cc.

References mps_fire::i.

25  : scaler1Token_(esConsumes<L1TriggerScaler, L1TriggerScalerRcd, edm::Transition::BeginRun>()),
26  scaler2Token_(esConsumes<L1TriggerScaler, L1TriggerScalerRcd>()) {
27  edm::LogVerbatim("L1TriggerScaler") << "L1TriggerScalerESAnalyzer " << i;
28  }
Log< level::Info, true > LogVerbatim
const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcd > scaler1Token_
const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcd > scaler2Token_

◆ ~L1TriggerScalerESAnalyzer()

edmtest::L1TriggerScalerESAnalyzer::~L1TriggerScalerESAnalyzer ( )
inlineoverride

Definition at line 29 of file L1TriggerScalerESAnalyzer.cc.

29 { edm::LogVerbatim("L1TriggerScaler") << "~L1TriggerScalerESAnalyzer "; }
Log< level::Info, true > LogVerbatim

Member Function Documentation

◆ analyze()

void edmtest::L1TriggerScalerESAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 51 of file L1TriggerScalerESAnalyzer.cc.

References visDQMUpload::context, MillePedeFileConverter_cfg::e, edm::eventsetup::heterocontainer::HCTypeTag::findType(), L1TriggerScaler::printFormat(), L1TriggerScaler::printGTAlgoCounts(), L1TriggerScaler::printGTAlgoPrescaling(), L1TriggerScaler::printGTAlgoRates(), L1TriggerScaler::printGTPartition0DeadTime(), L1TriggerScaler::printGTPartition0DeadTimeRatio(), L1TriggerScaler::printGTPartition0TriggerCounts(), L1TriggerScaler::printGTPartition0TriggerRates(), L1TriggerScaler::printGTTechCounts(), L1TriggerScaler::printGTTechPrescaling(), L1TriggerScaler::printGTTechRates(), L1TriggerScaler::printLumiSegmentValues(), L1TriggerScaler::printRunValue(), edm::ESHandle< T >::product(), scaler2Token_, and edm::eventsetup::EventSetupRecordKey::type().

51  {
52  using namespace edm::eventsetup;
53  edm::LogVerbatim("L1TriggerScaler") << "###L1TriggerScalerESAnalyzer::analyze";
54 
55  // Context is not used.
56  edm::LogVerbatim("L1TriggerScaler") << " I AM IN RUN NUMBER " << e.id().run();
57  edm::LogVerbatim("L1TriggerScaler") << " ---EVENT NUMBER " << e.id().event();
60  if (recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
61  //record not found
62  edm::LogVerbatim("L1TriggerScaler") << "Record \"L1TriggerScalerRcd"
63  << "\" does not exist ";
64  }
65  const edm::ESHandle<L1TriggerScaler>& l1tr = context.getHandle(scaler2Token_);
66  edm::LogVerbatim("L1TriggerScaler") << " got eshandle\n got context";
67  const L1TriggerScaler* l1lumiscaler = l1tr.product();
68  edm::LogVerbatim("L1TriggerScaler") << "got L1TriggerScaler* ";
69 
70  edm::LogVerbatim("L1TriggerScaler") << "print result";
71  l1lumiscaler->printRunValue();
72  l1lumiscaler->printLumiSegmentValues();
73  l1lumiscaler->printFormat();
74  l1lumiscaler->printGTAlgoCounts();
75  l1lumiscaler->printGTAlgoRates();
76  l1lumiscaler->printGTAlgoPrescaling();
77  l1lumiscaler->printGTTechCounts();
78  l1lumiscaler->printGTTechRates();
79  l1lumiscaler->printGTTechPrescaling();
80  l1lumiscaler->printGTPartition0TriggerCounts();
81  l1lumiscaler->printGTPartition0TriggerRates();
82  l1lumiscaler->printGTPartition0DeadTime();
83  l1lumiscaler->printGTPartition0DeadTimeRatio();
84  edm::LogVerbatim("L1TriggerScaler") << "print finished";
85  }
void printGTTechCounts() const
Log< level::Info, true > LogVerbatim
void printRunValue() const
void printGTPartition0TriggerRates() const
void printGTPartition0TriggerCounts() const
void printGTPartition0DeadTimeRatio() const
void printGTAlgoPrescaling() const
const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcd > scaler2Token_
void printGTAlgoRates() const
T const * product() const
Definition: ESHandle.h:86
void printGTTechRates() const
void printFormat() const
void printGTPartition0DeadTime() const
void printLumiSegmentValues() const
heterocontainer::HCTypeTag TypeTag
void printGTAlgoCounts() const
void printGTTechPrescaling() const
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121

◆ beginJob()

void edmtest::L1TriggerScalerESAnalyzer::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 47 of file L1TriggerScalerESAnalyzer.cc.

47  {
48  edm::LogVerbatim("L1TriggerScaler") << "###L1TriggerScalerESAnalyzer::beginJob";
49  }
Log< level::Info, true > LogVerbatim

◆ beginRun()

void edmtest::L1TriggerScalerESAnalyzer::beginRun ( const edm::Run ,
const edm::EventSetup context 
)
override

Definition at line 40 of file L1TriggerScalerESAnalyzer.cc.

References visDQMUpload::context, edm::ESHandleBase::isValid(), and scaler1Token_.

40  {
41  edm::LogVerbatim("L1TriggerScaler") << "###L1TriggerScalerESAnalyzer::beginRun";
42  const edm::ESHandle<L1TriggerScaler>& L1TriggerScaler_lumiarray = context.getHandle(scaler1Token_);
43  edm::LogVerbatim("L1TriggerScaler") << " got eshandle with flag " << L1TriggerScaler_lumiarray.isValid()
44  << " got data";
45  }
Log< level::Info, true > LogVerbatim
const edm::ESGetToken< L1TriggerScaler, L1TriggerScalerRcd > scaler1Token_
bool isValid() const
Definition: ESHandle.h:44

◆ endRun()

void edmtest::L1TriggerScalerESAnalyzer::endRun ( const edm::Run ,
const edm::EventSetup context 
)
inlineoverride

Definition at line 33 of file L1TriggerScalerESAnalyzer.cc.

33 {}

Member Data Documentation

◆ scaler1Token_

const edm::ESGetToken<L1TriggerScaler, L1TriggerScalerRcd> edmtest::L1TriggerScalerESAnalyzer::scaler1Token_
private

Definition at line 36 of file L1TriggerScalerESAnalyzer.cc.

Referenced by beginRun().

◆ scaler2Token_

const edm::ESGetToken<L1TriggerScaler, L1TriggerScalerRcd> edmtest::L1TriggerScalerESAnalyzer::scaler2Token_
private

Definition at line 37 of file L1TriggerScalerESAnalyzer.cc.

Referenced by analyze().