CbmRoot
|
#include <CbmRichUnpackMonitor.h>
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 |
CbmMcbm2018RichPar * | pUnpackParameters = nullptr |
bool | fDebugMode = false |
Flag if debug mode is active or not. | |
std::vector< std::pair< TNamed *, std::string > > | fvpAllHistoPointers |
Definition at line 29 of file CbmRichUnpackMonitor.h.
CbmRichUnpackMonitor::CbmRichUnpackMonitor | ( | ) |
Definition at line 29 of file CbmRichUnpackMonitor.cxx.
|
virtual |
Definition at line 31 of file CbmRichUnpackMonitor.cxx.
References fvpAllHistoPointers.
|
private |
Vector of pointers to histograms + optional folder name.
|
inline |
Definition at line 59 of file CbmRichUnpackMonitor.h.
References fvpAllHistoPointers.
Referenced by CreateHistograms().
Bool_t CbmRichUnpackMonitor::CreateDebugHistograms | ( | CbmMcbm2018RichPar * | pUnpackPar | ) |
Definition at line 86 of file CbmRichUnpackMonitor.cxx.
Referenced by Init().
Bool_t CbmRichUnpackMonitor::CreateHistograms | ( | CbmMcbm2018RichPar * | pUnpackPar | ) |
Create general unpacking histograms
Definition at line 41 of file CbmRichUnpackMonitor.cxx.
References AddHistoToVector(), fhDigisTimeInRun, fhDigisToT, fhDigisToTDiRICH, fhVectorCapacity, fhVectorSize, CbmMcbm2018RichPar::GetAddress(), and CbmMcbm2018RichPar::GetNaddresses().
Referenced by Init().
|
inline |
Definition at line 70 of file CbmRichUnpackMonitor.h.
References fhDigisTimeInRun.
|
inline |
Definition at line 72 of file CbmRichUnpackMonitor.h.
References fhDigisToT.
void CbmRichUnpackMonitor::FillDigisToTDiRICH | ( | Int_t | Address, |
Double_t | ToT ) |
Definition at line 100 of file CbmRichUnpackMonitor.cxx.
References fhDigisToTDiRICH, CbmMcbm2018RichPar::GetAddressIdx(), and pUnpackParameters.
void CbmRichUnpackMonitor::FillPerTimesliceCountersHistos | ( | double_t | dTsStartTime | ) |
Definition at line 93 of file CbmRichUnpackMonitor.cxx.
References dFirstTsStartTime.
|
inline |
Definition at line 68 of file CbmRichUnpackMonitor.h.
References fhVectorCapacity.
|
inline |
Fill general histograms.
Definition at line 67 of file CbmRichUnpackMonitor.h.
References fhVectorSize.
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().
|
inline |
Activate the debug mode.
Definition at line 78 of file CbmRichUnpackMonitor.h.
References fDebugMode.
|
inline |
Definition at line 63 of file CbmRichUnpackMonitor.h.
References fvpAllHistoPointers.
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.
|
private |
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.
Bool_t CbmRichUnpackMonitor::ResetDebugHistograms | ( | ) |
Definition at line 88 of file CbmRichUnpackMonitor.cxx.
void CbmRichUnpackMonitor::ResetDebugInfo | ( | ) |
Bool_t CbmRichUnpackMonitor::ResetHistograms | ( | ) |
Definition at line 77 of file CbmRichUnpackMonitor.cxx.
References fhDigisTimeInRun, fhVectorCapacity, and fhVectorSize.
|
inline |
Activate the debug mode.
Definition at line 81 of file CbmRichUnpackMonitor.h.
References fDebugMode.
|
inline |
Definition at line 57 of file CbmRichUnpackMonitor.h.
References fHistoFileName.
bool CbmRichUnpackMonitor::bError = false |
Definition at line 38 of file CbmRichUnpackMonitor.h.
|
private |
Definition at line 87 of file CbmRichUnpackMonitor.h.
Referenced by FillPerTimesliceCountersHistos().
|
private |
Flag if debug mode is active or not.
Definition at line 100 of file CbmRichUnpackMonitor.h.
Referenced by GetDebugMode(), Init(), and SetDebugMode().
|
private |
General histograms.
Definition at line 90 of file CbmRichUnpackMonitor.h.
Referenced by CreateHistograms(), FillDigisTimeInRun(), and ResetHistograms().
|
private |
Definition at line 91 of file CbmRichUnpackMonitor.h.
Referenced by CreateHistograms(), and FillDigisToT().
|
private |
Definition at line 95 of file CbmRichUnpackMonitor.h.
Referenced by CreateHistograms(), and FillDigisToTDiRICH().
|
private |
Definition at line 84 of file CbmRichUnpackMonitor.h.
Referenced by Finish(), and SetHistoFileName().
|
private |
Definition at line 93 of file CbmRichUnpackMonitor.h.
Referenced by CreateHistograms(), FillVectorCapacity(), and ResetHistograms().
|
private |
Definition at line 92 of file CbmRichUnpackMonitor.h.
Referenced by CreateHistograms(), FillVectorSize(), and ResetHistograms().
|
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().
|
private |
Definition at line 97 of file CbmRichUnpackMonitor.h.
Referenced by FillDigisToTDiRICH(), and Init().
std::string CbmRichUnpackMonitor::sMessPatt = "" |
Definition at line 37 of file CbmRichUnpackMonitor.h.
std::vector<uint32_t> CbmRichUnpackMonitor::vNbMessType |
Definition at line 36 of file CbmRichUnpackMonitor.h.