diff --git a/core/detectors/tof/CbmMcbm2018TofPar.cxx b/core/detectors/tof/CbmMcbm2018TofPar.cxx index 9212ad578a20357149b2e268cc88729672bf6b29..82c681410ec1a974ceb63abd60f4f79735378d4f 100644 --- a/core/detectors/tof/CbmMcbm2018TofPar.cxx +++ b/core/detectors/tof/CbmMcbm2018TofPar.cxx @@ -381,8 +381,8 @@ void CbmMcbm2018TofPar::BuildChannelsUidMapT0_2022(UInt_t& uCh, UInt_t uGbtx) /// Mapping for the 2022 beamtime if (-1 < fiModuleId[uGbtx] && uGet4 < 32 && 0 == uGet4 % 4 && 0 == uGet4Ch) { /// 1 channel per physical GET4, 2 links per physical GET4, 4 physical GET4s per GBTx, 1 GBTx per comp. - /// 8 channels for one side, 8 for the other - UInt_t uChannelT0 = (uGet4 / 8 + 4 * (uGbtx / 2)) % 8; + /// 16 channels for one side, 16 for the other + UInt_t uChannelT0 = (uGet4 / 8 + 4 * (uGbtx / 2)) % 16; /// Type hard-coded to allow different parameter values to separate 2022 T0 and pre-2022 T0 fviRpcChUId[uCh] = CbmTofAddress::GetUniqueAddress(fiModuleId[uGbtx], 0, uChannelT0, fiRpcSide[uGbtx], 5); LOG(info) << Form(" Bmon channel: %u side %u from GBTx %2u, " diff --git a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx index 1b95f9c895fcfa6e623f065ad8fdc3237e2e6830..74aa75f76719c61bc36e870a0390cdebf25b7e09 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx +++ b/reco/detectors/tof/unpack/CbmTofUnpackAlgo.cxx @@ -296,11 +296,11 @@ bool CbmTofUnpackAlgo::unpack(const fles::Timeslice* ts, std::uint16_t icomp, UI fMonitor->FillErrMonitoringHistos(fuCurrDpbIdx, fuGet4Id, pMess[uIdx].getGdpbSysErrChanId(), pMess[uIdx].getGdpbSysErrData()); - if (90 == fuCurrentMsSysId) { + if (0x90 == fuCurrentMsSysId) { fMonitor->FillErrBmonMonitoringHistos(fdCurrentMsTime, fuCurrDpbIdx, fuGet4Id, critof001::GET4_V2X_ERR_LOST_EVT == pMess[uIdx].getGdpbSysErrData()); - } // if (90 == fuCurrentMsSysId) + } // if (0x90 == fuCurrentMsSysId) } // if (critof001::SYS_GET4_ERROR == pMess[uIdx].getGdpbSysSubType()) } // if (fMonitor ) break; diff --git a/reco/detectors/tof/unpack/CbmTofUnpackConfig.h b/reco/detectors/tof/unpack/CbmTofUnpackConfig.h index f743abab93c968b2f56bb18dd2ea8c8a7dd9ed9c..0d5aecbaa25c779ae8bc005bdffc064d0f94062e 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackConfig.h +++ b/reco/detectors/tof/unpack/CbmTofUnpackConfig.h @@ -94,6 +94,9 @@ public: /** @brief Add a monitor to the unpacker. @param value CbmStsUnpackMonitor */ void SetMonitor(std::shared_ptr<CbmTofUnpackMonitor> value) { fMonitor = value; } + /** @brief Returns the monitor of the unpacker if any. @return value CbmTofUnpackMonitor */ + std::shared_ptr<CbmTofUnpackMonitor> GetMonitor() { return fMonitor; } + protected: /** * @brief Choose the derived unpacker algorithm to be used for the DAQ output to Digi translation. If algo was already set manually by the user this algorithm is used. diff --git a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx index 3e8d15ab090542e3a4d4956826506183486afb55..9576dbeebb2f3a277a128c769da33461befa7d4e 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx +++ b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx @@ -1320,18 +1320,21 @@ Bool_t CbmTofUnpackMonitor::Init(CbmMcbm2018TofPar* parset) // sSystem = "bmon"; } - THttpServer* server = FairRunOnline::Instance()->GetHttpServer(); - if (nullptr != server) { - for (UInt_t uCanvas = 0; uCanvas < vCanvases.size(); ++uCanvas) { - server->Register(Form("/%s/%s", sSystem.data(), vCanvases[uCanvas].second.data()), vCanvases[uCanvas].first); - } - for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) { - server->Register(Form("/%s/%s", sSystem.data(), vHistos[uHisto].second.data()), vHistos[uHisto].first); + + if (fbInternalHttp) { + THttpServer* server = FairRunOnline::Instance()->GetHttpServer(); + if (nullptr != server) { + for (UInt_t uCanvas = 0; uCanvas < vCanvases.size(); ++uCanvas) { + server->Register(Form("/%s/%s", sSystem.data(), vCanvases[uCanvas].second.data()), vCanvases[uCanvas].first); + } + for (UInt_t uHisto = 0; uHisto < vHistos.size(); ++uHisto) { + server->Register(Form("/%s/%s", sSystem.data(), vHistos[uHisto].second.data()), vHistos[uHisto].first); + } + /* + server->RegisterCommand(Form("/Reset_%s_Hist", sSystem.data()), "bMcbm2018UnpackerTaskStsResetHistos=kTRUE"); + server->Restrict("/Reset_UnpSts_Hist", "allow=admin"); + */ } - /* - server->RegisterCommand(Form("/Reset_%s_Hist", sSystem.data()), "bMcbm2018UnpackerTaskStsResetHistos=kTRUE"); - server->Restrict("/Reset_UnpSts_Hist", "allow=admin"); -*/ } return kTRUE; diff --git a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h index 7c29a41a31b7ec44c9647862c56e189a64744b30..75ecaff525e88aaf3186b9b5dab018f27b5ef1e9 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h +++ b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h @@ -62,6 +62,28 @@ public: fuBmonChanMap[6] = uChan6; fuBmonChanMap[7] = uChan7; } + inline void SetBmonChannelMap(UInt_t uChan0, UInt_t uChan1, UInt_t uChan2, UInt_t uChan3, UInt_t uChan4, + UInt_t uChan5, UInt_t uChan6, UInt_t uChan7, UInt_t uChan8, UInt_t uChan9, + UInt_t uChan10, UInt_t uChan11, UInt_t uChan12, UInt_t uChan13, UInt_t uChan14, + UInt_t uChan15) + { + fuBmonChanMap[0] = uChan0; + fuBmonChanMap[1] = uChan1; + fuBmonChanMap[2] = uChan2; + fuBmonChanMap[3] = uChan3; + fuBmonChanMap[4] = uChan4; + fuBmonChanMap[5] = uChan5; + fuBmonChanMap[6] = uChan6; + fuBmonChanMap[7] = uChan7; + fuBmonChanMap[8] = uChan8; + fuBmonChanMap[9] = uChan9; + fuBmonChanMap[10] = uChan10; + fuBmonChanMap[11] = uChan11; + fuBmonChanMap[12] = uChan12; + fuBmonChanMap[13] = uChan13; + fuBmonChanMap[14] = uChan14; + fuBmonChanMap[15] = uChan15; + } void SetLongDurationLimits(UInt_t uDurationSeconds, UInt_t uBinSize) { @@ -115,6 +137,18 @@ public: /** @brief Read the Bmon mode */ bool GetBmonMode() { return fBmonMode; } + /** @brief Activate/de-activate the internal histo serve mode */ + void SetInternalHttpMode(bool value) { fbInternalHttp = value; } + + /** @brief Read the Bmon mode */ + bool GetInternalHttpMode() { return fbInternalHttp; } + + /** @brief Set start time for evolution histos */ + void SetHistosStartTime(double_t value) { fdStartTime = value; } + + /** @brief Set start time for evolution histos */ + double_t GetHistosStartTime() { return fdStartTime; } + private: TString fHistoFileName = "data/mon.tof.root"; @@ -137,7 +171,8 @@ private: UInt_t fuLongHistoBinNb = 1; /** @brief Flag if debug mode is active or not */ - bool fBmonMode = false; + bool fBmonMode = false; + bool fbInternalHttp = true; /// ---> Constants static const UInt_t kuMaxNbFlibLinks = 32;