CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
AlignableIndexer Class Reference

#include <AlignableIndexer.h>

Inheritance diagram for AlignableIndexer:
TrackerAlignableIndexer

Public Member Functions

 AlignableIndexer ()=default
 Build the counters map. More...
 
 AlignableIndexer (const AlignableIndexer &)=default
 
 AlignableIndexer (AlignableIndexer &&)=default
 
virtual align::Counter get (align::StructureType, const AlignableObjectId &) const
 Get a counter based on its structure type. More...
 
AlignableIndexeroperator= (const AlignableIndexer &)=default
 
AlignableIndexeroperator= (AlignableIndexer &&)=default
 
virtual ~AlignableIndexer ()=default
 

Protected Attributes

std::map< align::StructureType, align::CountertheCounters
 

Detailed Description

Class to store a list of index functions.

A counter is a pointer to a function that returns the number of an alignable based on its id. The number of an alignable is given by its position within its parent. User gets a counter using its structure type via AlignableIndexer::get(type). Each sub-system has its own concrete counter class implementation.

Date
2007/10/18 09:41:07
Revision
1.2
Author
Chung Khim Lae

Last Update: Max Stark Date: Wed, 17 Feb 2016 15:39:06 CET

Definition at line 35 of file AlignableIndexer.h.

Constructor & Destructor Documentation

AlignableIndexer::AlignableIndexer ( )
default

Build the counters map.

AlignableIndexer::AlignableIndexer ( const AlignableIndexer )
default
AlignableIndexer::AlignableIndexer ( AlignableIndexer &&  )
default
virtual AlignableIndexer::~AlignableIndexer ( )
virtualdefault

Member Function Documentation

Counter AlignableIndexer::get ( align::StructureType  type,
const AlignableObjectId alignableObjectId 
) const
virtual

Get a counter based on its structure type.

Definition at line 7 of file AlignableIndexer.cc.

References Exception, AlignableObjectId::idToString(), and gen::n.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), util.rrapi.RRApi::reports(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

9 {
10  auto n = theCounters.find(type);
11 
12  if (theCounters.end() == n)
13  {
14  throw cms::Exception("AlignableBuildProcess")
15  << "Cannot find counter corresponding to the structure "
16  << alignableObjectId.idToString(type);
17  }
18 
19  return n->second;
20 }
type
Definition: HCALResponse.h:21
std::map< align::StructureType, align::Counter > theCounters
const char * idToString(align::StructureType type) const
AlignableIndexer& AlignableIndexer::operator= ( const AlignableIndexer )
default
AlignableIndexer& AlignableIndexer::operator= ( AlignableIndexer &&  )
default

Member Data Documentation

std::map<align::StructureType, align::Counter> AlignableIndexer::theCounters
protected

Definition at line 51 of file AlignableIndexer.h.