CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
EGFull5x5ShowerShapeModifier.cc File Reference
#include "CommonTools/CandAlgos/interface/ModifyObjectValueBase.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "DataFormats/Common/interface/ValueMap.h"
#include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
#include "DataFormats/EgammaCandidates/interface/Photon.h"
#include <unordered_map>

Go to the source code of this file.

Classes

class  EGFull5x5ShowerShapeModifierFromValueMaps
 
struct  EGFull5x5ShowerShapeModifierFromValueMaps::electron_config
 
struct  EGFull5x5ShowerShapeModifierFromValueMaps::photon_config
 

Functions

template<typename T , typename U , typename V >
void assignValue (const T &ptr, const U &tok, const V &map, float &value)
 
void get_product (const edm::Event &evt, const edm::EDGetTokenT< edm::ValueMap< float > > &tok, std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > &map)
 
template<typename T , typename U , typename V >
void make_consumes (T &tag, U &tok, V &sume)
 
static const
ModifyObjectValueFactory::PMaker
< EGFull5x5ShowerShapeModifierFromValueMaps
s_maker__LINE__ ("EGFull5x5ShowerShapeModifierFromValueMaps")
 

Function Documentation

template<typename T , typename U , typename V >
void assignValue ( const T ptr,
const U &  tok,
const V &  map,
float &  value 
)
inline

Definition at line 233 of file EGFull5x5ShowerShapeModifier.cc.

References edm::second().

233  {
234  if( !tok.isUninitialized() ) value = map.find(tok.index())->second->get(ptr.id(),ptr.key());
235 }
U second(std::pair< T, U > const &p)
void get_product ( const edm::Event evt,
const edm::EDGetTokenT< edm::ValueMap< float > > &  tok,
std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > &  map 
)
inline

Definition at line 133 of file EGFull5x5ShowerShapeModifier.cc.

References edm::Event::getByToken(), python.multivaluedict::map(), and results_mgr::tok.

135  {
136  if( !tok.isUninitialized() ) evt.getByToken(tok,map[tok.index()]);
137 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
unsigned int index() const
Definition: EDGetToken.h:70
bool isUninitialized() const
Definition: EDGetToken.h:71
template<typename T , typename U , typename V >
void make_consumes ( T tag,
U &  tok,
V &  sume 
)
inline

Definition at line 199 of file EGFull5x5ShowerShapeModifier.cc.

References GlobalPosition_Frontier_DevDB_cff::tag.

199 { if( !(empty_tag == tag) ) tok = sume.template consumes<edm::ValueMap<float> >(tag); }
static const ModifyObjectValueFactory ::PMaker< EGFull5x5ShowerShapeModifierFromValueMaps > s_maker__LINE__ ( "EGFull5x5ShowerShapeModifierFromValueMaps"  )
static