test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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

Definition at line 24 of file L1TriggerScalerESAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 27 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

28  {
29  std::cout<<"L1TriggerScalerESAnalyzer"<<std::endl;
30  }
tuple cout
Definition: gather_cfg.py:121
edmtest::L1TriggerScalerESAnalyzer::L1TriggerScalerESAnalyzer ( int  i)
inlineexplicit

Definition at line 31 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

32  { std::cout<<"L1TriggerScalerESAnalyzer "<<i<<std::endl; }
int i
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:121
virtual edmtest::L1TriggerScalerESAnalyzer::~L1TriggerScalerESAnalyzer ( )
inlinevirtual

Definition at line 33 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

33  {
34  std::cout<<"~L1TriggerScalerESAnalyzer "<<std::endl;
35  }
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 60 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout, edm::EventID::event(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), edm::EventBase::id(), edm::EventID::run(), and edm::eventsetup::EventSetupRecordKey::type().

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  }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
heterocontainer::HCTypeTag TypeTag
edm::EventID id() const
Definition: EventBase.h:60
tuple cout
Definition: gather_cfg.py:121
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void edmtest::L1TriggerScalerESAnalyzer::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 53 of file L1TriggerScalerESAnalyzer.cc.

References gather_cfg::cout.

53  {
54  std::cout<<"###L1TriggerScalerESAnalyzer::beginJob"<<std::endl;
55 
56  }
tuple cout
Definition: gather_cfg.py:121
void edmtest::L1TriggerScalerESAnalyzer::beginRun ( const edm::Run ,
const edm::EventSetup context 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 44 of file L1TriggerScalerESAnalyzer.cc.

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

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  }
const T & get() const
Definition: EventSetup.h:56
tuple cout
Definition: gather_cfg.py:121