CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
pat::ObjectModifier< T > Class Template Reference

#include <ObjectModifier.h>

Public Types

typedef std::unique_ptr< ModifyObjectValueBaseModifierPointer
 

Public Member Functions

void modify (T &obj) const
 
 ObjectModifier (const edm::ParameterSet &conf, edm::ConsumesCollector &&cc)
 
void setEvent (const edm::Event &event)
 
void setEventContent (const edm::EventSetup &setup)
 
 ~ObjectModifier ()
 

Private Attributes

std::vector< ModifierPointermodifiers_
 

Detailed Description

template<class T>
class pat::ObjectModifier< T >

Definition at line 9 of file ObjectModifier.h.

Member Typedef Documentation

◆ ModifierPointer

template<class T >
typedef std::unique_ptr<ModifyObjectValueBase> pat::ObjectModifier< T >::ModifierPointer

Definition at line 11 of file ObjectModifier.h.

Constructor & Destructor Documentation

◆ ObjectModifier()

template<class T >
pat::ObjectModifier< T >::ObjectModifier ( const edm::ParameterSet conf,
edm::ConsumesCollector &&  cc 
)

Definition at line 36 of file ObjectModifier.h.

References beamerCreator::create(), get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSetVector(), mps_fire::i, mps_splice::mods, and AlCaHLTBitMon_QueryRunRegistry::string.

36  {
37  const std::vector<edm::ParameterSet>& mods = conf.getParameterSetVector("modifications");
38  for (unsigned i = 0; i < mods.size(); ++i) {
39  const edm::ParameterSet& iconf = mods[i];
40  const std::string& mname = iconf.getParameter<std::string>("modifierName");
41  modifiers_.emplace_back(ModifyObjectValueFactory::get()->create(mname, iconf, cc));
42  }
43  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
def create(alignables, pedeDump, additionalData, outputFile, config)
std::vector< ModifierPointer > modifiers_
VParameterSet const & getParameterSetVector(std::string const &name) const
#define get

◆ ~ObjectModifier()

template<class T >
pat::ObjectModifier< T >::~ObjectModifier ( )
inline

Definition at line 14 of file ObjectModifier.h.

14 {}

Member Function Documentation

◆ modify()

template<class T >
void pat::ObjectModifier< T >::modify ( T obj) const
inline

Definition at line 26 of file ObjectModifier.h.

References mps_fire::i, pat::ObjectModifier< T >::modifiers_, and getGTfromDQMFile::obj.

26  {
27  for (unsigned i = 0; i < modifiers_.size(); ++i)
28  modifiers_[i]->modifyObject(obj);
29  }
std::vector< ModifierPointer > modifiers_

◆ setEvent()

template<class T >
void pat::ObjectModifier< T >::setEvent ( const edm::Event event)
inline

Definition at line 16 of file ObjectModifier.h.

References mps_fire::i, and pat::ObjectModifier< T >::modifiers_.

16  {
17  for (unsigned i = 0; i < modifiers_.size(); ++i)
19  }
std::vector< ModifierPointer > modifiers_
void setEvent(const edm::Event &event)
Definition: event.py:1

◆ setEventContent()

template<class T >
void pat::ObjectModifier< T >::setEventContent ( const edm::EventSetup setup)
inline

Definition at line 21 of file ObjectModifier.h.

References mps_fire::i, pat::ObjectModifier< T >::modifiers_, and singleTopDQM_cfi::setup.

21  {
22  for (unsigned i = 0; i < modifiers_.size(); ++i)
24  }
std::vector< ModifierPointer > modifiers_
void setEventContent(const edm::EventSetup &setup)

Member Data Documentation

◆ modifiers_

template<class T >
std::vector<ModifierPointer> pat::ObjectModifier< T >::modifiers_
private