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 34 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 dqmiodumpmetadata::n.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), AlignableCompositeBuilder::getIndexOfStructure(), betterConfigParser.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), util.rrapi.RRApi::report(), 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().

7  {
8  auto n = theCounters.find(type);
9 
10  if (theCounters.end() == n) {
11  throw cms::Exception("AlignableBuildProcess")
12  << "Cannot find counter corresponding to the structure " << alignableObjectId.idToString(type);
13  }
14 
15  return n->second;
16 }
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 48 of file AlignableIndexer.h.

Referenced by TrackerAlignableIndexer::TrackerAlignableIndexer().