diff --git a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx index 9576dbeebb2f3a277a128c769da33461befa7d4e..c50b003b7a3af9d000a596713ea37db7813f990c 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx +++ b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.cxx @@ -53,6 +53,18 @@ CbmTofUnpackMonitor::~CbmTofUnpackMonitor() } } +void CbmTofUnpackMonitor::SetBmonChannelMap(std::vector<uint32_t> vChanMapIn) +{ + uint32_t uNbCh = vChanMapIn.size(); + if (8 != uNbCh && 16 != uNbCh) { + LOG(fatal) << "Wrong number of channels in call to CbmTofUnpackMonitor::SetBmonChannelMap, " + << "only 8 and 16 supported, input here was " << uNbCh; + } + for (UInt_t uChan = 0; uChan < uNbCh; ++uChan) { + fuBmonChanMap[uChan] = vChanMapIn[uChan]; + } +} + Bool_t CbmTofUnpackMonitor::CreateHistograms() { /// Avoid name collision for the histos and canvases in Root memory diff --git a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h index 75ecaff525e88aaf3186b9b5dab018f27b5ef1e9..bf0c7ede2008186a05ea90c1b1d36d8b90af94f5 100644 --- a/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h +++ b/reco/detectors/tof/unpack/CbmTofUnpackMonitor.h @@ -13,7 +13,9 @@ #include "TProfile.h" #include "TProfile2D.h" +#include <array> #include <cstdint> +#include <vector> class TCanvas; @@ -50,40 +52,7 @@ public: inline void SetSpillThreshold(UInt_t uCntLimit) { fuOffSpillCountLimit = uCntLimit; } inline void SetSpillThresholdNonPulser(UInt_t uCntLimit) { fuOffSpillCountLimitNonPulser = uCntLimit; } inline void SetSpillCheckInterval(Double_t dIntervalSec) { fdSpillCheckInterval = dIntervalSec; } - 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) - { - fuBmonChanMap[0] = uChan0; - fuBmonChanMap[1] = uChan1; - fuBmonChanMap[2] = uChan2; - fuBmonChanMap[3] = uChan3; - fuBmonChanMap[4] = uChan4; - fuBmonChanMap[5] = uChan5; - 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 SetBmonChannelMap(std::vector<uint32_t> vChanMapIn); void SetLongDurationLimits(UInt_t uDurationSeconds, UInt_t uBinSize) {