CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 }
std::vector< Alignable * > Alignables
Definition: Alignable.h:251
Alignables & get(const std::string &name="")
Definition: AlignableMap.cc:9
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
Container theStore
Definition: AlignableMap.h:50