CbmRoot
Loading...
Searching...
No Matches
CbmRichUnpackMonitor Class Reference

#include <CbmRichUnpackMonitor.h>

Collaboration diagram for CbmRichUnpackMonitor:
[legend]

Public Member Functions

 CbmRichUnpackMonitor ()
 
virtual ~CbmRichUnpackMonitor ()
 
void ResetDebugInfo ()
 
void PrintDebugInfo (const uint64_t MsStartTime, const size_t NrProcessedTs, const uint16_t msDescriptorFlags, const uint32_t uSize)
 
Bool_t Init (CbmMcbm2018RichPar *parset)
 Init all required parameter informations and histograms.
 
Bool_t CreateHistograms (CbmMcbm2018RichPar *pUnpackPar)
 
Bool_t ResetHistograms ()
 
Bool_t CreateDebugHistograms (CbmMcbm2018RichPar *pUnpackPar)
 
Bool_t ResetDebugHistograms ()
 
void Finish ()
 Write all histograms to file.
 
void SetHistoFileName (TString nameIn)
 
void AddHistoToVector (TNamed *pointer, std::string sFolder="")
 
std::vector< std::pair< TNamed *, std::string > > GetHistoVector ()
 
void FillVectorSize (ULong64_t TsIdx, UInt_t Size)
 Fill general histograms.
 
void FillVectorCapacity (ULong64_t TsIdx, UInt_t Capacity)
 
void FillDigisTimeInRun (Double_t Time)
 
void FillDigisToT (Double_t ToT)
 
void FillDigisToTDiRICH (Int_t Address, Double_t ToT)
 
void FillPerTimesliceCountersHistos (double_t dTsStartTime)
 
bool GetDebugMode ()
 Activate the debug mode.
 
void SetDebugMode (bool value)
 Activate the debug mode.
 

Public Attributes

std::vector< uint32_t > vNbMessType
 
std::string sMessPatt = ""
 
bool bError = false
 

Private Member Functions

 CbmRichUnpackMonitor (const CbmRichUnpackMonitor &)
 Vector of pointers to histograms + optional folder name.
 
CbmRichUnpackMonitor operator= (const CbmRichUnpackMonitor &)
 

Private Attributes

TString fHistoFileName = "HistosUnpackerRich.root"
 
double_t dFirstTsStartTime = 0
 
TH1 * fhDigisTimeInRun = nullptr
 General histograms.
 
TH1 * fhDigisToT = nullptr
 
TH1 * fhVectorSize = nullptr
 
TH1 * fhVectorCapacity = nullptr
 
std::vector< TH2 * > fhDigisToTDiRICH
 
CbmMcbm2018RichParpUnpackParameters = nullptr
 
bool fDebugMode = false
 Flag if debug mode is active or not.
 
std::vector< std::pair< TNamed *, std::string > > fvpAllHistoPointers
 

Detailed Description

Definition at line 29 of file CbmRichUnpackMonitor.h.

Constructor & Destructor Documentation

◆ CbmRichUnpackMonitor() [1/2]

CbmRichUnpackMonitor::CbmRichUnpackMonitor ( )

Definition at line 29 of file CbmRichUnpackMonitor.cxx.

◆ ~CbmRichUnpackMonitor()

CbmRichUnpackMonitor::~CbmRichUnpackMonitor ( )
virtual

Definition at line 31 of file CbmRichUnpackMonitor.cxx.

References fvpAllHistoPointers.

◆ CbmRichUnpackMonitor() [2/2]

CbmRichUnpackMonitor::CbmRichUnpackMonitor ( const CbmRichUnpackMonitor & )
private

Vector of pointers to histograms + optional folder name.

Member Function Documentation

◆ AddHistoToVector()

void CbmRichUnpackMonitor::AddHistoToVector ( TNamed * pointer,
std::string sFolder = "" )
inline

Definition at line 59 of file CbmRichUnpackMonitor.h.

References fvpAllHistoPointers.

Referenced by CreateHistograms().

◆ CreateDebugHistograms()

Bool_t CbmRichUnpackMonitor::CreateDebugHistograms ( CbmMcbm2018RichPar * pUnpackPar)

Definition at line 86 of file CbmRichUnpackMonitor.cxx.

Referenced by Init().

◆ CreateHistograms()

Bool_t CbmRichUnpackMonitor::CreateHistograms ( CbmMcbm2018RichPar * pUnpackPar)

