ATLAS Offline Software
JetAccessorMap_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace xAOD {
8 
9  namespace JetAttributeAccessor {
10 
12  // const char* JetAssoParticleAccessors_v1::s_map[] = {
13  // "GhostTracks",
14  // "GhostTruthParticles",
15  // };
16 
17  // we define a dummy accessor class
18  namespace { class Dummy {}; }
19 
20  template<>
21  class AccessorWrapper<Dummy> : public Named {
22  public:
23  AccessorWrapper(const std::string&n) : Named(n){}
24  };
25 
26 
28  // no specialization for now. Use dummy to avoid any conflict
30  if(acc) return acc->name();
31  return "UknownAttribute";
32  }
33 
34 
35  template<>
36  class ObjectAccessorWrapper<Dummy> : public Named {
37  public:
38  ObjectAccessorWrapper(const std::string&n) : Named(n){}
39  };
40 
42  // no specialization for now. Use dummy to avoid any conflict
44  if(acc) return acc->name();
45  return "UknownAssoObject";
46  }
47 
48  }
49 
50 
51 
52 }
xAOD::JetAttributeAccessor::ObjectAccessorWrapper
Definition: JetAccessors.h:258
JetAccessorMap_v1.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::JetAttribute::AttributeID
AttributeID
Definition: JetAttributes.h:24
xAOD::JetAttributeAccessor::Named
Definition: JetAccessors.h:41
xAOD::JetAttributeAccessor::AccessorMap_v1::accessor
static const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID moment)
Definition: JetAccessorMap_v1.h:62
beamspotman.n
n
Definition: beamspotman.py:731
xAOD::JetAttributeAccessor::ObjectAccessorMap_v1::accessor
static const ObjectAccessorWrapper< T > * accessor(xAOD::JetAttribute::AssoParticlesID id)
Definition: JetAccessorMap_v1.h:218
xAOD::JetAttributeAccessor::AccessorWrapper< Dummy >::AccessorWrapper
AccessorWrapper(const std::string &n)
Definition: JetAccessorMap_v1.cxx:23
xAOD::JetAttribute::AssoParticlesID
AssoParticlesID
Definition: JetAttributes.h:251
xAOD::JetAttributeAccessor::ObjectAccessorWrapper< Dummy >
Definition: JetAccessorMap_v1.cxx:36
xAOD::JetAttributeAccessor::AccessorWrapper< Dummy >
Definition: JetAccessorMap_v1.cxx:21
xAOD::JetAttributeAccessor::assoName_v1
std::string assoName_v1(xAOD::JetAttribute::AssoParticlesID id)
Returns a name given the AssoParticlesID.
Definition: JetAccessorMap_v1.cxx:41
xAOD::JetAttributeAccessor::name_v1
std::string name_v1(xAOD::JetAttribute::AttributeID id)
Returns a name given the AttributeID.
Definition: JetAccessorMap_v1.cxx:27
xAOD::JetAttributeAccessor::AccessorWrapper
Definition: JetAccessors.h:49
xAOD::JetAttributeAccessor::ObjectAccessorWrapper< Dummy >::ObjectAccessorWrapper
ObjectAccessorWrapper(const std::string &n)
Definition: JetAccessorMap_v1.cxx:38