diff --git a/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.cxx b/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.cxx index 5a44a44c01081cfd60dd82fbc388c27fccab57c2..ef60a1c36a8294b4513cc618b626bc0573b60c75 100644 --- a/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.cxx +++ b/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.cxx @@ -35,91 +35,7 @@ // ------------------------------------------------------------------------- CbmMcbm2018MonitorAlgoT0::CbmMcbm2018MonitorAlgoT0() : - CbmStar2019Algo(), - /// From the class itself - fbMonitorMode( kFALSE ), - fbDebugMonitorMode( kFALSE ), - fvbMaskedComponents(), - fUnpackPar( nullptr ), - fuNrOfGdpbs( 0 ), - fGdpbIdIndexMap(), - fuNrOfFeePerGdpb( 0 ), - fuNrOfGet4PerFee( 0 ), - fuNrOfChannelsPerGet4( 0 ), - fuNrOfChannelsPerFee( 0 ), - fuNrOfGet4( 0 ), - fuNrOfGet4PerGdpb( 0 ), - fuNrOfChannelsPerGdpb( 0 ), - fuMinTotPulser( 90 ), - fuMaxTotPulser( 100 ), - fuOffSpillCountLimit( 200 ), - fulCurrentTsIdx( 0 ), - fulCurrentMsIdx( 0 ), - fdTsStartTime( -1.0 ), - fdTsStopTimeCore( -1.0 ), - fdMsTime( -1.0 ), - fuMsIndex( 0 ), - fmMsgCounter(), - fuCurrentEquipmentId( 0 ), - fuCurrDpbId( 0 ), - fuCurrDpbIdx( 0 ), - fiRunStartDateTimeSec( -1 ), - fiBinSizeDatePlots( -1 ), - fuGet4Id( 0 ), - fuGet4Nr( 0 ), - fvulCurrentEpoch(), - fvulCurrentEpochCycle(), - fvulCurrentEpochFull(), - fdStartTime( - 1.0 ), - fdStartTimeMsSz( 0.0 ), - ftStartTimeUnix( std::chrono::steady_clock::now() ), - fvvmEpSupprBuffer(), - fvmHitsInMs(), - fuHistoryHistoSize( 3600 ), - fvuHitCntChanMs( kuNbChanDiamond, 0 ), - fvuErrorCntChanMs( kuNbChanDiamond, 0 ), - fvuEvtLostCntChanMs( kuNbChanDiamond, 0 ), - fvhMsgCntEvoChan( kuNbChanDiamond, nullptr ), - fvhMsgCntPerMsEvoChan( kuNbChanDiamond, nullptr ), - fvhHitCntEvoChan( kuNbChanDiamond, nullptr ), - fvhHitCntPerMsEvoChan( kuNbChanDiamond, nullptr ), - fvhErrorCntEvoChan( kuNbChanDiamond, nullptr ), - fvhErrorCntPerMsEvoChan( kuNbChanDiamond, nullptr ), - fvhEvtLostCntEvoChan( kuNbChanDiamond, nullptr ), - fvhEvtLostCntPerMsEvoChan( kuNbChanDiamond, nullptr ), - fvhErrorFractEvoChan( kuNbChanDiamond, nullptr ), - fvhErrorFractPerMsEvoChan( kuNbChanDiamond, nullptr ), - fvhEvtLostFractEvoChan( kuNbChanDiamond, nullptr ), - fvhEvtLostFractPerMsEvoChan( kuNbChanDiamond, nullptr ), - fbSpillOn( kTRUE ), - fuCurrentSpillIdx( 0 ), - fuCurrentSpillPlot( 0 ), - fdStartTimeSpill( -1.0 ), - fdLastSecondTime( -1.0 ), - fuCountsLastSecond( 0 ), - fhChannelMap( nullptr ), - fhHitMapEvo( nullptr ), - fhHitTotEvo( nullptr ), - fhChanHitMapEvo( nullptr ), - fvhChannelMapSpill(), - fhHitsPerSpill( nullptr ), - fhMsgCntEvo( nullptr ), - fhHitCntEvo( nullptr ), - fhErrorCntEvo( nullptr ), - fhLostEvtCntEvo( nullptr ), - fhErrorFractEvo( nullptr ), - fhLostEvtFractEvo( nullptr ), - fhMsgCntPerMsEvo( nullptr ), - fhHitCntPerMsEvo( nullptr ), - fhErrorCntPerMsEvo( nullptr ), - fhLostEvtCntPerMsEvo( nullptr ), - fhErrorFractPerMsEvo( nullptr ), - fhLostEvtFractPerMsEvo( nullptr ), - fcSummary( nullptr ), - fcHitMaps( nullptr ), - fcGenCntsPerMs( nullptr ), - fcSpillCounts( nullptr ), - fcSpillCountsHori( nullptr ) + CbmStar2019Algo() { } CbmMcbm2018MonitorAlgoT0::~CbmMcbm2018MonitorAlgoT0() diff --git a/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.h b/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.h index 0a4be5baf4f829a1811d7ce158f4b7bf26d1b4ad..134660c11773c850510d7f2e9fdefea0935026e3 100644 --- a/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.h +++ b/fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoT0.h @@ -77,127 +77,127 @@ class CbmMcbm2018MonitorAlgoT0 : public CbmStar2019Algo<CbmTofDigi> private: /// Control flags - Bool_t fbMonitorMode; //! Switch ON the filling of a minimal set of histograms - Bool_t fbDebugMonitorMode; //! Switch ON the filling of a additional set of histograms - std::vector< Bool_t > fvbMaskedComponents; + Bool_t fbMonitorMode = kFALSE; //! Switch ON the filling of a minimal set of histograms + Bool_t fbDebugMonitorMode = kFALSE; //! Switch ON the filling of a additional set of histograms + std::vector< Bool_t > fvbMaskedComponents = {}; /// Settings from parameter file - CbmMcbm2018TofPar* fUnpackPar; //! + CbmMcbm2018TofPar* fUnpackPar = nullptr; //! /// Readout chain dimensions and mapping - UInt_t fuNrOfGdpbs; //! Total number of GDPBs in the system - std::map<UInt_t, UInt_t> fGdpbIdIndexMap; //! gDPB ID to index map - UInt_t fuNrOfFeePerGdpb; //! Number of FEBs per GDPB - UInt_t fuNrOfGet4PerFee; //! Number of GET4s per FEE - UInt_t fuNrOfChannelsPerGet4; //! Number of channels in each GET4 - UInt_t fuNrOfChannelsPerFee; //! Number of channels in each FEE - UInt_t fuNrOfGet4; //! Total number of Get4 chips in the system - UInt_t fuNrOfGet4PerGdpb; //! Number of GET4s per GDPB - UInt_t fuNrOfChannelsPerGdpb; //! Number of channels per GDPB + UInt_t fuNrOfGdpbs = 0; //! Total number of GDPBs in the system + std::map<UInt_t, UInt_t> fGdpbIdIndexMap = {}; //! gDPB ID to index map + UInt_t fuNrOfFeePerGdpb = 0; //! Number of FEBs per GDPB + UInt_t fuNrOfGet4PerFee = 0; //! Number of GET4s per FEE + UInt_t fuNrOfChannelsPerGet4 = 0; //! Number of channels in each GET4 + UInt_t fuNrOfChannelsPerFee = 0; //! Number of channels in each FEE + UInt_t fuNrOfGet4 = 0; //! Total number of Get4 chips in the system + UInt_t fuNrOfGet4PerGdpb = 0; //! Number of GET4s per GDPB + UInt_t fuNrOfChannelsPerGdpb = 0; //! Number of channels per GDPB /// User settings: Data correction parameters - UInt_t fuMinTotPulser; - UInt_t fuMaxTotPulser; - UInt_t fuOffSpillCountLimit; + UInt_t fuMinTotPulser = 90; + UInt_t fuMaxTotPulser = 100; + UInt_t fuOffSpillCountLimit = 200; /// Constants static const Int_t kiMaxNbFlibLinks = 32; static const UInt_t kuBytesPerMessage = 8; - static const UInt_t kuNbChanDiamond = 8; + static const UInt_t kuNbChanDiamond = 8; /// Running indices /// TS/MS info - ULong64_t fulCurrentTsIdx; - ULong64_t fulCurrentMsIdx; - Double_t fdTsStartTime; //! Time in ns of current TS from the index of the first MS first component - Double_t fdTsStopTimeCore; //! End Time in ns of current TS Core from the index of the first MS first component - Double_t fdMsTime; //! Start Time in ns of current MS from its index field in header - UInt_t fuMsIndex; //! Index of current MS within the TS + ULong64_t fulCurrentTsIdx = 0; + ULong64_t fulCurrentMsIdx = 0; + Double_t fdTsStartTime = -1.0; //! Time in ns of current TS from the index of the first MS first component + Double_t fdTsStopTimeCore = -1.0; //! End Time in ns of current TS Core from the index of the first MS first component + Double_t fdMsTime = -1.0; //! Start Time in ns of current MS from its index field in header + UInt_t fuMsIndex = 0; //! Index of current MS within the TS /// Current data properties - std::map< gdpbv100::MessageTypes, UInt_t > fmMsgCounter; - UInt_t fuCurrentEquipmentId; //! Current equipment ID, tells from which DPB the current MS is originating - UInt_t fuCurrDpbId; //! Temp holder until Current equipment ID is properly filled in MS - UInt_t fuCurrDpbIdx; //! Index of the DPB from which the MS currently unpacked is coming - Int_t fiRunStartDateTimeSec; //! Start of run time since "epoch" in s, for the plots with date as X axis - Int_t fiBinSizeDatePlots; //! Bin size in s for the plots with date as X axis - UInt_t fuGet4Id; //! running number (0 to fuNrOfGet4PerGdpb) of the Get4 chip of a unique GDPB for current message - UInt_t fuGet4Nr; //! running number (0 to fuNrOfGet4) of the Get4 chip in the system for current message + std::map< gdpbv100::MessageTypes, UInt_t > fmMsgCounter = {}; + UInt_t fuCurrentEquipmentId = 0; //! Current equipment ID, tells from which DPB the current MS is originating + UInt_t fuCurrDpbId = 0; //! Temp holder until Current equipment ID is properly filled in MS + UInt_t fuCurrDpbIdx = 0; //! Index of the DPB from which the MS currently unpacked is coming + Int_t fiRunStartDateTimeSec = -1; //! Start of run time since "epoch" in s, for the plots with date as X axis + Int_t fiBinSizeDatePlots = -1; //! Bin size in s for the plots with date as X axis + UInt_t fuGet4Id = 0; //! running number (0 to fuNrOfGet4PerGdpb) of the Get4 chip of a unique GDPB for current message + UInt_t fuGet4Nr = 0; //! running number (0 to fuNrOfGet4) of the Get4 chip in the system for current message /// Data format control: Current time references for each GDPB: merged epoch marker, epoch cycle, full epoch [fuNrOfGdpbs] - std::vector< ULong64_t > fvulCurrentEpoch; //! Current epoch index, per DPB - std::vector< ULong64_t > fvulCurrentEpochCycle; //! Epoch cycle from the Ms Start message and Epoch counter flip - std::vector< ULong64_t > fvulCurrentEpochFull; //! Epoch + Epoch Cycle + std::vector< ULong64_t > fvulCurrentEpoch = {}; //! Current epoch index, per DPB + std::vector< ULong64_t > fvulCurrentEpochCycle = {}; //! Epoch cycle from the Ms Start message and Epoch counter flip + std::vector< ULong64_t > fvulCurrentEpochFull = {}; //! Epoch + Epoch Cycle /// Starting state book-keeping - Double_t fdStartTime; /** Time of first valid hit (epoch available), used as reference for evolution plots**/ - Double_t fdStartTimeMsSz; /** Time of first microslice, used as reference for evolution plots**/ - std::chrono::steady_clock::time_point ftStartTimeUnix; /** Time of run Start from UNIX system, used as reference for long evolution plots against reception time **/ + Double_t fdStartTime = -1.0; /** Time of first valid hit (epoch available), used as reference for evolution plots**/ + Double_t fdStartTimeMsSz = 0.0; /** Time of first microslice, used as reference for evolution plots**/ + std::chrono::steady_clock::time_point ftStartTimeUnix = std::chrono::steady_clock::now(); /** Time of run Start from UNIX system, used as reference for long evolution plots against reception time **/ /// Buffers - std::vector< std::vector< gdpbv100::Message > > fvvmEpSupprBuffer; //! [DPB] - std::vector< gdpbv100::FullMessage > fvmHitsInMs; //! All hits (time in bins, TOT in bins, asic, channel) in last MS, sorted with "<" operator + std::vector< std::vector< gdpbv100::Message > > fvvmEpSupprBuffer = {}; //! [DPB] + std::vector< gdpbv100::FullMessage > fvmHitsInMs = {}; //! All hits (time in bins, TOT in bins, asic, channel) in last MS, sorted with "<" operator /// Histograms related variables - UInt_t fuHistoryHistoSize; /** Size in seconds of the evolution histograms **/ + UInt_t fuHistoryHistoSize = 3600; /** Size in seconds of the evolution histograms **/ /// Histograms /// Channel rate plots - std::vector< UInt_t > fvuHitCntChanMs; - std::vector< UInt_t > fvuErrorCntChanMs; - std::vector< UInt_t > fvuEvtLostCntChanMs; - std::vector< TH1 * > fvhMsgCntEvoChan; - std::vector< TH2 * > fvhMsgCntPerMsEvoChan; - std::vector< TH1 * > fvhHitCntEvoChan; - std::vector< TH2 * > fvhHitCntPerMsEvoChan; - std::vector< TH1 * > fvhErrorCntEvoChan; - std::vector< TH2 * > fvhErrorCntPerMsEvoChan; - std::vector< TH1 * > fvhEvtLostCntEvoChan; - std::vector< TH2 * > fvhEvtLostCntPerMsEvoChan; - std::vector< TProfile * > fvhErrorFractEvoChan; - std::vector< TH2 * > fvhErrorFractPerMsEvoChan; - std::vector< TProfile * > fvhEvtLostFractEvoChan; - std::vector< TH2 * > fvhEvtLostFractPerMsEvoChan; + std::vector< UInt_t > fvuHitCntChanMs = std::vector< UInt_t >( kuNbChanDiamond, 0 ); + std::vector< UInt_t > fvuErrorCntChanMs = std::vector< UInt_t >( kuNbChanDiamond, 0 ); + std::vector< UInt_t > fvuEvtLostCntChanMs = std::vector< UInt_t >( kuNbChanDiamond, 0 ); + std::vector< TH1 * > fvhMsgCntEvoChan = std::vector< TH1 * > ( kuNbChanDiamond, nullptr ); + std::vector< TH2 * > fvhMsgCntPerMsEvoChan = std::vector< TH2 * > ( kuNbChanDiamond, nullptr ); + std::vector< TH1 * > fvhHitCntEvoChan = std::vector< TH1 * > ( kuNbChanDiamond, nullptr ); + std::vector< TH2 * > fvhHitCntPerMsEvoChan = std::vector< TH2 * > ( kuNbChanDiamond, nullptr ); + std::vector< TH1 * > fvhErrorCntEvoChan = std::vector< TH1 * > ( kuNbChanDiamond, nullptr ); + std::vector< TH2 * > fvhErrorCntPerMsEvoChan = std::vector< TH2 * > ( kuNbChanDiamond, nullptr ); + std::vector< TH1 * > fvhEvtLostCntEvoChan = std::vector< TH1 * > ( kuNbChanDiamond, nullptr ); + std::vector< TH2 * > fvhEvtLostCntPerMsEvoChan = std::vector< TH2 * > ( kuNbChanDiamond, nullptr ); + std::vector< TProfile * > fvhErrorFractEvoChan = std::vector< TProfile * > ( kuNbChanDiamond, nullptr ); + std::vector< TH2 * > fvhErrorFractPerMsEvoChan = std::vector< TH2 * > ( kuNbChanDiamond, nullptr ); + std::vector< TProfile * > fvhEvtLostFractEvoChan = std::vector< TProfile * > ( kuNbChanDiamond, nullptr ); + std::vector< TH2 * > fvhEvtLostFractPerMsEvoChan = std::vector< TH2 * > ( kuNbChanDiamond, nullptr ); /// Channels map - Bool_t fbSpillOn; - UInt_t fuCurrentSpillIdx; - UInt_t fuCurrentSpillPlot; - Double_t fdStartTimeSpill; - Double_t fdLastSecondTime; - UInt_t fuCountsLastSecond; + Bool_t fbSpillOn = kTRUE; + UInt_t fuCurrentSpillIdx = 0; + UInt_t fuCurrentSpillPlot = 0; + Double_t fdStartTimeSpill = -1.0; + Double_t fdLastSecondTime = -1.0; + UInt_t fuCountsLastSecond = 0; static const UInt_t kuNbSpillPlots = 5; // UInt_t kuDiamChanMap[ kuNbChanDiamond ] = { 2, 3, 4, 5, 0, 1, 6, 7 }; //! Map from electronics channel to Diamond strip UInt_t fuDiamChanMap[ kuNbChanDiamond ] = { 0, 1, 2, 3, 4, 5, 6, 7 }; //! Map from electronics channel to Diamond strip - TH1 * fhDpbMap = nullptr; - TH1 * fhChannelMap; - TH2 * fhHitMapEvo; - TH2 * fhHitTotEvo; - TH2 * fhChanHitMapEvo; - std::vector< TH1 * > fvhDpbMapSpill = {}; - std::vector< TH1 * > fvhChannelMapSpill; - TH1 * fhHitsPerSpill; + TH1 * fhDpbMap = nullptr; + TH1 * fhChannelMap = nullptr; + TH2 * fhHitMapEvo = nullptr; + TH2 * fhHitTotEvo = nullptr; + TH2 * fhChanHitMapEvo = nullptr; + std::vector< TH1 * > fvhDpbMapSpill = {}; + std::vector< TH1 * > fvhChannelMapSpill = {}; + TH1 * fhHitsPerSpill = nullptr; /// Global Rate - TH1 * fhMsgCntEvo; - TH1 * fhHitCntEvo; - TH1 * fhErrorCntEvo; - TH1 * fhLostEvtCntEvo; - TProfile * fhErrorFractEvo; - TProfile * fhLostEvtFractEvo; - - TH2 * fhMsgCntPerMsEvo; - TH2 * fhHitCntPerMsEvo; - TH2 * fhErrorCntPerMsEvo; - TH2 * fhLostEvtCntPerMsEvo; - TH2 * fhErrorFractPerMsEvo; - TH2 * fhLostEvtFractPerMsEvo; + TH1 * fhMsgCntEvo = nullptr; + TH1 * fhHitCntEvo = nullptr; + TH1 * fhErrorCntEvo = nullptr; + TH1 * fhLostEvtCntEvo = nullptr; + TProfile * fhErrorFractEvo = nullptr; + TProfile * fhLostEvtFractEvo = nullptr; + + TH2 * fhMsgCntPerMsEvo = nullptr; + TH2 * fhHitCntPerMsEvo = nullptr; + TH2 * fhErrorCntPerMsEvo = nullptr; + TH2 * fhLostEvtCntPerMsEvo = nullptr; + TH2 * fhErrorFractPerMsEvo = nullptr; + TH2 * fhLostEvtFractPerMsEvo = nullptr; /// Pulser - TH1 * fhChannelMapPulser; - TH2 * fhHitMapEvoPulser; + TH1 * fhChannelMapPulser = nullptr; + TH2 * fhHitMapEvoPulser = nullptr; /// Canvases - TCanvas * fcSummary; - TCanvas * fcHitMaps; - TCanvas * fcGenCntsPerMs; - TCanvas * fcSpillCounts; - TCanvas * fcSpillCountsHori; + TCanvas * fcSummary = nullptr; + TCanvas * fcHitMaps = nullptr; + TCanvas * fcGenCntsPerMs = nullptr; + TCanvas * fcSpillCounts = nullptr; + TCanvas * fcSpillCountsHori = nullptr; TCanvas * fcSpillDpbCountsHori = nullptr; /*