Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
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.
 
void operator= (TreeCorrelator const &)
 the copy constructor
 
std::vector< std::string > split_names (std::string name)
 

Static Private Attributes

static TreeCorrelatorinstance
 A static instance of the tree correlator.
 
static PlaceBuilder builder
 Instance of the PlaceBuilder.
 

Detailed Description

Singleton class holding map of all places.

Constructor & Destructor Documentation

TreeCorrelator::~TreeCorrelator ( )

Default Destructor

TreeCorrelator::TreeCorrelator ( )
inlineprivate

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

Member Function Documentation

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
static TreeCorrelator* TreeCorrelator::get ( )
static
Returns
Instance of TreeCorrelator class.
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

Field Documentation

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

This map holds all Places.


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