CMS 3D CMS Logo

List of all members | Public Member Functions
edmtest::L1TriggerScalerESAnalyzer Class Reference
Inheritance diagram for edmtest::L1TriggerScalerESAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &context)
 
 L1TriggerScalerESAnalyzer (edm::ParameterSet const &p)
 
 L1TriggerScalerESAnalyzer (int i)
 
virtual ~L1TriggerScalerESAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 24 of file L1TriggerScalerESAnalyzer.cc.

Constructor & Destructor Documentation

◆ L1TriggerScalerESAnalyzer() [1/2]

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

Definition at line 27 of file L1TriggerScalerESAnalyzer.cc.

28  {
29  std::cout<<"L1TriggerScalerESAnalyzer"<<std::endl;
30  }

References gather_cfg::cout.

◆ L1TriggerScalerESAnalyzer() [2/2]

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

Definition at line 31 of file L1TriggerScalerESAnalyzer.cc.

32  { std::cout<<"L1TriggerScalerESAnalyzer "<<i<<std::endl; }

References gather_cfg::cout, and mps_fire::i.

◆ ~L1TriggerScalerESAnalyzer()

virtual edmtest::L1TriggerScalerESAnalyzer::~L1TriggerScalerESAnalyzer ( )
inlinevirtual

Definition at line 33 of file L1TriggerScalerESAnalyzer.cc.

33  {
34  std::cout<<"~L1TriggerScalerESAnalyzer "<<std::endl;
35  }

References gather_cfg::cout.

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 60 of file L1TriggerScalerESAnalyzer.cc.

60  {
61  using namespace edm::eventsetup;
62  std::cout<<"###L1TriggerScalerESAnalyzer::analyze"<<std::endl;
63 
64  // Context is not used.
65  std::cout <<" I AM IN RUN NUMBER "<<e.id().run() <<std::endl;
66  std::cout <<" ---EVENT NUMBER "<<e.id().event() <<std::endl;
68  if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
69  //record not found
70  std::cout <<"Record \"L1TriggerScalerRcd"<<"\" does not exist "<<std::endl;
71  }
73  std::cout<<"got eshandle"<<std::endl;
74  context.get<L1TriggerScalerRcd>().get(l1tr);
75  std::cout<<"got context"<<std::endl;
76  const L1TriggerScaler* l1lumiscaler=l1tr.product();
77  std::cout<<"got L1TriggerScaler* "<< std::endl;
78 
79  /* let's user the printValues method
80  std::cout<< "print result" << std::endl;
81  l1lumiscaler->printAllValues();
82  std::cout<< "print finished" << std::endl;
83  */
84 std::cout<< "print result" << std::endl;
85  l1lumiscaler->printRunValue();
86  l1lumiscaler->printLumiSegmentValues();
87  l1lumiscaler->printFormat();
88  l1lumiscaler->printGTAlgoCounts();
89  l1lumiscaler->printGTAlgoRates();
90  l1lumiscaler->printGTAlgoPrescaling();
91  l1lumiscaler->printGTTechCounts();
92  l1lumiscaler->printGTTechRates();
93  l1lumiscaler->printGTTechPrescaling();
94  l1lumiscaler->printGTPartition0TriggerCounts();
95  l1lumiscaler->printGTPartition0TriggerRates();
96  l1lumiscaler->printGTPartition0DeadTime();
97  l1lumiscaler->printGTPartition0DeadTimeRatio();
98  std::cout<< "print finished" << std::endl;
99 
100 
101 
102  /*
103  for(std::vector<L1TriggerScaler::Lumi>::const_iterator it=l1lumiscaler->m_run.begin(); it!=l1lumiscaler->m_run.end(); ++it){
104  std::cout << " run: " <<it->m_rn<<
105  "\nlumisegment: " << it->m_lumisegment<<std::endl;
106 
107 
108 
109  for(size_t i=0; i<it->m_GTAlgoRates.size(); i++ ){
110  std::cout << "m_GTAlgoRates["<<i<<"] = "<< it->m_GTAlgoRates[i]<<std::endl;
111  }
112  for(size_t i=0; i<it->m_GTAlgoPrescaling.size(); i++ ){
113  std::cout << "m_GTAlgoPrescaling["<<i<<"] = "<< it->m_GTAlgoPrescaling[i]<<std::endl;
114  }
115 for(size_t i=0; i<it->m_GTTechCounts.size(); i++ ){
116  std::cout << " m_GTTechCounts["<<i<<"] = "<< it->m_GTTechCounts[i]<<std::endl;
117  }
118 
119 for(size_t i=0; i<it->m_GTTechRates.size(); i++ ){
120  std::cout << " m_GTTechRates["<<i<<"] = "<< it->m_GTTechRates[i]<<std::endl;
121  }
122 for(size_t i=0; i<it->m_GTTechPrescaling.size(); i++ ){
123  std::cout << " m_GTTechPrescaling["<<i<<"] = "<< it->m_GTTechPrescaling[i]<<std::endl;
124  }
125 for(size_t i=0; i<it->m_GTPartition0TriggerCounts.size(); i++ ){
126  std::cout << " m_GTPartition0TriggerCounts["<<i<<"] = "<< it->m_GTPartition0TriggerCounts[i]<<std::endl;
127  }
128 for(size_t i=0; i<it->m_GTPartition0TriggerRates.size(); i++ ){
129  std::cout << " m_GTPartition0TriggerRates["<<i<<"] = "<< it->m_GTPartition0TriggerRates[i]<<std::endl;
130  }
131 
132 for(size_t i=0; i<it->m_GTPartition0DeadTime.size(); i++ ){
133  std::cout << " m_GTPartition0DeadTime["<<i<<"] = "<< it->m_GTPartition0DeadTime[i]<<std::endl;
134  }
135 for(size_t i=0; i<it->m_GTPartition0DeadTimeRatio.size(); i++ ){
136  std::cout << " m_GTPartition0DeadTimeRatio["<<i<<"] = "<< it->m_GTPartition0DeadTimeRatio[i]<<std::endl;
137  }
138  }
139  */
140  }

References gather_cfg::cout, MillePedeFileConverter_cfg::e, edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), get, 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(), and edm::eventsetup::EventSetupRecordKey::type().

◆ beginJob()

void edmtest::L1TriggerScalerESAnalyzer::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 53 of file L1TriggerScalerESAnalyzer.cc.

53  {
54  std::cout<<"###L1TriggerScalerESAnalyzer::beginJob"<<std::endl;
55 
56  }

References gather_cfg::cout.

◆ beginRun()

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

Reimplemented from edm::EDAnalyzer.

Definition at line 44 of file L1TriggerScalerESAnalyzer.cc.

44  {
45  std::cout<<"###L1TriggerScalerESAnalyzer::beginRun"<<std::endl;
46  edm::ESHandle<L1TriggerScaler> L1TriggerScaler_lumiarray;
47  std::cout<<"got eshandle"<<std::endl;
48  context.get<L1TriggerScalerRcd>().get(L1TriggerScaler_lumiarray);
49  std::cout<<"got data"<<std::endl;
50  }

References gather_cfg::cout, edm::EventSetup::get(), and get.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::eventsetup::heterocontainer::HCTypeTag::findType
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
mps_fire.i
i
Definition: mps_fire.py:355
L1TriggerScaler::printGTAlgoPrescaling
void printGTAlgoPrescaling() const
Definition: L1TriggerScaler.cc:75
L1TriggerScaler::printGTPartition0TriggerRates
void printGTPartition0TriggerRates() const
Definition: L1TriggerScaler.cc:119
L1TriggerScaler::printGTTechCounts
void printGTTechCounts() const
Definition: L1TriggerScaler.cc:83
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1TriggerScaler::printGTTechPrescaling
void printGTTechPrescaling() const
Definition: L1TriggerScaler.cc:101
L1TriggerScaler::printFormat
void printFormat() const
Definition: L1TriggerScaler.cc:50
L1TriggerScaler::printLumiSegmentValues
void printLumiSegmentValues() const
Definition: L1TriggerScaler.cc:43
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
L1TriggerScaler::printGTAlgoCounts
void printGTAlgoCounts() const
Definition: L1TriggerScaler.cc:57
L1TriggerScaler::printRunValue
void printRunValue() const
Definition: L1TriggerScaler.cc:38
L1TriggerScaler::printGTPartition0DeadTime
void printGTPartition0DeadTime() const
Definition: L1TriggerScaler.cc:128
L1TriggerScaler
Definition: L1TriggerScaler.h:18
edm::ESHandle
Definition: DTSurvey.h:22
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition: EventSetupRecordKey.h:32
L1TriggerScaler::printGTPartition0TriggerCounts
void printGTPartition0TriggerCounts() const
Definition: L1TriggerScaler.cc:110
L1TriggerScaler::printGTAlgoRates
void printGTAlgoRates() const
Definition: L1TriggerScaler.cc:66
get
#define get
L1TriggerScaler::printGTPartition0DeadTimeRatio
void printGTPartition0DeadTimeRatio() const
Definition: L1TriggerScaler.cc:137
L1TriggerScaler::printGTTechRates
void printGTTechRates() const
Definition: L1TriggerScaler.cc:92
L1TriggerScalerRcd
Definition: L1TriggerScalerRcd.h:24
edm::eventsetup
Definition: ES_DDDetector.cc:16
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37