CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
EGExtraInfoModifierFromFloatValueMaps.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  EGExtraInfoModifierFromFloatValueMaps
 
struct  EGExtraInfoModifierFromFloatValueMaps::electron_config
 
struct  EGExtraInfoModifierFromFloatValueMaps::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
< EGExtraInfoModifierFromFloatValueMaps
s_maker__LINE__ ("EGExtraInfoModifierFromFloatValueMaps")
 

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 159 of file EGExtraInfoModifierFromFloatValueMaps.cc.

References edm::second().

Referenced by EGExtraInfoModifierFromFloatValueMaps::modifyObject(), EGExtraInfoModifierFromIntValueMaps::modifyObject(), and EGFull5x5ShowerShapeModifierFromValueMaps::modifyObject().

159  {
160  if( !tok.isUninitialized() ) value = map.find(tok.index())->second->get(ptr.id(),ptr.key());
161 }
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
template<typename T , typename U , typename V >
void make_consumes ( T tag,
U &  tok,
V &  sume 
)
inline
static const ModifyObjectValueFactory ::PMaker< EGExtraInfoModifierFromFloatValueMaps > s_maker__LINE__ ( "EGExtraInfoModifierFromFloatValueMaps"  )
static