CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 class GEMGeometry;
11 
14 public:
15  struct entry;
17 
19  AlignableObjectId(const TrackerGeometry*, const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
20  AlignableObjectId(const AlignableObjectId&) = default;
24  virtual ~AlignableObjectId() = default;
25 
27  Geometry geometry() const { return geometry_; }
28 
31 
34  const char* idToString(align::StructureType type) const;
35  align::StructureType stringToId(const char*) const;
36  align::StructureType stringToId(const std::string& s) const { return stringToId(s.c_str()); }
37 
40  template <typename TRACKER, typename MUON>
42  template <typename TRACKER>
43  static AlignableObjectId commonObjectIdProvider(const TRACKER*, std::nullptr_t);
44 
45 private:
47  static Geometry muonGeometry(const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
48 
49  const entry* entries_{nullptr};
51 };
52 
53 template <typename TRACKER, typename MUON>
55  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
56  auto muonGeometry = (muon ? muon->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
58 }
59 
60 template <typename T>
62  auto trackerGeometry = (tracker ? tracker->objectIdProvider().geometry() : AlignableObjectId::Geometry::General);
64 }
65 
66 #endif
static Geometry trackerGeometry(const TrackerGeometry *)
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 &)
static Geometry muonGeometry(const DTGeometry *, const CSCGeometry *, const GEMGeometry *)
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
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