CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Counters.cc
Go to the documentation of this file.
4 
5 using namespace align;
6 
7 //__________________________________________________________________________________________________
9 {
10  std::map<StructureType, Counter>::const_iterator n = theCounters.find(type);
11 
12  if (theCounters.end() == n)
13  {
14  throw cms::Exception("SetupError")
15  << "Cannot find counter corresponding to the structure "
16  << AlignableObjectId().typeToName(type);
17  }
18 
19  return n->second;
20 }
type
Definition: HCALResponse.h:22
virtual align::Counter get(align::StructureType) const
Get a counter based on its structure type.
Definition: Counters.cc:8
const std::string & typeToName(align::StructureType type) const
Convert type to name.
unsigned int(* Counter)(align::ID)
Definition: Counters.h:26
Allows conversion between type and name, and vice-versa.