CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions
pat::helper Namespace Reference

Namespaces

 ParametrizationHelper
 
 ResolutionHelper
 

Classes

struct  AddUserCand
 
struct  AddUserFloat
 
struct  AddUserInt
 
struct  AddUserIntFromBool
 
struct  AddUserPtr
 
class  AnyNumberAssociationAdaptor
 
class  AnythingToValueMap
 
class  BaseIsolator
 
class  BasicOverlapTest
 
class  EfficiencyLoader
 
class  IsoDepositIsolator
 
class  KinResolutionsLoader
 
class  ManyThingsToValueMaps
 
class  MultiIsolator
 
class  NamedUserDataLoader
 
class  OverlapBySuperClusterSeed
 
class  OverlapTest
 
class  SimpleIsolator
 
class  TriggerHelper
 Helper class to remove unwanted dependencies from DataFormats/PatCandidates related to PAT trigger data formats. More...
 
class  TriggerMatchHelper
 
class  VertexingHelper
 Produces and/or checks pat::VertexAssociation's. More...
 

Typedefs

typedef ManyThingsToValueMaps< AnyNumberAssociationAdaptorAnyNumbersToValueMaps
 

Functions

template<typename T , typename TParent , typename TProd >
edm::Ptr< TParent > getPtrForProd (edm::Ptr< T > ptr, const std::vector< edm::Handle< edm::View< TParent >>> &parentColls, const TProd &prod)
 

Typedef Documentation

◆ AnyNumbersToValueMaps

Definition at line 136 of file AnythingToValueMap.cc.

Function Documentation

◆ getPtrForProd()

template<typename T , typename TParent , typename TProd >
edm::Ptr<TParent> pat::helper::getPtrForProd ( edm::Ptr< T ptr,
const std::vector< edm::Handle< edm::View< TParent >>> &  parentColls,
const TProd &  prod 
)

Definition at line 48 of file PATObjectUserDataEmbedder.cc.

References Exception, edm::Ptr< T >::id(), and dumpMFGeometry_cfg::prod.

Referenced by pat::helper::NamedUserDataLoader< pat::helper::AddUserCand >::addData().

50  {
51  if (prod.contains(ptr.id())) {
52  return edm::Ptr<TParent>(ptr);
53  } else {
54  for (const auto &parentColl : parentColls) {
55  if (parentColl.isValid() && prod.contains(parentColl.id())) {
56  for (size_t indx = 0; indx < parentColl->size(); indx++) {
57  if (equal<TParent>(*ptr, (*parentColl)[indx])) {
58  return edm::Ptr<TParent>(parentColl, indx);
59  }
60  }
61  //note this assumes that another parent coll isnt in the value map
62  //it if its, it'll return null when the other one might work
63  return edm::Ptr<TParent>(parentColl.id());
64  }
65  }
66  }
67  throw cms::Exception("ConfigurationError")
68  << "When accessing value maps in PATObjectUserDataEmbedder, the collection the valuemap was keyed off is not "
69  "either the input src or listed in one of the parentSrcs";
70  }
ProductID id() const
Accessor for product ID.
Definition: Ptr.h:162