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 Attributes
GBRForestGetterFromDB Class Reference
Inheritance diagram for GBRForestGetterFromDB:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
 GBRForestGetterFromDB (const edm::ParameterSet &)
 
virtual ~GBRForestGetterFromDB ()
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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 Attributes

edm::ESHandle< GBRForesttheGBRForestHandle
 
std::string theGBRForestName
 
std::string theOutputFileName
 
std::string theOutputObjectName
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 16 of file GBRForestGetterFromDB.cc.

Constructor & Destructor Documentation

GBRForestGetterFromDB::GBRForestGetterFromDB ( const edm::ParameterSet conf)
explicit

Definition at line 30 of file GBRForestGetterFromDB.cc.

30  :
31  theGBRForestName(conf.getParameter<std::string>("grbForestName")),
32  theOutputFileName(conf.getUntrackedParameter<std::string>("outputFileName")),
33  theOutputObjectName(conf.getUntrackedParameter<std::string>("outputObjectName", theGBRForestName.empty() ? "GBRForest" : theGBRForestName))
34 {
35 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
GBRForestGetterFromDB::~GBRForestGetterFromDB ( )
virtual

Definition at line 37 of file GBRForestGetterFromDB.cc.

38 {
39 }

Member Function Documentation

void GBRForestGetterFromDB::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 42 of file GBRForestGetterFromDB.cc.

References gather_cfg::cout, edm::EventSetup::get(), edm::ESHandle< class >::product(), theGBRForestHandle, theGBRForestName, theOutputFileName, and theOutputObjectName.

43 {
45  TFile *fOut = TFile::Open(theOutputFileName.c_str(), "RECREATE");
46  fOut->WriteObject(theGBRForestHandle.product(), theOutputObjectName.c_str());
47  fOut->Close();
48  std::cout << "Wrote output to " << theOutputFileName << std::endl;
49 }
edm::ESHandle< GBRForest > theGBRForestHandle
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
tuple cout
Definition: gather_cfg.py:145

Member Data Documentation

edm::ESHandle<GBRForest> GBRForestGetterFromDB::theGBRForestHandle
private

Definition at line 27 of file GBRForestGetterFromDB.cc.

Referenced by analyze().

std::string GBRForestGetterFromDB::theGBRForestName
private

Definition at line 24 of file GBRForestGetterFromDB.cc.

Referenced by analyze().

std::string GBRForestGetterFromDB::theOutputFileName
private

Definition at line 25 of file GBRForestGetterFromDB.cc.

Referenced by analyze().

std::string GBRForestGetterFromDB::theOutputObjectName
private

Definition at line 26 of file GBRForestGetterFromDB.cc.

Referenced by analyze().