CMS 3D CMS Logo

AlignableObjectId.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_AlignableObjectId_h
2 #define Alignment_CommonAlignment_AlignableObjectId_h
3 
4 #include <string>
6 
7 class TrackerGeometry;
8 class DTGeometry;
9 class CSCGeometry;
10 
13 public:
14  struct entry;
16 
19  AlignableObjectId(const AlignableObjectId&) = default;
23  virtual ~AlignableObjectId() = default;
24 
26  Geometry geometry() const { return geometry_; }
27 
30 
33  const char* idToString(align::StructureType type) const;
34  align::StructureType stringToId(const char*) const;
35  align::StructureType stringToId(const std::string& s) const { return stringToId(s.c_str()); }
36 
39  template <typename TRACKER, typename MUON>
41  template <typename TRACKER>
42  static AlignableObjectId commonObjectIdProvider(const TRACKER*, std::nullptr_t);
43 
44 private:
46  static Geometry muonGeometry(const DTGeometry*, const CSCGeometry*);
47 
48  const entry* entries_{nullptr};
50 };
51 
52 template <typename TRACKER, typename MUON>
54  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
55  auto muonGeometry = (muon ? muon->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
57 }
58 
59 template <typename T>
61  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
63 }
64 
65 #endif
static Geometry trackerGeometry(const TrackerGeometry *)
type
Definition: HCALResponse.h:21
align::StructureType stringToId(const char *) const
static Geometry commonGeometry(Geometry, Geometry)
std::string typeToName(align::StructureType type) const
Convert type to name.
static AlignableObjectId commonObjectIdProvider(const AlignableObjectId &, const AlignableObjectId &)
align::StructureType stringToId(const std::string &s) const
Class Geometry Contains vector for fit parameters (mean, sigma, etc.) obtained from multiple IOVs See...
Definition: DMRtrends.cc:183
static Geometry muonGeometry(const DTGeometry *, const CSCGeometry *)
AlignableObjectId(Geometry)
Allows conversion between type and name, and vice-versa.
Geometry geometry() const
retrieve the geometry information
const entry * entries_
AlignableObjectId & operator=(const AlignableObjectId &)=default
virtual ~AlignableObjectId()=default
const char * idToString(align::StructureType type) const
align::StructureType nameToType(const std::string &name) const
Convert name to type.
long double T