7#include "MicrosliceDescriptor.hpp"
10#include <FairRunOnline.h>
13#include <RtypesCore.h>
17#include <THttpServer.h>
34 if (iter->first !=
nullptr) {
43 TString sHistName{
""};
49 fhDigisTimeInRun =
new TH1I(
"hRichDigisTimeInRun",
"Digis Nb vs Time in Run; Time in run [s]; Digis Nb []", 10, 0, 1);
53 fhDigisToT =
new TH1D(
"hDigisToT",
"fhDigisToT; ToT [ns]; Entries", 400, 0, 40.);
59 new TH2D(Form(
"fhDigisToT_0x%04x", DiRICH), Form(
"fhDigisToT_0x%04x; channel; ToT [ns]; Entries", DiRICH), 33, 0,
60 32, 450, 0x7900 < DiRICH ? 0 : 15., 0x7900 < DiRICH ? 45 : 30.);
65 fhVectorSize =
new TH1I(
"fhVectorSize",
"Size of the vector VS TS index; TS index; Size [bytes]", 10, 0, 10);
70 new TH1I(
"fhVectorCapacity",
"Size of the vector VS TS index; TS index; Size [bytes]", 10000, 0., 10000.);
103 Int_t Fpga = (Address >> 16) & 0xFFFF;
104 Int_t channel = Address & 0xFFFF;
111 const uint16_t ,
const uint32_t )
121 TFile* oldFile = gFile;
122 TDirectory* oldDir = gDirectory;
134 std::vector<std::pair<TNamed*, std::string>> vHistos =
GetHistoVector();
137 THttpServer* server = FairRunOnline::Instance()->GetHttpServer();
138 if (
nullptr != server) {
139 for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) {
140 server->Register(Form(
"/rich/%s", vHistos[uHisto].second.data()), vHistos[uHisto].first);
156 std::vector<std::pair<TNamed*, std::string>> vHistos =
GetHistoVector();
159 TFile* oldFile = gFile;
160 TDirectory* oldDir = gDirectory;
161 TFile* histoFile =
nullptr;
168 for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) {
170 TString sFolder = vHistos[uHisto].second.data();
171 if (
nullptr == gDirectory->Get(sFolder)) gDirectory->mkdir(sFolder);
172 gDirectory->cd(sFolder);
175 vHistos[uHisto].first->Write();
ClassImp(CbmConverterManager)
Monitoring historgrams class for Rich unpacker.
Int_t GetNaddresses(void) const
Int_t GetAddress(Int_t ind) const
Int_t GetAddressIdx(Int_t addr, bool bVerbose=true) const
void PrintDebugInfo(const uint64_t MsStartTime, const size_t NrProcessedTs, const uint16_t msDescriptorFlags, const uint32_t uSize)
double_t dFirstTsStartTime
Bool_t CreateDebugHistograms(CbmMcbm2018RichPar *pUnpackPar)
void FillDigisToTDiRICH(Int_t Address, Double_t ToT)
void Finish()
Write all histograms to file.
CbmMcbm2018RichPar * pUnpackParameters
std::vector< std::pair< TNamed *, std::string > > fvpAllHistoPointers
bool fDebugMode
Flag if debug mode is active or not.
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
std::vector< TH2 * > fhDigisToTDiRICH
Bool_t CreateHistograms(CbmMcbm2018RichPar *pUnpackPar)
Bool_t ResetDebugHistograms()
std::vector< std::pair< TNamed *, std::string > > GetHistoVector()
virtual ~CbmRichUnpackMonitor()
Bool_t Init(CbmMcbm2018RichPar *parset)
Init all required parameter informations and histograms.
void FillPerTimesliceCountersHistos(double_t dTsStartTime)
TH1 * fhDigisTimeInRun
General histograms.