Singleton class holding map of all places.
More...
#include <TreeCorrelator.hpp>
Singleton class holding map of all places.
TreeCorrelator::~TreeCorrelator |
( |
| ) |
|
TreeCorrelator::TreeCorrelator |
( |
| ) |
|
|
inlineprivate |
Make constructor, copy-constructor and operator = private to complete singleton implementation.
void TreeCorrelator::addChild |
( |
std::string |
parent, |
|
|
std::string |
child, |
|
|
bool |
coin, |
|
|
bool |
verbose |
|
) |
| |
Add child to place parent with coincidence coin.
- Parameters
-
[in] | parent | : the name of the parent node |
[in] | child | : the name of the child node |
[in] | coin | : coincidence |
[in] | verbose | : verbosity |
void TreeCorrelator::buildTree |
( |
| ) |
|
This function initializes the correlator tree. Should be called after all basic places from map2.txt were initialized.
void TreeCorrelator::createPlace |
( |
std::map< std::string, std::string > & |
params, |
|
|
bool |
verbose |
|
) |
| |
Create place, alter or add existing place to the tree.
- Parameters
-
[in] | params | : the map of the parameters |
[in] | verbose | : verbosity |
Place* TreeCorrelator::place |
( |
std::string |
name | ) |
|
- Returns
- pointer to place or throw exception if it doesn't exist.
- Parameters
-
[in] | name | : the name of the place |
std::vector<std::string> TreeCorrelator::split_names |
( |
std::string |
name | ) |
|
|
private |
Splits name string into the vector of string. Assumes that if the last token (delimiter being "_") is in format "X-Y,Z" where X, Y are integers, the X and Y are range of base names to be retured E.g. abc_1-2,4,5-6 will return ["abc_1", "abc_2", "abc_4", "abc_5,
"abc_6"]. If no range token or comma is found, the name itself is returned as a only element of the vector
- Parameters
-
[in] | name | : the name string to split |
- Returns
- a vector of the split names
std::map<std::string, Place*> TreeCorrelator::places_ |
This map holds all Places.
The documentation for this class was generated from the following file: