CbmRoot
Loading...
Searching...
No Matches
cbm::algo::qa::Data Class Reference

Class to handle QA-objects in the online reconstruction. More...

#include <QaData.h>

Collaboration diagram for cbm::algo::qa::Data:
[legend]

Public Member Functions

 Data ()=default
 Default constructor.
 
 Data (std::string_view name)
 Constructor.
 
 Data (const Data &)=default
 Copy constructor.
 
 Data (Data &&)=default
 Move constructor.
 
Dataoperator= (const Data &)=default
 Copy assignment operator.
 
Dataoperator= (Data &&)=default
 Move assignment operator.
 
 ~Data ()=default
 Destructor.
 
void AddCanvasConfig (const CanvasConfig &canvas)
 Adds a canvas to the canvas config list.
 
void Init (std::shared_ptr< HistogramSender > histoSender)
 Sends QA initialization information to the HistogramSender.
 
template<class Obj , typename... Args>
Obj * MakeObj (Args... args)
 Creates a QA-object and returns the pointer to it.
 
void Reset ()
 Resets the histograms.
 
void Send (std::shared_ptr< HistogramSender > histoSender)
 Sends QA data to the HistogramSender.
 
void SetTimesliceId (uint64_t timesliceId)
 Updates the timeslice index.
 
void RegisterNewTask (std::string_view name)
 Registers a new QA task.
 

Private Attributes

qa::HistogramContainer fHistograms
 A container of histograms, which forms a zmq message.
 
std::string fsTaskNames
 A string containing names of tasks.
 
std::vector< qa::TaskPropertiesfvTaskProperties
 A vector to store properties for multiple QA-tasks.
 
std::vector< std::string > fvsCanvCfgs = {}
 Vector of canvas configs.
 
uint32_t fNofH1 {0}
 Number of 1D-histograms.
 
uint32_t fNofH2 {0}
 Number of 2D-histograms.
 
uint32_t fNofP1 {0}
 Number of 1D-profiles.
 
uint32_t fNofP2 {0}
 Number of 2D-profiles.
 
bool fbNotEmpty {true}
 false: if no histograms were provided, do not perform initialization and sending
 

Detailed Description

Class to handle QA-objects in the online reconstruction.

Definition at line 29 of file QaData.h.

Constructor & Destructor Documentation

◆ Data() [1/4]

cbm::algo::qa::Data::Data ( )
default

Default constructor.

◆ Data() [2/4]

cbm::algo::qa::Data::Data ( std::string_view name)
inline

Constructor.

Parameters
nameName of the QA module (appears as the directory name in the output)

Definition at line 36 of file QaData.h.

References RegisterNewTask().

◆ Data() [3/4]

cbm::algo::qa::Data::Data ( const Data & )
default

Copy constructor.

◆ Data() [4/4]

cbm::algo::qa::Data::Data ( Data && )
default

Move constructor.

◆ ~Data()

cbm::algo::qa::Data::~Data ( )
default

Destructor.

Member Function Documentation

◆ AddCanvasConfig()

void cbm::algo::qa::Data::AddCanvasConfig ( const CanvasConfig & canvas)
inline

Adds a canvas to the canvas config list.

Parameters
canvasA CanvasConfig object

Definition at line 55 of file QaData.h.

References fvsCanvCfgs, and cbm::algo::qa::CanvasConfig::ToString().

Referenced by cbm::algo::sts::DigiQa::Init(), and cbm::algo::qa::RecoGeneralQa::operator()().

◆ Init()

void Data::Init ( std::shared_ptr< HistogramSender > histoSender)

◆ MakeObj()

template<class Obj , typename... Args>
Obj * cbm::algo::qa::Data::MakeObj ( Args... args)

Creates a QA-object and returns the pointer to it.

Template Parameters
ObjA type of the histogram (H1D, H2D, Prof1D, Prof2D)
Args...A signature of the histogram constructor
Parameters
argsParameters, passed to a histogram constructor

Definition at line 100 of file QaData.h.

