PAASS
Software suite to Acquire and Analyze Data from Pixie16
TreeCorrelator Class Reference

Singleton class holding map of all places. More...

#include <TreeCorrelator.hpp>

Collaboration diagram for TreeCorrelator:

Public Member Functions

Placeplace (std::string name)
 
void createPlace (std::map< std::string, std::string > &params, bool verbose)
 
void addChild (std::string parent, std::string child, bool coin, bool verbose)
 
void buildTree ()
 
 ~TreeCorrelator ()
 

Static Public Member Functions

static TreeCorrelatorget ()
 

Data Fields

std::map< std::string, Place * > places_
 

Private Member Functions

 TreeCorrelator ()
 
 TreeCorrelator (TreeCorrelator const &)
 Overload of the constructor. More...
 
void operator= (TreeCorrelator const &)
 the copy constructor More...
 
std::vector< std::string > split_names (std::string name)
 

Static Private Attributes

static TreeCorrelatorinstance = NULL
 A static instance of the tree correlator. More...
 
static PlaceBuilder builder = PlaceBuilder()
 Instance of the PlaceBuilder. More...
 

Detailed Description

Singleton class holding map of all places.

Definition at line 42 of file TreeCorrelator.hpp.

Constructor & Destructor Documentation

§ ~TreeCorrelator()

TreeCorrelator::~TreeCorrelator ( )

Default Destructor

Definition at line 196 of file TreeCorrelator.cpp.

§ TreeCorrelator() [1/2]

TreeCorrelator::TreeCorrelator ( )
inlineprivate

Make constructor, copy-constructor and operator = private to complete singleton implementation.

Definition at line 79 of file TreeCorrelator.hpp.

§ TreeCorrelator() [2/2]

TreeCorrelator::TreeCorrelator ( TreeCorrelator const &  )
private

Overload of the constructor.

Member Function Documentation

§ addChild()

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

Definition at line 61 of file TreeCorrelator.cpp.

Here is the call graph for this function:

§ buildTree()

void TreeCorrelator::buildTree ( )

This function initializes the correlator tree. Should be called after all basic places from map2.txt were initialized.

Definition at line 172 of file TreeCorrelator.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ createPlace()

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

Definition at line 119 of file TreeCorrelator.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ get()

TreeCorrelator * TreeCorrelator::get ( )
static
Returns
Instance of TreeCorrelator class.

Definition at line 43 of file TreeCorrelator.cpp.

Here is the caller graph for this function:

§ operator=()

void TreeCorrelator::operator= ( TreeCorrelator const &  )
private

the copy constructor

§ place()

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

Definition at line 50 of file TreeCorrelator.cpp.

Here is the caller graph for this function:

§ split_names()

vector< 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

Definition at line 80 of file TreeCorrelator.cpp.

Here is the call graph for this function:

Field Documentation

§ builder

PlaceBuilder TreeCorrelator::builder = PlaceBuilder()
staticprivate

Instance of the PlaceBuilder.

Definition at line 85 of file TreeCorrelator.hpp.

§ instance

TreeCorrelator * TreeCorrelator::instance = NULL
staticprivate

A static instance of the tree correlator.

Definition at line 83 of file TreeCorrelator.hpp.

§ places_

std::map<std::string, Place*> TreeCorrelator::places_

This map holds all Places.

Definition at line 75 of file TreeCorrelator.hpp.


The documentation for this class was generated from the following files: