CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
L1ScalesTester Class Reference

#include <L1TriggerConfig/L1ScalesProducer/interface/L1ScalesTester.h>

Inheritance diagram for L1ScalesTester:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 L1ScalesTester (const edm::ParameterSet &)
 
 ~L1ScalesTester ()
 
- 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
 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
 
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
 
- 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 31 of file L1ScalesTester.h.

Constructor & Destructor Documentation

L1ScalesTester::L1ScalesTester ( const edm::ParameterSet ps)
explicit

Definition at line 19 of file L1ScalesTester.cc.

References gather_cfg::cout.

19  {
20  cout << "Constructing a L1ScalesTester" << endl;
21 }
tuple cout
Definition: gather_cfg.py:121
L1ScalesTester::~L1ScalesTester ( )

Definition at line 23 of file L1ScalesTester.cc.

23  {
24 
25 }

Member Function Documentation

void L1ScalesTester::analyze ( const edm::Event e,
const edm::EventSetup es 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 27 of file L1ScalesTester.cc.

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

27  {
28  using namespace edm;
29 
31  es.get< L1EmEtScaleRcd >().get( emScale ) ;
32 
33  cout << "L1EmEtScaleRcd :" << endl;
34  emScale->print(cout);
35  cout << endl;
36 
38  es.get< L1CaloEcalScaleRcd >().get(ecalScale);
39 
41  es.get< L1CaloHcalScaleRcd >().get(hcalScale);
42 
43  cout << " L1ColoEcalScale :" << endl;
44  ecalScale->print(cout);
45  cout << endl;
46 
47  cout << " L1ColoHcalScale :" << endl;
48  hcalScale->print(cout);
49  cout << endl;
50 
51  ESHandle< L1CaloEtScale > jetScale ;
52  es.get< L1JetEtScaleRcd >().get( jetScale ) ;
53 
54  cout << "L1JetEtScaleRcd :" << endl;
55  jetScale->print(cout);
56  cout << endl;
57 
58  // test EM lin-rank conversion
59  cout << "Testing EM linear-to-rank conversion" << endl;
60  for (unsigned short i=0; i<32; i++) {
61  unsigned rank = emScale->rank(i);
62  cout << "EM linear : " << i << ", Et : " << i*emScale->linearLsb() << " GeV, rank : " << rank << endl;
63  }
64  cout << endl;
65 
66  // test jet lin-rank conversion
67  cout << "Testing jet linear-to-rank conversion" << endl;
68  for (unsigned short i=0; i<32; i++) {
69  unsigned rank = jetScale->rank(i);
70  cout << "jet linear : " << i << ", Et : " << i*jetScale->linearLsb() << " GeV, rank : " << rank << endl;
71  }
72  cout << endl;
73 
74  // test EM rank-et conversion
75  cout << "Testing EM rank-to-Et conversion" << endl;
76  for (unsigned i=0; i<32; i++) {
77  double et = emScale->et(i);
78  cout << "EM rank : " << i << " Et : " << et << " GeV" << endl;
79  }
80  cout << endl;
81 
82  // test jet rank-et conversion
83  cout << "Testing jet rank-to-Et conversion" << endl;
84  for (unsigned i=0; i<32; i++) {
85  double et = jetScale->et(i);
86  cout << "jet rank : " << i << " Et : " << et << " GeV" << endl;
87  }
88  cout << endl;
89 
90 
91 }
int i
Definition: DBlmapReader.cc:9
const T & get() const
Definition: EventSetup.h:55
tuple cout
Definition: gather_cfg.py:121