#include <AlignSetup.h>
Public Member Functions | |
AlignSetup () | |
Constructor. More... | |
void | dump (void) const |
Print the name of all stored data. More... | |
Type & | find (const std::string &name="") |
Type & | get (const std::string &name="") |
Private Types | |
typedef std::map< std::string, Type > | Container |
Private Attributes | |
Container | theStore |
A helper class to hold objects used by modules in alignment.
AlignSetup has a template parameter to specify the type of objects it holds. Objects are stored in a map<string, Type>. Users put/get an object by passing its name through the static methods put()/get(). It returns 0 if the name is not found on get(). It throws an exception if an object of the same name exists on put().
Definition at line 26 of file AlignSetup.h.
|
private |
Definition at line 28 of file AlignSetup.h.
|
inline |
void AlignSetup< Type >::dump | ( | void | ) | const |
Print the name of all stored data.
Definition at line 76 of file AlignSetup.h.
Type & AlignSetup< Type >::find | ( | const std::string & | name = "" | ) |
Find and return an object from map using its name. Throw an exception if the name does not exist.
Definition at line 58 of file AlignSetup.h.
References Exception, and connectstrParser::o.
Referenced by BeautifulSoup.Tag::__getattr__(), AlignableBuilder::build(), AlignableTracker::buildBarrel(), AlignableTracker::buildTRK(), BeautifulSoup.Tag::firstText(), AlignableTracker::subStructures(), and AlignableExtras::subStructures().
Type & AlignSetup< Type >::get | ( | const std::string & | name = "" | ) |
Get an object from map using its name. A new object is default-constructed if the name does not exist.
Definition at line 52 of file AlignSetup.h.
References mergeVDriftHistosByStation::name.
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), AlignableExtras::AlignableExtras(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), AlignableBuilder::build(), AlignableTracker::buildBarrel(), AlignableTracker::buildTRK(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), AlignableTracker::detsToAlignables(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().
|
private |
Definition at line 47 of file AlignSetup.h.