References fHistograms, fNofH1, fNofH2, fNofP1, fNofP2, cbm::algo::qa::HistogramContainer::fvH1, cbm::algo::qa::HistogramContainer::fvH2, cbm::algo::qa::HistogramContainer::fvP1, cbm::algo::qa::HistogramContainer::fvP2, and fvTaskProperties.

Referenced by cbm::algo::sts::DigiQa::Init(), and cbm::algo::qa::RecoGeneralQa::operator()().

◆ operator=() [1/2]

Data & cbm::algo::qa::Data::operator= ( const Data & )
default

Copy assignment operator.

◆ operator=() [2/2]

Data & cbm::algo::qa::Data::operator= ( Data && )
default

Move assignment operator.

◆ RegisterNewTask()

void Data::RegisterNewTask ( std::string_view name)

◆ Reset()

void cbm::algo::qa::Data::Reset ( )
inline

Resets the histograms.

Definition at line 69 of file QaData.h.

References fHistograms, and cbm::algo::qa::HistogramContainer::Reset().

Referenced by Send().

◆ Send()

void Data::Send ( std::shared_ptr< HistogramSender > histoSender)

Sends QA data to the HistogramSender.

Parameters
histoSenderA pointer to the histogram sender
Note
Calls this->Reset() after sending the message to the histogram server

Definition at line 111 of file QaData.cxx.

References fbNotEmpty, fHistograms, fNofH1, fNofH2, fNofP1, fNofP2, fsTaskNames, L_, and Reset().

Referenced by cbm::algo::sts::DigiQa::Exec(), and cbm::algo::qa::RecoGeneralQa::operator()().

◆ SetTimesliceId()

void cbm::algo::qa::Data::SetTimesliceId ( uint64_t timesliceId)
inline

Updates the timeslice index.

Parameters
timesliceIdTimeslice index

Definition at line 78 of file QaData.h.

References fHistograms, and cbm::algo::qa::HistogramContainer::fTimesliceId.

Referenced by cbm::algo::sts::QaBase< Digi, AuxData, ReadoutSetup >::SetTimesliceIndex().

Member Data Documentation

◆ fbNotEmpty

bool cbm::algo::qa::Data::fbNotEmpty {true}
private

false: if no histograms were provided, do not perform initialization and sending

Definition at line 94 of file QaData.h.

Referenced by Init(), and Send().

◆ fHistograms

qa::HistogramContainer cbm::algo::qa::Data::fHistograms
private

A container of histograms, which forms a zmq message.

Definition at line 85 of file QaData.h.

Referenced by Init(), MakeObj(), RegisterNewTask(), Reset(), Send(), and SetTimesliceId().

◆ fNofH1

uint32_t cbm::algo::qa::Data::fNofH1 {0}
private

Number of 1D-histograms.

Definition at line 90 of file QaData.h.

Referenced by Init(), MakeObj(), and Send().

◆ fNofH2

uint32_t cbm::algo::qa::Data::fNofH2 {0}
private

Number of 2D-histograms.

Definition at line 91 of file QaData.h.

Referenced by Init(), MakeObj(), and Send().

◆ fNofP1

uint32_t cbm::algo::qa::Data::fNofP1 {0}
private

Number of 1D-profiles.

Definition at line 92 of file QaData.h.

Referenced by Init(), MakeObj(), and Send().

◆ fNofP2

uint32_t cbm::algo::qa::Data::fNofP2 {0}
private

Number of 2D-profiles.

Definition at line 93 of file QaData.h.

Referenced by Init(), MakeObj(), and Send().

◆ fsTaskNames

std::string cbm::algo::qa::Data::fsTaskNames
private

A string containing names of tasks.

Definition at line 86 of file QaData.h.

Referenced by Init(), and Send().

◆ fvsCanvCfgs

std::vector<std::string> cbm::algo::qa::Data::fvsCanvCfgs = {}
private

Vector of canvas configs.

Definition at line 88 of file QaData.h.

Referenced by AddCanvasConfig(), and Init().

◆ fvTaskProperties

std::vector<qa::TaskProperties> cbm::algo::qa::Data::fvTaskProperties
private

A vector to store properties for multiple QA-tasks.

Definition at line 87 of file QaData.h.

Referenced by Init(), MakeObj(), and RegisterNewTask().


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