CMS 3D CMS Logo

AlignableMap.cc
Go to the documentation of this file.
2 
5 
6 
7 
8 //_____________________________________________________________________________
10 {
11  return theStore[name];
12 }
13 
14 //_____________________________________________________________________________
16 {
17  typename Container::iterator o = theStore.find(name);
18 
19  if (theStore.end() == o) {
20  std::ostringstream knownKeys;
21  for (auto it = theStore.begin(); it != theStore.end(); ++it) {
22  knownKeys << (it != theStore.begin() ? ", " : "") << it->first;
23  }
24 
25  throw cms::Exception("AlignableMapError")
26  << "Cannot find an object of name " << name << " in AlignableMap, "
27  << "know only " << knownKeys.str() << ".";
28  }
29 
30  return o->second;
31 }
32 
33 //_____________________________________________________________________________
34 void AlignableMap::dump( void ) const
35 {
36  edm::LogInfo("AlignableMap") << "Printing out AlignSetup: ";
37  for ( typename Container::const_iterator it = theStore.begin();
38  it != theStore.end(); ++it ) {
39  edm::LogVerbatim("AlignableMap") << it->first << std::endl;
40  }
41 }
align::Alignables & get(const std::string &name="")
Definition: AlignableMap.cc:9
align::Alignables & find(const std::string &name="")
Definition: AlignableMap.cc:15
void dump(void) const
Print the name of all stored data.
Definition: AlignableMap.cc:34
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
Container theStore
Definition: AlignableMap.h:50