CMS 3D CMS Logo

DetectorGlobalPosition.cc
Go to the documentation of this file.
2 
7 #include <vector>
8 
9 namespace align {
10  const AlignTransform &DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id) {
11  for (std::vector<AlignTransform>::const_iterator iter = allGlobals.m_align.begin();
12  iter != allGlobals.m_align.end();
13  ++iter) {
14  if (iter->rawId() == id.rawId()) {
15  return *iter;
16  }
17  }
18 
19  throw cms::Exception("RecordNotFound")
20  << "DetId(" << id.rawId() << ") not found in GlobalPositionRcd" << std::endl;
21  }
22 }
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
Definition: DetId.h:18
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)