UserUtils
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
usr::PluginAlias< EDMPLUGIN > Class Template Reference
Inheritance diagram for usr::PluginAlias< EDMPLUGIN >:
usr::EDHistogramAnalyzer usr::EDNtupleProducer

Detailed Description

template<typename EDMPLUGIN>
class usr::PluginAlias< EDMPLUGIN >

One I find immensely annoying to code is the consume calls to create an EDMToken object. What makes it worse is that the consumes call is an protected member function of the edm plugin's base class. Writing an alias to the function, therefore, requires all future plugins to inherit from this alias class.

Public Member Functions

 PluginAlias (const edm::ParameterSet &config)
 

Protected Member Functions

template<typename TYPE >
edm::EDGetToken GetToken (const std::string &configtag)
 template class for getting the EdmToken from the initializer configuration parameter set. More...
 
template<typename TYPE >
edm::EDGetToken GetRunToken (const std::string &configtag)
 Same template function as GetToken() except for getting Run level objects.
 
template<typename TYPE >
edm::Handle< TYPE > MakeHandle (const edm::Event &event, const edm::EDGetToken tok)
 Construction for a handle.
 
TObject * GetFileObj (const std::string &filetag, const std::string objtag)
 getting a clone of an object described in a file. See static function for full documentation.
 
std::string GetFilePath (const std::string &filetag)
 getting the full path to a file. See static function for full documentation.
 

Static Protected Member Functions

static std::string GetFilePath (const edm::ParameterSet &config, const std::string &filetag)
 returing the string to a path in the parameterset if an EDM::FileInPath was used.
 
static TObject * GetFileObj (const edm::ParameterSet &config, const std::string &filetag, const std::string &objtag)
 Given a file path in the form of an EDM::FileInPath, and a object key as a parameter set string. More...
 

Private Attributes

const edm::ParameterSet & _config
 

Constructor & Destructor Documentation

◆ PluginAlias()

template<typename EDMPLUGIN >
usr::PluginAlias< EDMPLUGIN >::PluginAlias ( const edm::ParameterSet &  config)
inline

Like all EDM plugins, this requires a parameterset to initialize. A reference to the parameterset is stored for less verbose parsing.

Member Function Documentation

◆ GetFileObj()

template<typename EDMPLUGIN >
static TObject * usr::PluginAlias< EDMPLUGIN >::GetFileObj ( const edm::ParameterSet &  config,
const std::string &  filetag,
const std::string &  objtag 
)
inlinestaticprotected

This function return a clone to the object stored in a file for analysis use.

◆ GetToken()

template<typename EDMPLUGIN >
template<typename TYPE >
edm::EDGetToken usr::PluginAlias< EDMPLUGIN >::GetToken ( const std::string &  configtag)
inlineprotected
Template Parameters
TYPEthe type of object attempting to be consumed must be user specified.

#include <PluginAlias.hpp>


The documentation for this class was generated from the following file: