CMS 3D CMS Logo

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 () override
 
- 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 37 of file JetCorrectorDBReader.cc.

Constructor & Destructor Documentation

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

Definition at line 58 of file JetCorrectorDBReader.cc.

58 {}

Member Function Documentation

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

Definition at line 60 of file JetCorrectorDBReader.cc.

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

60  {
62  std::cout << "Inspecting JEC payload with label: " << mPayloadName << std::endl;
63  iSetup.get<JetCorrectionsRecord>().get(mPayloadName, JetCorParamsColl);
64  std::vector<JetCorrectorParametersCollection::key_type> keys;
65  JetCorParamsColl->validKeys(keys);
66  for (std::vector<JetCorrectorParametersCollection::key_type>::const_iterator ibegin = keys.begin(),
67  iend = keys.end(),
68  ikey = ibegin;
69  ikey != iend;
70  ++ikey) {
71  std::cout << "-------------------------------------------------" << std::endl;
72  std::cout << "Processing key = " << *ikey << std::endl;
73  std::cout << "object label: " << JetCorParamsColl->findLabel(*ikey) << std::endl;
74  JetCorrectorParameters const& JetCorParams = (*JetCorParamsColl)[*ikey];
75 
76  if (mCreateTextFile) {
77  std::cout << "Creating txt file: "
78  << mGlobalTag + "_" + mPayloadName + "_" + JetCorParamsColl->findLabel(*ikey) + ".txt" << std::endl;
79  JetCorParams.printFile(mGlobalTag + "_" + JetCorParamsColl->findLabel(*ikey) + "_" + mPayloadName + ".txt");
80  }
81  if (mPrintScreen)
82  JetCorParams.printScreen();
83  }
84 }
static std::string findLabel(key_type k)
void printFile(const std::string &fFileName) const
T get() const
Definition: EventSetup.h:73
void validKeys(std::vector< key_type > &keys) const
void JetCorrectorDBReader::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file JetCorrectorDBReader.cc.

86 {}
void JetCorrectorDBReader::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file JetCorrectorDBReader.cc.

References DEFINE_FWK_MODULE.

88 {}

Member Data Documentation

bool JetCorrectorDBReader::mCreateTextFile
private

Definition at line 48 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().

std::string JetCorrectorDBReader::mGlobalTag
private

Definition at line 47 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().

std::string JetCorrectorDBReader::mPayloadName
private

Definition at line 47 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().

bool JetCorrectorDBReader::mPrintScreen
private

Definition at line 48 of file JetCorrectorDBReader.cc.

Referenced by analyze(), and JetCorrectorDBReader().