◆ FillDigisTimeInRun()

void CbmRichUnpackMonitor::FillDigisTimeInRun ( Double_t Time)
inline

Definition at line 70 of file CbmRichUnpackMonitor.h.

References fhDigisTimeInRun.

◆ FillDigisToT()

void CbmRichUnpackMonitor::FillDigisToT ( Double_t ToT)
inline

Definition at line 72 of file CbmRichUnpackMonitor.h.

References fhDigisToT.

◆ FillDigisToTDiRICH()

void CbmRichUnpackMonitor::FillDigisToTDiRICH ( Int_t Address,
Double_t ToT )

◆ FillPerTimesliceCountersHistos()

void CbmRichUnpackMonitor::FillPerTimesliceCountersHistos ( double_t dTsStartTime)

Definition at line 93 of file CbmRichUnpackMonitor.cxx.

References dFirstTsStartTime.

◆ FillVectorCapacity()

void CbmRichUnpackMonitor::FillVectorCapacity ( ULong64_t TsIdx,
UInt_t Capacity )
inline

Definition at line 68 of file CbmRichUnpackMonitor.h.

References fhVectorCapacity.

◆ FillVectorSize()

void CbmRichUnpackMonitor::FillVectorSize ( ULong64_t TsIdx,
UInt_t Size )
inline

Fill general histograms.

Definition at line 67 of file CbmRichUnpackMonitor.h.

References fhVectorSize.

◆ Finish()

void CbmRichUnpackMonitor::Finish ( )

Write all histograms to file.

Obtain vector of pointers on each histo (+ optionally desired folder)

Save old global file and folder pointer to avoid messing with FairRoot

Write histos to output file

Make sure we end up in chosen folder

Write plot

Restore old global file and folder pointer to avoid messing with FairRoot

Definition at line 152 of file CbmRichUnpackMonitor.cxx.

References fHistoFileName, and GetHistoVector().

◆ GetDebugMode()

bool CbmRichUnpackMonitor::GetDebugMode ( )
inline

Activate the debug mode.

Definition at line 78 of file CbmRichUnpackMonitor.h.

References fDebugMode.

◆ GetHistoVector()

std::vector< std::pair< TNamed *, std::string > > CbmRichUnpackMonitor::GetHistoVector ( )
inline

Definition at line 63 of file CbmRichUnpackMonitor.h.

References fvpAllHistoPointers.

Referenced by Finish(), and Init().

◆ Init()

Bool_t CbmRichUnpackMonitor::Init ( CbmMcbm2018RichPar * parset)

Init all required parameter informations and histograms.

Save old global file and folder pointer to avoid messing with FairRoot

Trigger histo creation on all associated monitors

Restore old global file and folder pointer to avoid messing with FairRoot

Obtain vector of pointers on each histo from the algo (+ optionally desired folder)

Register the histos in the HTTP server

Definition at line 116 of file CbmRichUnpackMonitor.cxx.

References CreateDebugHistograms(), CreateHistograms(), fDebugMode, GetHistoVector(), and pUnpackParameters.

◆ operator=()

CbmRichUnpackMonitor CbmRichUnpackMonitor::operator= ( const CbmRichUnpackMonitor & )
private

◆ PrintDebugInfo()

void CbmRichUnpackMonitor::PrintDebugInfo ( const uint64_t MsStartTime,
const size_t NrProcessedTs,
const uint16_t msDescriptorFlags,
const uint32_t uSize )

Definition at line 110 of file CbmRichUnpackMonitor.cxx.

◆ ResetDebugHistograms()

Bool_t CbmRichUnpackMonitor::ResetDebugHistograms ( )

Definition at line 88 of file CbmRichUnpackMonitor.cxx.

◆ ResetDebugInfo()

void CbmRichUnpackMonitor::ResetDebugInfo ( )

◆ ResetHistograms()

Bool_t CbmRichUnpackMonitor::ResetHistograms ( )

Definition at line 77 of file CbmRichUnpackMonitor.cxx.

References fhDigisTimeInRun, fhVectorCapacity, and fhVectorSize.

◆ SetDebugMode()

void CbmRichUnpackMonitor::SetDebugMode ( bool value)
inline

Activate the debug mode.

Definition at line 81 of file CbmRichUnpackMonitor.h.

References fDebugMode.

◆ SetHistoFileName()

