CbmRoot
Loading...
Searching...
No Matches
cbm::ca::tools::Debugger Class Reference

#include <CaToolsDebugger.h>

Collaboration diagram for cbm::ca::tools::Debugger:
[legend]

Public Member Functions

 Debugger (const char *fileName="CAdebug.root")
 Default constructor.
 
 ~Debugger ()
 Destructor.
 
 Debugger (const Debugger &other)=delete
 Copy constructor.
 
 Debugger (Debugger &&other)=delete
 Move constructor.
 
Debuggeroperator= (const Debugger &other)=delete
 Copy assignment operator.
 
Debuggeroperator= (Debugger &&other)=delete
 Move assignment operator.
 
void Write ()
 Write ntuples to the file.
 
void AddNtuple (const char *name, const char *varlist)
 Set new ntuple.
 
void FillNtuple (const char *name, float v[])
 Add an entry to ntuple.
 
template<typename... Targs>
void FillNtuple (const char *name, Targs... args)
 Add an entry to ntuple.
 
int GetNtupleIndex (const char *name)
 Get ntuple index.
 

Static Public Member Functions

static DebuggerInstance ()
 Instance.
 

Private Member Functions

template<typename T , typename... Targs>
void FillFloatArray (float *v, T val, Targs... args)
 
template<typename T >
void FillFloatArray (float *v, T last)
 

Private Attributes

std::string fFileName {"CAdebug.root"}
 
bool fIsWritten {0}
 
TFile * fFile {nullptr}
 
std::vector< TNtuple * > fNtuples
 

Detailed Description

Class ca::tools::Debugger helps to debug CA tracking

Definition at line 23 of file CaToolsDebugger.h.

Constructor & Destructor Documentation

◆ Debugger() [1/3]

Debugger::Debugger ( const char * fileName = "CAdebug.root")

Default constructor.

Default constructor

Definition at line 39 of file CaToolsDebugger.cxx.

References fFileName.

◆ ~Debugger()

Debugger::~Debugger ( )

Destructor.

Destructor

Definition at line 59 of file CaToolsDebugger.cxx.

References fFile, and fIsWritten.

◆ Debugger() [2/3]

cbm::ca::tools::Debugger::Debugger ( const Debugger & other)
delete

Copy constructor.

◆ Debugger() [3/3]

cbm::ca::tools::Debugger::Debugger ( Debugger && other)
delete

Move constructor.

Member Function Documentation

◆ AddNtuple()

void Debugger::AddNtuple ( const char * name,
const char * varlist )

Set new ntuple.

add ntuple

Definition at line 67 of file CaToolsDebugger.cxx.

References fFile, fFileName, fNtuples, and GetNtupleIndex().

Referenced by CbmL1::EfficienciesPerformance().

◆ FillFloatArray() [1/2]

template<typename T >
void cbm::ca::tools::Debugger::FillFloatArray ( float * v,
T last )
inlineprivate

Definition at line 85 of file CaToolsDebugger.h.

References v.

◆ FillFloatArray() [2/2]

template<typename T , typename... Targs>
void cbm::ca::tools::Debugger::FillFloatArray ( float * v,
T val,
Targs... args )
inlineprivate

Definition at line 76 of file CaToolsDebugger.h.

References FillFloatArray(), and v.

Referenced by FillFloatArray(), and FillNtuple().

◆ FillNtuple() [1/2]

void Debugger::FillNtuple ( const char * name,
float v[] )

Add an entry to ntuple.

Definition at line 94 of file CaToolsDebugger.cxx.

References fNtuples, GetNtupleIndex(), and v.

Referenced by CbmL1::EfficienciesPerformance(), and FillNtuple().

◆ FillNtuple() [2/2]

template<typename... Targs>
void cbm::ca::tools::Debugger::FillNtuple ( const char * name,
Targs... args )
inline

Add an entry to ntuple.

Definition at line 62 of file CaToolsDebugger.h.

References FillFloatArray(), FillNtuple(), and v.

◆ GetNtupleIndex()

int Debugger::GetNtupleIndex ( const char * name)

Get ntuple index.

Definition at line 82 of file CaToolsDebugger.cxx.

References fNtuples.

Referenced by AddNtuple(), and FillNtuple().

◆ Instance()

Debugger & Debugger::Instance ( )
static

Instance.

Definition at line 29 of file CaToolsDebugger.cxx.

Referenced by CbmL1::EfficienciesPerformance(), and CbmL1::Finish().

◆ operator=() [1/2]

Debugger & cbm::ca::tools::Debugger::operator= ( const Debugger & other)
delete

Copy assignment operator.

◆ operator=() [2/2]

Debugger & cbm::ca::tools::Debugger::operator= ( Debugger && other)
delete

Move assignment operator.

◆ Write()

void Debugger::Write ( )

Write ntuples to the file.

Write data to file

Definition at line 45 of file CaToolsDebugger.cxx.

References fFile, fIsWritten, and fNtuples.

Referenced by CbmL1::Finish().

Member Data Documentation

◆ fFile

TFile* cbm::ca::tools::Debugger::fFile {nullptr}
private

Definition at line 93 of file CaToolsDebugger.h.

Referenced by AddNtuple(), Write(), and ~Debugger().

◆ fFileName

std::string cbm::ca::tools::Debugger::fFileName {"CAdebug.root"}
private

Definition at line 91 of file CaToolsDebugger.h.

Referenced by AddNtuple(), and Debugger().

◆ fIsWritten

bool cbm::ca::tools::Debugger::fIsWritten {0}
private

Definition at line 92 of file CaToolsDebugger.h.

Referenced by Write(), and ~Debugger().

◆ fNtuples

std::vector<TNtuple*> cbm::ca::tools::Debugger::fNtuples
private

Definition at line 94 of file CaToolsDebugger.h.

Referenced by AddNtuple(), FillNtuple(), GetNtupleIndex(), and Write().


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