218 constexpr bool same(
char const *
x,
char const *
y) {
219 return !*x && !*y ?
true : (*x == *y && same(x+1, y+1));
224 return !entries->
name ? 0 :
225 entries->
type == type ? entries->
name :
226 objectIdToString(type, entries+1);
232 same(entries->
name, name) ? entries->
type :
233 stringToObjectId(name, entries+1);
252 <<
"@SUB=AlignableObjectId::ctor\n"
253 <<
"trying to create AlignableObjectId with unspecified geometry";
264 muonGeometry(muonDt, muonCsc)))
284 const char *
result = objectIdToString(type, entries_);
289 <<
"Unknown alignableObjectId " <<
type;
298 auto result = stringToObjectId(name, entries_);
302 <<
"Unknown alignableObjectId " <<
name;
313 return Geometry::PhaseII;
317 return Geometry::PhaseI;
321 return Geometry::RunI;
325 <<
"@SUB=AlignableObjectId::trackerGeometry\n"
326 <<
"unknown version of TrackerGeometry";
333 return Geometry::General;
338 if (first == Geometry::General)
return second;
339 if (second == Geometry::General)
return first;
340 if (first == second)
return first;
343 <<
"@SUB=AlignableObjectId::commonGeometry\n"
344 <<
"impossible to find common geometry because the two geometries are "
345 <<
"different and none of them is 'General'";
357 auto trackerGeometry = (tracker ?
360 auto muonGeometry = (muon ?
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 &)
const AlignableObjectId & objectIdProvider() const
Return muon alignable object ID provider derived from the muon system geometry.
bool isThere(GeomDetEnumerators::SubDetector subdet) const
U second(std::pair< T, U > const &p)
T x() const
Cartesian x coordinate.
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
align::StructureType type
const AlignableObjectId & objectIdProvider() const
Return tracker alignable object ID provider derived from the tracker's geometry.
const char * idToString(align::StructureType type) const
align::StructureType nameToType(const std::string &name) const
Convert name to type.
ESHandle< TrackerGeometry > geometry
Constructor of the full muon geometry.