void CbmRichUnpackMonitor::SetHistoFileName ( TString nameIn)
inline

Definition at line 57 of file CbmRichUnpackMonitor.h.

References fHistoFileName.

Member Data Documentation

◆ bError

bool CbmRichUnpackMonitor::bError = false

Definition at line 38 of file CbmRichUnpackMonitor.h.

◆ dFirstTsStartTime

double_t CbmRichUnpackMonitor::dFirstTsStartTime = 0
private

Definition at line 87 of file CbmRichUnpackMonitor.h.

Referenced by FillPerTimesliceCountersHistos().

◆ fDebugMode

bool CbmRichUnpackMonitor::fDebugMode = false
private

Flag if debug mode is active or not.

Definition at line 100 of file CbmRichUnpackMonitor.h.

Referenced by GetDebugMode(), Init(), and SetDebugMode().

◆ fhDigisTimeInRun

TH1* CbmRichUnpackMonitor::fhDigisTimeInRun = nullptr
private

General histograms.

Definition at line 90 of file CbmRichUnpackMonitor.h.

Referenced by CreateHistograms(), FillDigisTimeInRun(), and ResetHistograms().

◆ fhDigisToT

TH1* CbmRichUnpackMonitor::fhDigisToT = nullptr
private

Definition at line 91 of file CbmRichUnpackMonitor.h.

Referenced by CreateHistograms(), and FillDigisToT().

◆ fhDigisToTDiRICH

std::vector<TH2*> CbmRichUnpackMonitor::fhDigisToTDiRICH
private

Definition at line 95 of file CbmRichUnpackMonitor.h.

Referenced by CreateHistograms(), and FillDigisToTDiRICH().

◆ fHistoFileName

TString CbmRichUnpackMonitor::fHistoFileName = "HistosUnpackerRich.root"
private

Definition at line 84 of file CbmRichUnpackMonitor.h.

Referenced by Finish(), and SetHistoFileName().

◆ fhVectorCapacity

TH1* CbmRichUnpackMonitor::fhVectorCapacity = nullptr
private

Definition at line 93 of file CbmRichUnpackMonitor.h.

Referenced by CreateHistograms(), FillVectorCapacity(), and ResetHistograms().

◆ fhVectorSize

TH1* CbmRichUnpackMonitor::fhVectorSize = nullptr
private

Definition at line 92 of file CbmRichUnpackMonitor.h.

Referenced by CreateHistograms(), FillVectorSize(), and ResetHistograms().

◆ fvpAllHistoPointers

std::vector<std::pair<TNamed*, std::string> > CbmRichUnpackMonitor::fvpAllHistoPointers
private

For monitoring of internal processes. => Pointers should be filled with TH1*, TH2*, TProfile*, ... ==> To check if object N is of type T, use "T ObjectPointer = dynamic_cast<T>( fvpAllHistoPointers[N].first );" and check for nullptr ==> To get back the original class name use "fvpAllHistoPointers[N].first->ClassName()" which returns a const char * (e.g. "TH1I") ===> Usage example with feeding a THttpServer: ===> #include "TH2.h" ===> std::string sClassName = vHistos[ uHisto ].first.ClassName(); ===> if( !strncmp( sClassName, "TH1", 3 ) ) ===> server->Register( vHistos[ uHisto ].second.data(), dynamic_cast< TH1 * >(vHistos[ uHisto ].first) ); ===> else if( !strncmp( sClassName, "TH2", 3 ) ) ===> server->Register( vHistos[ uHisto ].second.data(), dynamic_cast< TH2 * >(vHistos[ uHisto ].first) );

Definition at line 115 of file CbmRichUnpackMonitor.h.

Referenced by AddHistoToVector(), GetHistoVector(), and ~CbmRichUnpackMonitor().

◆ pUnpackParameters

CbmMcbm2018RichPar* CbmRichUnpackMonitor::pUnpackParameters = nullptr
private

Definition at line 97 of file CbmRichUnpackMonitor.h.

Referenced by FillDigisToTDiRICH(), and Init().

◆ sMessPatt

std::string CbmRichUnpackMonitor::sMessPatt = ""

Definition at line 37 of file CbmRichUnpackMonitor.h.

◆ vNbMessType

std::vector<uint32_t> CbmRichUnpackMonitor::vNbMessType

Definition at line 36 of file CbmRichUnpackMonitor.h.


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