Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Qiunan Zhang
cbmroot
Commits
7c1b2f19
Commit
7c1b2f19
authored
Feb 22, 2021
by
Nikolay Karpushkin
Committed by
Pierre-Alain Loizeau
Feb 22, 2021
Browse files
Psd monitor cleanup + flags for light monitoring
parent
d30f9bab
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoPsd.cxx
View file @
7c1b2f19
This diff is collapsed.
Click to expand it.
fles/mcbm2018/monitor/CbmMcbm2018MonitorAlgoPsd.h
View file @
7c1b2f19
...
...
@@ -56,16 +56,23 @@ public:
Bool_t
CreateHistograms
();
Bool_t
FillHistograms
();
Bool_t
ResetHistograms
();
Bool_t
ResetHistograms
(
Bool_t
bResetTime
=
kTRUE
);
inline
void
SetMonitorMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorMode
=
bFlagIn
;
}
inline
void
SetMonitorChanMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorChanMode
=
bFlagIn
;
}
inline
void
SetMonitorWfmMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorWfmMode
=
bFlagIn
;
}
inline
void
SetMonitorFitMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorFitMode
=
bFlagIn
;
}
inline
void
SetHistoryHistoSize
(
UInt_t
inHistorySizeSec
=
1800
)
{
fuHistoryHistoSize
=
inHistorySizeSec
;
}
inline
void
SetChargeHistoArgs
(
std
::
vector
<
Int_t
>
inVec
)
{
fviHistoChargeArgs
=
inVec
;
kvuWfmRanges
.
clear
();
for
(
uint8_t
i
=
0
;
i
<=
kuNbWfmRanges
;
++
i
)
kvuWfmRanges
.
push_back
(
fviHistoChargeArgs
.
at
(
1
)
+
i
*
(
fviHistoChargeArgs
.
at
(
2
)
-
fviHistoChargeArgs
.
at
(
1
))
/
kuNbWfmRanges
);
}
inline
void
SetAmplHistoArgs
(
std
::
vector
<
Int_t
>
inVec
)
{
fviHistoAmplArgs
=
inVec
;
...
...
@@ -79,10 +86,14 @@ private:
/// Control flags
Bool_t
fbMonitorMode
;
//! Switch ON the filling of a minimal set of histograms
Bool_t
fbMonitorChanMode
;
//! Switch ON the filling channelwise histograms
Bool_t
fbMonitorWfmMode
;
//! Switch ON the filling waveforms histograms
Bool_t
fbMonitorFitMode
;
//! Switch ON the filling waveform fitting histograms
Bool_t
fbDebugMonitorMode
;
//! Switch ON the filling of a additional set of histograms
std
::
vector
<
Bool_t
>
fvbMaskedComponents
;
Bool_t
fbFirstPackageError
;
Bool_t
fbPsdMissedData
;
/// Settings from parameter file
CbmMcbm2018PsdPar
*
fUnpackPar
;
//!
...
...
@@ -105,8 +116,6 @@ private:
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
Double_t
...
...
@@ -120,21 +129,10 @@ private:
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
/// 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
/// 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 **/
...
...
@@ -148,7 +146,6 @@ private:
fviHistoZLArgs
;
/** ZeroLevel histogram arguments in adc counts **/
/// Histograms
UInt_t
fuReadEvtCnt
;
UInt_t
fuMsgsCntInMs
;
UInt_t
fuReadMsgsCntInMs
;
UInt_t
fuLostMsgsCntInMs
;
...
...
@@ -156,17 +153,11 @@ private:
/// Channel rate plots
std
::
vector
<
UInt_t
>
fvuHitCntChanMs
;
std
::
vector
<
UInt_t
>
fvuErrorCntChanMs
;
std
::
vector
<
UInt_t
>
fvuEvtLostCntChanMs
;
std
::
vector
<
TH1
*>
fvhHitCntEvoChan
;
std
::
vector
<
TH2
*>
fvhHitCntPerMsEvoChan
;
std
::
vector
<
TH1
*>
fvhHitChargeChan
;
std
::
vector
<
TH1
*>
fvhHitZeroLevelChan
;
std
::
vector
<
TH1
*>
fvhHitAmplChan
;
std
::
vector
<
TH1
*>
fvhHitChargeByWfmChan
;
std
::
vector
<
TH2
*>
fvhHitChargeEvoChan
;
std
::
vector
<
TH1
*>
fvhHitWfmChan
;
std
::
vector
<
TH1
*>
fvhHitFitWfmChan
;
static
const
UInt_t
kuNbWfmRanges
=
8
;
static
const
UInt_t
kuNbWfmExamples
=
8
;
...
...
@@ -181,25 +172,17 @@ private:
Double_t
fdStartTimeSpill
;
Double_t
fdLastSecondTime
;
UInt_t
fuCountsLastSecond
;
static
const
UInt_t
kuNbSpillPlots
=
5
;
static
const
UInt_t
kuOffSpillCountLimit
=
200
;
const
UInt_t
kuPsdChanMap
[
kuNbChanPsd
]
=
{
0
};
// = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; //! Map from electronics channel to PSD physical channel
TH1
*
fhChannelMap
;
TH1
*
fhHitChargeMap
;
TH1
*
fhHitMapEvo
;
TH2
*
fhChanHitMapEvo
;
std
::
vector
<
TH1
*>
fvhChannelMapSpill
;
TH1
*
fhHitsPerSpill
;
/// Global Rate
TH1
*
fhMsgsCntEvo
;
TH1
*
fhReadMsgsCntEvo
;
TH1
*
fhLostMsgsCntEvo
;
TH1
*
fhReadEvtsCntEvo
;
TH2
*
fhAdcTimeEvo
;
TH1
*
fhMissedData
;
TH1
*
fhAdcTime
;
TH2
*
fhMsLengthEvo
;
TH2
*
fhMsgsCntPerMsEvo
;
...
...
@@ -208,6 +191,7 @@ private:
TH2
*
fhReadEvtsCntPerMsEvo
;
/// Waveform fitting
std
::
vector
<
TH1
*>
fvhHitFitWfmChan
;
std
::
vector
<
TH2
*>
fvhFitHarmonic1Chan
;
std
::
vector
<
TH2
*>
fvhFitHarmonic2Chan
;
std
::
vector
<
TH2
*>
fvhFitQaChan
;
...
...
@@ -218,9 +202,8 @@ private:
TCanvas
*
fcChargesFPGA
;
TCanvas
*
fcChargesWfm
;
TCanvas
*
fcAmplitudes
;
TCanvas
*
fcZeroLevels
;
TCanvas
*
fcGenCntsPerMs
;
TCanvas
*
fcSpillCounts
;
TCanvas
*
fcSpillCountsHori
;
TCanvas
*
fcWfmsAllChannels
;
std
::
vector
<
TCanvas
*>
fvcWfmsChan
;
TCanvas
*
fcPronyFit
;
...
...
fles/mcbm2018/monitor/CbmMcbm2018MonitorTaskPsd.cxx
View file @
7c1b2f19
...
...
@@ -103,6 +103,9 @@ Bool_t CbmMcbm2018MonitorTaskPsd::InitContainers() {
/// Transfer parameter values set from calling macro
fMonitorAlgo
->
SetMonitorMode
(
fbMonitorMode
);
fMonitorAlgo
->
SetMonitorChanMode
(
fbMonitorChanMode
);
fMonitorAlgo
->
SetMonitorWfmMode
(
fbMonitorWfmMode
);
fMonitorAlgo
->
SetMonitorFitMode
(
fbMonitorFitMode
);
fMonitorAlgo
->
SetHistoryHistoSize
(
fuHistoryHistoSize
);
fMonitorAlgo
->
SetChargeHistoArgs
(
fviHistoChargeArgs
);
fMonitorAlgo
->
SetAmplHistoArgs
(
fviHistoAmplArgs
);
...
...
fles/mcbm2018/monitor/CbmMcbm2018MonitorTaskPsd.h
View file @
7c1b2f19
...
...
@@ -42,6 +42,9 @@ public:
inline
void
SetMonitorMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorMode
=
bFlagIn
;
}
inline
void
SetMonitorChanMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorChanMode
=
bFlagIn
;
}
inline
void
SetMonitorWfmMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorWfmMode
=
bFlagIn
;
}
inline
void
SetMonitorFitMode
(
Bool_t
bFlagIn
=
kTRUE
)
{
fbMonitorFitMode
=
bFlagIn
;
}
void
SetIgnoreOverlapMs
(
Bool_t
bFlagIn
=
kTRUE
);
inline
void
SetHistoryHistoSize
(
UInt_t
inHistorySizeSec
=
1800
)
{
fuHistoryHistoSize
=
inHistorySizeSec
;
...
...
@@ -61,6 +64,9 @@ private:
/// Control flags
Bool_t
fbMonitorMode
;
//! Switch ON the filling of a minimal set of histograms
Bool_t
fbMonitorChanMode
;
//! Switch ON the filling channelwise histograms
Bool_t
fbMonitorWfmMode
;
//! Switch ON the filling waveforms histograms
Bool_t
fbMonitorFitMode
;
//! Switch ON the filling waveform fitting histograms
Bool_t
fbDebugMonitorMode
;
//! Switch ON the filling of a additional set of histograms
...
...
macro/beamtime/mcbm2020/MonitorPsd.C
View file @
7c1b2f19
...
...
@@ -53,6 +53,9 @@ void MonitorPsd(TString inFile = "",
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
">>> MonitorPsd: Initialising..."
<<
std
::
endl
;
CbmMcbm2018MonitorTaskPsd
*
monitor_psd
=
new
CbmMcbm2018MonitorTaskPsd
();
monitor_psd
->
SetMonitorChanMode
(
kFALSE
);
monitor_psd
->
SetMonitorWfmMode
(
kFALSE
);
monitor_psd
->
SetMonitorFitMode
(
kFALSE
);
monitor_psd
->
SetIgnoreOverlapMs
();
monitor_psd
->
SetHistoryHistoSize
(
3600
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment