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 | Private Member Functions | Private Attributes
JetCorrectorDBReader Class Reference
Inheritance diagram for JetCorrectorDBReader:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 JetCorrectorDBReader (const edm::ParameterSet &)
 
 ~JetCorrectorDBReader ()
 
- 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginJob () override
 
virtual void endJob () override
 

Private Attributes

bool mCreateTextFile
 
std::string mGlobalTag
 
std::string mPayloadName
 
bool mPrintScreen
 

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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 38 of file JetCorrectorDBReader.cc.

Constructor & Destructor Documentation

JetCorrectorDBReader::JetCorrectorDBReader ( const edm::ParameterSet iConfig)
explicit
JetCorrectorDBReader::~JetCorrectorDBReader ( )

Definition at line 63 of file JetCorrectorDBReader.cc.

64 {
65 
66 }

Member Function Documentation

void JetCorrectorDBReader::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 68 of file JetCorrectorDBReader.cc.

References gather_cfg::cout, edm::EventSetup::get(), relativeConstraints::keys, mCreateTextFile, mGlobalTag, mPayloadName, mPrintScreen, JetCorrectorParameters::printFile(), and JetCorrectorParameters::printScreen().

69 {
71  std::cout <<"Inspecting JEC payload with label: "<< mPayloadName <<std::endl;
72  iSetup.get<JetCorrectionsRecord>().get(mPayloadName,JetCorParamsColl);
73  std::vector<JetCorrectorParametersCollection::key_type> keys;
74  JetCorParamsColl->validKeys( keys );
75  for ( std::vector<JetCorrectorParametersCollection::key_type>::const_iterator ibegin = keys.begin(),
76  iend = keys.end(), ikey = ibegin; ikey != iend; ++ikey ) {
77  std::cout<<"-------------------------------------------------" << std::endl;
78  std::cout<<"Processing key = " << *ikey << std::endl;
79  std::cout<<"object label: "<<JetCorParamsColl->findLabel(*ikey)<<std::endl;
80  JetCorrectorParameters const & JetCorParams = (*JetCorParamsColl)[*ikey];
81 
82  if (mCreateTextFile)
83  {
84  std::cout<<"Creating txt file: "<<mGlobalTag+"_"+mPayloadName+"_"+JetCorParamsColl->findLabel(*ikey)+".txt"<<std::endl;
85  JetCorParams.printFile(mGlobalTag+"_"+JetCorParamsColl->findLabel(*ikey)+"_"+mPayloadName+".txt");
86  }
87  if (mPrintScreen)
88  JetCorParams.printScreen();
89  }
90 }
void printFile(const std::string &fFileName) const
const T & get() const
Definition: EventSetup.h:56
tuple cout
Definition: gather_cfg.py:145
void JetCorrectorDBReader::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 93 of file JetCorrectorDBReader.cc.

94 {
95 }
void JetCorrectorDBReader::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file JetCorrectorDBReader.cc.

99 {
100 }

Member Data Documentation

bool JetCorrectorDBReader::mCreateTextFile
private

Definition at line 50 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().

std::string JetCorrectorDBReader::mGlobalTag
private

Definition at line 49 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().

std::string JetCorrectorDBReader::mPayloadName
private

Definition at line 49 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().

bool JetCorrectorDBReader::mPrintScreen
private

Definition at line 50 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().