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.

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  }

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

◆ ~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.

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

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

◆ setEvent()

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

Definition at line 16 of file ObjectModifier.h.

16  {
17  for (unsigned i = 0; i < modifiers_.size(); ++i)
19  }

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

◆ setEventContent()

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

Definition at line 21 of file ObjectModifier.h.

21  {
22  for (unsigned i = 0; i < modifiers_.size(); ++i)
24  }

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

Member Data Documentation

◆ modifiers_

template<class T >
std::vector<ModifierPointer> pat::ObjectModifier< T >::modifiers_
private
mps_fire.i
i
Definition: mps_fire.py:428
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
mps_splice.mods
mods
Definition: mps_splice.py:43
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
pat::ObjectModifier::setEventContent
void setEventContent(const edm::EventSetup &setup)
Definition: ObjectModifier.h:21
get
#define get
cc
pat::ObjectModifier::setEvent
void setEvent(const edm::Event &event)
Definition: ObjectModifier.h:16
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ParameterSet::getParameterSetVector
VParameterSet const & getParameterSetVector(std::string const &name) const
Definition: ParameterSet.cc:2160
pat::ObjectModifier::modifiers_
std::vector< ModifierPointer > modifiers_
Definition: ObjectModifier.h:32
event
Definition: event.py:1