Commit aab352c1 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau Committed by Volker Friese
Browse files

Add INL and DNL plots in TOF pulser monitor, as used for FEE EDR and PADI/GET4 papers/manuals.

Fixes in mCBM 2020 Algos and MQ examples:
- Remove JSROOT commands fore reset/save histos in MQ histos server and devices, as not working (need cling context!).
- Add/extend support for T0 channels remapping + related plots.
- Fix TOF pulser algo (logic was broken before and chain resetting the output plots).
Add macro folder + MQ monitor scripts for TOF and T0.
parent bb82dd46
......@@ -29,10 +29,10 @@
#include <boost/serialization/utility.hpp>
std::mutex mtx;
/*
Bool_t bMqHistoServerResetHistos = kFALSE;
Bool_t bMqHistoServerSaveHistos = kFALSE;
*/
CbmMqHistoServer::CbmMqHistoServer()
: FairMQDevice()
, fsChannelNameHistosInput("histogram-in")
......@@ -69,11 +69,11 @@ void CbmMqHistoServer::InitTask() {
/// To avoid the server sucking all Histos from gROOT when no output file is used
fServer->GetSniffer()->SetScanGlobalDir(kFALSE);
fServer->RegisterCommand("/Reset_Hist", "bMqHistoServerResetHistos=kTRUE");
fServer->RegisterCommand("/Save_Hist", "bMqHistoServerSaveHistos=kTRUE");
//fServer->RegisterCommand("/Reset_Hist", "bMqHistoServerResetHistos=kTRUE");
//fServer->RegisterCommand("/Save_Hist", "bMqHistoServerSaveHistos=kTRUE");
fServer->Restrict("/Reset_Moni_Hist", "allow=admin");
fServer->Restrict("/Save_Pulser_Hist", "allow=admin");
//fServer->Restrict("/Reset_Hist", "allow=admin");
//fServer->Restrict("/Save_Hist", "allow=admin");
}
bool CbmMqHistoServer::ReceiveData(FairMQMessagePtr& msg, int /*index*/) {
......@@ -124,7 +124,7 @@ bool CbmMqHistoServer::ReceiveData(FairMQMessagePtr& msg, int /*index*/) {
fNMessages += 1;
if (nullptr != tempObject) delete tempObject;
/*
/// TODO: control flags communication with histo server
/// Idea: 1 req channel (per device or not mixup?), polling every N TS and/or M s
if (bMqHistoServerResetHistos) {
......@@ -140,7 +140,7 @@ bool CbmMqHistoServer::ReceiveData(FairMQMessagePtr& msg, int /*index*/) {
SaveHistograms();
bMqHistoServerSaveHistos = kFALSE;
} // if( bMqHistoServerSaveHistos )
*/
return true;
}
......
......@@ -776,3 +776,16 @@ CbmUnpackedTimeslice::CbmUnpackedTimeslice(FairMQParts& parts)
fEventsArray.AbsorbObjects(arrayEventsIn);
} // if( TString( tempObject->ClassName() ).EqualTo( "TClonesArray") )
}
CbmUnpackedTimeslice::~CbmUnpackedTimeslice()
{
fvDigiT0.clear();
fvDigiSts.clear();
fvDigiMuch.clear();
fvDigiTrd.clear();
fvDigiTof.clear();
fvDigiRich.clear();
fvDigiPsd.clear();
// fEventsArray.Clear("C");
fEventsArray.Delete();
}
......@@ -43,6 +43,7 @@ class CbmUnpackedTimeslice {
/// TODO: rename to CbmTsWithEvents
public:
CbmUnpackedTimeslice(FairMQParts& parts);
~CbmUnpackedTimeslice();
TimesliceMetaData fTsMetaData;
std::vector<CbmTofDigi> fvDigiT0;
......
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQSamplerMonitor.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQSamplerMonitor.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQSamplerT0Monitor2020.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQSamplerT0Monitor2020.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQSamplerTofMonitor2020.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQSamplerTofMonitor2020.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQSamplerT0Monitor2021.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQSamplerT0Monitor2021.sh)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/startMQSamplerTofMonitor2021.sh.in ${CMAKE_BINARY_DIR}/bin/MQ/topologies/startMQSamplerTofMonitor2021.sh)
set(INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
......
......@@ -39,7 +39,6 @@ struct InitTaskError : std::runtime_error {
using namespace std;
Bool_t bMcbm2018MonitorTaskT0ResetHistos = kFALSE;
CbmDeviceMonitorT0::CbmDeviceMonitorT0()
: fbIgnoreOverlapMs {false}
......@@ -51,6 +50,7 @@ CbmDeviceMonitorT0::CbmDeviceMonitorT0()
, fuMinTotPulser {185}
, fuMaxTotPulser {195}
, fuOffSpillCountLimit {1000}
, fvuChanMap {0, 1, 2, 3, 4, 5, 6, 7}
, fuPublishFreqTs {100}
, fdMinPublishTime {0.5}
, fdMaxPublishTime {5.0}
......@@ -62,7 +62,9 @@ CbmDeviceMonitorT0::CbmDeviceMonitorT0()
, fMonitorAlgo {new CbmMcbm2018MonitorAlgoT0()}
, fArrayHisto {}
, fvpsHistosFolder {}
, fvpsCanvasConfig {} {}
, fvpsCanvasConfig {}
{
}
void CbmDeviceMonitorT0::InitTask() try {
/// Read options from executable
......@@ -72,6 +74,7 @@ void CbmDeviceMonitorT0::InitTask() try {
fuMinTotPulser = fConfig->GetValue<uint32_t>("PulsTotMin");
fuMaxTotPulser = fConfig->GetValue<uint32_t>("PulsTotMax");
fuOffSpillCountLimit = fConfig->GetValue<uint32_t>("SpillThr");
std::string sChanMap = fConfig->GetValue<std::string>("ChanMap");
fuPublishFreqTs = fConfig->GetValue<uint32_t>("PubFreqTs");
fdMinPublishTime = fConfig->GetValue<double_t>("PubTimeMin");
fdMaxPublishTime = fConfig->GetValue<double_t>("PubTimeMax");
......@@ -81,6 +84,23 @@ void CbmDeviceMonitorT0::InitTask() try {
fsChannelNameCanvasConfig = fConfig->GetValue<std::string>("ChNameCanvCfg");
fsAllowedChannels[0] = fsChannelNameDataInput;
UInt_t uChanIdx = 0;
size_t charPosDel = sChanMap.find(',');
while (uChanIdx < fvuChanMap.size() && std::string::npos != charPosDel) {
LOG(info) << sChanMap.substr(0, charPosDel);
fvuChanMap[uChanIdx] = std::stoul(sChanMap.substr(0, charPosDel));
LOG(info) << fvuChanMap[uChanIdx];
sChanMap = sChanMap.substr(charPosDel + 1);
LOG(info) << sChanMap;
uChanIdx++;
charPosDel = sChanMap.find(',');
} // while( uChanIdx < fvuChanMap.size() && std::string::npos != charPosDel )
if (uChanIdx < fvuChanMap.size()) {
LOG(info) << sChanMap;
fvuChanMap[uChanIdx] = std::stoul(sChanMap);
LOG(info) << fvuChanMap[uChanIdx];
} // if( uChanIdx < fvuChanMap.size() )
LOG(info) << "Histograms publication frequency in TS: " << fuPublishFreqTs;
LOG(info) << "Histograms publication min. interval in s: "
<< fdMinPublishTime;
......@@ -180,6 +200,9 @@ Bool_t CbmDeviceMonitorT0::InitContainers() {
fMonitorAlgo->SetHistoryHistoSize(fuHistoryHistoSize);
fMonitorAlgo->SetPulserTotLimits(fuMinTotPulser, fuMaxTotPulser);
fMonitorAlgo->SetSpillThreshold(fuOffSpillCountLimit);
fMonitorAlgo->SetChannelMap(fvuChanMap[0], fvuChanMap[1], fvuChanMap[2], fvuChanMap[3], fvuChanMap[4], fvuChanMap[5],
fvuChanMap[6], fvuChanMap[7]);
// fMonitorAlgo->AddMsComponentToList(0, 0x90);
Bool_t initOK = fMonitorAlgo->InitContainers();
......@@ -346,12 +369,6 @@ Bool_t CbmDeviceMonitorT0::DoUnpack(const fles::Timeslice& ts,
fbComponentsAddedToList = kTRUE;
} // if( kFALSE == fbComponentsAddedToList )
if (/* fbMonitorMode && */ bMcbm2018MonitorTaskT0ResetHistos) {
LOG(info) << "Reset T0 Monitor histos ";
fMonitorAlgo->ResetHistograms();
bMcbm2018MonitorTaskT0ResetHistos = kFALSE;
} // if( fbMonitorMode && bMcbm2018MonitorTaskT0ResetHistos )
if (kFALSE == fMonitorAlgo->ProcessTs(ts)) {
LOG(error) << "Failed processing TS " << ts.index()
<< " in unpacker algorithm class";
......
......@@ -50,6 +50,7 @@ private:
uint32_t fuMinTotPulser;
uint32_t fuMaxTotPulser;
uint32_t fuOffSpillCountLimit;
std::vector<uint32_t> fvuChanMap;
uint32_t fuPublishFreqTs;
double_t fdMinPublishTime;
double_t fdMaxPublishTime;
......
......@@ -39,8 +39,6 @@ struct InitTaskError : std::runtime_error {
using namespace std;
Bool_t bMcbm2018MonitorTaskTofResetHistos = kFALSE;
CbmDeviceMonitorTof::CbmDeviceMonitorTof()
: fMonitorAlgo {new CbmMcbm2018MonitorAlgoTof()} {}
......@@ -336,12 +334,6 @@ Bool_t CbmDeviceMonitorTof::DoUnpack(const fles::Timeslice& ts,
fbComponentsAddedToList = kTRUE;
} // if( kFALSE == fbComponentsAddedToList )
if (/* fbMonitorMode && */ bMcbm2018MonitorTaskTofResetHistos) {
LOG(info) << "Reset TOF Monitor histos ";
fMonitorAlgo->ResetHistograms();
bMcbm2018MonitorTaskTofResetHistos = kFALSE;
} // if( fbMonitorMode && bMcbm2018MonitorTaskTofResetHistos )
if (kFALSE == fMonitorAlgo->ProcessTs(ts)) {
LOG(error) << "Failed processing TS " << ts.index()
<< " in unpacker algorithm class";
......
......@@ -23,6 +23,8 @@ void addCustomOptions(bpo::options_description& options) {
options.add_options()("SpillThr",
bpo::value<uint32_t>()->default_value(1000),
"Hits Nb Thr for spill detection");
options.add_options()("ChanMap", bpo::value<std::string>()->default_value("0,1,2,3,4,5,6,7"),
"Set T0 channel map e.g. 0,1,2,3,4,5,6,7");
options.add_options()("PubFreqTs",
bpo::value<uint32_t>()->default_value(100),
"Histo publishing frequency in TS");
......
#!/bin/bash
$SIMPATH/bin/fairmq-shmmonitor --cleanup
if [ $# -ge 1 ]; then
_nbmoni=$1
((_pubfreqts = $_nbmoni*100 ))
_pubminsec=1.0
_pubmaxsec=10.0
if [ $# -ge 4 ]; then
_filename=""
_dirname=""
_hostname=$4
if [ $# -ge 5 ]; then
_pubfreqts=$5
if [ $# -ge 6 ]; then
_pubminsec=$6
if [ $# -ge 7 ]; then
_pubmaxsec=$7
fi
fi
fi
elif [ $# -ge 2 ]; then
_filename=$2
_hostname=""
if [ $# -eq 3 ]; then
_dirname=$3
else
_dirname=""
fi
else
echo 'Starting connection to local stream'
echo ' for other usages, please supply at least a filename.'
echo 'Possible usages are:'
echo 'startMQSamplerT0Monitor2020.sh'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <full filename pattern list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <filename pattern> <folder_path>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s> <Max Hist pub. in s>'
_filename=""
_dirname=""
_hostname="localhost"
fi
else
echo 'Starting connection to local stream with 1 monitor process'
echo ' for other usages, please supply at least a filename.'
echo 'Possible usages are:'
echo 'startMQSamplerT0Monitor2020.sh'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <full filename pattern list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <filename pattern> <folder_path>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s> <Max Hist pub. in s>'
_filename=""
_dirname=""
_hostname="localhost"
_nbmoni=1
_pubfreqts=100
_pubminsec=1.0
_pubmaxsec=10.0
fi
_paramfile=$VMCWORKDIR/macro/beamtime/mcbm2021/mT0Par.par
LOGFILETAG=`hostname`
LOGFILETAG+="_"
LOGFILETAG+=`date +%Y_%m_%d_%H_%M_%S`
LOGFILETAG+=".log"
SAMPLER="MultiTsaSampler"
SAMPLER+=" --id sampler1"
SAMPLER+=" --max-timeslices 0"
SAMPLER+=" --severity info"
#SAMPLER+=" --flib-port 10"
if [ "$_hostname" != "" ]; then
SAMPLER+=" --flib-host $_hostname"
elif [ "$_filename" != "" ]; then
SAMPLER+=" --filename $_filename"
if [ "$_dirname" != "" ]; then
SAMPLER+=" --dirname $_dirname"
fi
fi
SAMPLER+=" --high-water-mark 1000"
SAMPLER+=" --send-ts-per-sysid 1"
SAMPLER+=" --channel-config name=t0component,type=push,method=bind,address=tcp://127.0.0.1:11555"
#SAMPLER+=" --transport shmem"
SAMPLER+=" --transport zeromq"
#SAMPLER+=" --transport nanomsg"
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
SAMPLER_LOG="sampler1_$LOGFILETAG"
xterm -l -lf $SAMPLER_LOG -geometry 80x23+0+0 -hold -e $VMCWORKDIR/build/bin/MQ/source/$SAMPLER &
_iMoni=0
while (( _iMoni < _nbmoni )); do
(( _yOffset=100*_iMoni ))
(( _iMoni += 1 ))
MONITOR="T0MonitorMcbm2018"
MONITOR+=" --id mon$_iMoni"
MONITOR+=" --severity info"
MONITOR+=" --PubFreqTs $_pubfreqts"
MONITOR+=" --PubTimeMin $_pubminsec"
MONITOR+=" --PubTimeMax $_pubmaxsec"
MONITOR+=" --PulsTotMin 185"
MONITOR+=" --PulsTotMax 190"
MONITOR+=" --SpillThr 200"
MONITOR+=" --ChanMap 4,5,6,7,0,1,2,3"
MONITOR+=" --channel-config name=t0component,type=pull,method=connect,address=tcp://127.0.0.1:11555"
#MONITOR+=" --transport shmem"
MONITOR+=" --transport zeromq"
#MONITOR+=" --transport nanomsg"
MONITOR+=" --channel-config name=parameters,type=req,method=connect,transport=zeromq,address=tcp://127.0.0.1:11005,rateLogging=0"
MONITOR+=" --channel-config name=histogram-in,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11666"
MONITOR+=" --channel-config name=histo-conf,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11667"
MONITOR+=" --channel-config name=canvas-conf,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11668"
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
MONITOR_LOG="monit0_$_iMoni"
MONITOR_LOG+="_$LOGFILETAG"
xterm -l -lf $MONITOR_LOG -geometry 80x23+500+$_yOffset -hold -e $VMCWORKDIR/build/bin/MQ/monitor/$MONITOR &
done
PARAMETERSERVER="parmq-server"
PARAMETERSERVER+=" --id parmq-server"
PARAMETERSERVER+=" --severity info"
PARAMETERSERVER+=" --channel-name parameters"
PARAMETERSERVER+=" --channel-config name=parameters,type=rep,method=bind,transport=zeromq,address=tcp://127.0.0.1:11005,rateLogging=0"
PARAMETERSERVER+=" --first-input-name $_paramfile"
PARAMETERSERVER+=" --first-input-type ASCII"
PARAMETERSERVER+=" --libs-to-load=libCbmFlibMcbm2018" # doesn't work due to runtime problem
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
PARAMSRV_LOG="parmq_$LOGFILETAG"
xterm -l -lf $PARAMSRV_LOG -geometry 80x23+1000+0 -hold -e $VMCWORKDIR/build/bin/MQ/parmq/$PARAMETERSERVER &
HISTSERVER="MqHistoServer"
HISTSERVER+=" --id server1"
HISTSERVER+=" --severity info"
HISTSERVER+=" --histport 8082"
HISTSERVER+=" --channel-config name=histogram-in,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11666"
HISTSERVER+=" --channel-config name=histo-conf,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11667"
HISTSERVER+=" --channel-config name=canvas-conf,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11668"
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
HISTSRV_LOG="server1_$LOGFILETAG"
xterm -l -lf $HISTSRV_LOG -geometry 80x23+1500+0 -hold -e $VMCWORKDIR/build/bin/MQ/histogramServer/$HISTSERVER &
#!/bin/bash
$SIMPATH/bin/fairmq-shmmonitor --cleanup
if [ $# -ge 1 ]; then
_nbmoni=$1
((_pubfreqts = $_nbmoni*100 ))
_pubminsec=1.0
_pubmaxsec=10.0
if [ $# -ge 4 ]; then
_filename=""
_dirname=""
_hostname=$4
if [ $# -ge 5 ]; then
_pubfreqts=$5
if [ $# -ge 6 ]; then
_pubminsec=$6
if [ $# -ge 7 ]; then
_pubmaxsec=$7
fi
fi
fi
elif [ $# -ge 2 ]; then
_filename=$2
_hostname=""
if [ $# -eq 3 ]; then
_dirname=$3
else
_dirname=""
fi
else
echo 'Starting connection to local stream'
echo ' for other usages, please supply at least a filename.'
echo 'Possible usages are:'
echo 'startMQSamplerTofMonitor2020.sh'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> <full filename pattern list>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> <filename pattern> <folder_path>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s> <Max Hist pub. in s>'
_filename=""
_dirname=""
_hostname="localhost"
fi
else
echo 'Starting connection to local stream with 1 monitor process'
echo ' for other usages, please supply at least a filename.'
echo 'Possible usages are:'
echo 'startMQSamplerTofMonitor2020.sh'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> <full filename pattern list>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> <filename pattern> <folder_path>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s>'
echo 'startMQSamplerTofMonitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s> <Max Hist pub. in s>'
_filename=""
_dirname=""
_hostname="localhost"
_nbmoni=1
_pubfreqts=100
_pubminsec=1.0
_pubmaxsec=10.0
fi
_paramfile=$VMCWORKDIR/macro/beamtime/mcbm2021/mTofPar.par
LOGFILETAG=`hostname`
LOGFILETAG+="_"
LOGFILETAG+=`date +%Y_%m_%d_%H_%M_%S`
LOGFILETAG+=".log"
SAMPLER="MultiTsaSampler"
SAMPLER+=" --id sampler1"
SAMPLER+=" --max-timeslices 0"
SAMPLER+=" --severity info"
#SAMPLER+=" --flib-port 10"
if [ "$_hostname" != "" ]; then
SAMPLER+=" --flib-host $_hostname"
elif [ "$_filename" != "" ]; then
SAMPLER+=" --filename $_filename"
if [ "$_dirname" != "" ]; then
SAMPLER+=" --dirname $_dirname"
fi
fi
SAMPLER+=" --high-water-mark 1000"
#SAMPLER+=" --no-split-ts 1"
SAMPLER+=" --send-ts-per-channel 1"
SAMPLER+=" --sysid-chan 0x60:tofcomponent"
SAMPLER+=" --sysid-chan 0x90:tofcomponent"
SAMPLER+=" --channel-config name=tofcomponent,type=push,method=bind,address=tcp://127.0.0.1:11555"
#SAMPLER+=" --transport shmem"
SAMPLER+=" --transport zeromq"
#SAMPLER+=" --transport nanomsg"
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
SAMPLER_LOG="sampler1_$LOGFILETAG"
xterm -l -lf $SAMPLER_LOG -geometry 80x23+0+0 -hold -e $VMCWORKDIR/build/bin/MQ/source/$SAMPLER &
_iMoni=0
((_oubfreqts = $_nbmoni*100 ))
while (( _iMoni < _nbmoni )); do
(( _yOffset=100*_iMoni ))
(( _iMoni += 1 ))
MONITOR="TofMonitorMcbm2018"
MONITOR+=" --id mon$_iMoni"
MONITOR+=" --severity info"
# MONITOR+=" --DebugMoni 1"
MONITOR+=" --PubFreqTs $_pubfreqts"
MONITOR+=" --PubTimeMin $_pubminsec"
MONITOR+=" --PubTimeMax $_pubmaxsec"
MONITOR+=" --channel-config name=tofcomponent,type=pull,method=connect,address=tcp://127.0.0.1:11555"
#MONITOR+=" --transport shmem"
MONITOR+=" --transport zeromq"
#MONITOR+=" --transport nanomsg"
MONITOR+=" --channel-config name=parameters,type=req,method=connect,transport=zeromq,address=tcp://127.0.0.1:11005,rateLogging=0"
MONITOR+=" --channel-config name=histogram-in,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11666"
MONITOR+=" --channel-config name=histo-conf,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11667"
MONITOR+=" --channel-config name=canvas-conf,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11668"
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
MONITOR_LOG="monit0_$_iMoni"
MONITOR_LOG+="_$LOGFILETAG"
xterm -l -lf $MONITOR_LOG -geometry 80x23+500+$_yOffset -hold -e $VMCWORKDIR/build/bin/MQ/monitor/$MONITOR &
done
PARAMETERSERVER="parmq-server"
PARAMETERSERVER+=" --id parmq-server"
PARAMETERSERVER+=" --severity info"
PARAMETERSERVER+=" --channel-name parameters"
PARAMETERSERVER+=" --channel-config name=parameters,type=rep,method=bind,transport=zeromq,address=tcp://127.0.0.1:11005,rateLogging=0"
PARAMETERSERVER+=" --first-input-name $_paramfile"
PARAMETERSERVER+=" --first-input-type ASCII"
PARAMETERSERVER+=" --libs-to-load=libCbmFlibMcbm2018" # doesn't work due to runtime problem
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
PARAMSRV_LOG="parmq_$LOGFILETAG"
xterm -l -lf $PARAMSRV_LOG -geometry 80x23+1000+0 -hold -e $VMCWORKDIR/build/bin/MQ/parmq/$PARAMETERSERVER &
HISTSERVER="MqHistoServer"
HISTSERVER+=" --id server1"
HISTSERVER+=" --severity info"
HISTSERVER+=" --histport 8081"
HISTSERVER+=" --channel-config name=histogram-in,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11666"
HISTSERVER+=" --channel-config name=histo-conf,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11667"
HISTSERVER+=" --channel-config name=canvas-conf,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11668"
# Replaces log filename Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
# with ProcessName_hostname_yyyy_mm_dd_hh_mm_ss.log
HISTSRV_LOG="server1_$LOGFILETAG"
xterm -l -lf $HISTSRV_LOG -geometry 80x23+1500+0 -hold -e $VMCWORKDIR/build/bin/MQ/histogramServer/$HISTSERVER &
......@@ -398,6 +398,7 @@ Bool_t CbmMcbm2018MonitorAlgoT0::ProcessMs(const fles::Timeslice& ts,
if (uTot < fuMinTotPulser || fuMaxTotPulser < uTot) {
fhDpbMap->Fill(fuCurrDpbIdx);
fhChannelMap->Fill(uChannelT0);
fhChanHitMap->Fill(fuDiamChanMap[uChannelT0]);
fvhDpbMapSpill[fuCurrentSpillPlot]->Fill(fuCurrDpbIdx);
fvhChannelMapSpill[fuCurrentSpillPlot]->Fill(
......@@ -791,6 +792,8 @@ Bool_t CbmMcbm2018MonitorAlgoT0::CreateHistograms() {
256,
-0.5,
255.5);
fhChanHitMap = new TH1D("fhChanHitMap", "Map of hits on T0 detector; Strip; Hits Count []", kuNbChanDiamond, -0.5,
kuNbChanDiamond - 0.5);
fhChanHitMapEvo = new TH2I("hChanHitMapEvo",
"Map of hits on T0 detector vs time in run; "
"Strip; Time in run [s]; Hits Count []",
......@@ -939,6 +942,7 @@ Bool_t CbmMcbm2018MonitorAlgoT0::CreateHistograms() {
AddHistoToVector(fhChannelMap, sFolder);
AddHistoToVector(fhHitMapEvo, sFolder);
AddHistoToVector(fhHitTotEvo, sFolder);
AddHistoToVector(fhChanHitMap, sFolder);
AddHistoToVector(fhChanHitMapEvo, sFolder);
for (UInt_t uSpill = 0; uSpill < kuNbSpillPlots; uSpill++) {
AddHistoToVector(fvhDpbMapSpill[uSpill], sFolder);
......@@ -1159,6 +1163,38 @@ Bool_t CbmMcbm2018MonitorAlgoT0::CreateHistograms() {
AddCanvasToVector(fcSummary, "canvases");
/*******************************************************************/
/*******************************************************************/
/// General summary after mapping: Hit maps, Hit rate vs time in run, error fraction vs time un run
fcSummaryMap = new TCanvas("cSummaryMap", "Hit maps, Hit rate, Error fraction", w, h);
fcSummaryMap->Divide(2, 2);
fcSummaryMap->cd(1);
gPad->SetGridx();
gPad->SetGridy();
gPad->SetLogy();
fhChanHitMap->Draw();
fcSummaryMap->cd(2);
gPad->SetGridx();
gPad->SetGridy();
gPad->SetLogz();
fhChanHitMapEvo->Draw("colz");
fcSummaryMap->cd(3);
gPad->SetGridx();
gPad->SetGridy();
gPad->SetLogy();
fhHitCntEvo->Draw();
fcSummaryMap->cd(4);
gPad->SetGridx();
gPad->SetGridy();
gPad->SetLogz();
fhErrorFractEvo->Draw("hist");
AddCanvasToVector(fcSummaryMap, "canvases");
/*******************************************************************/
/*******************************************************************/
/// General summary: Hit maps, Hit rate vs time in run, error fraction vs time un run
fcGenCntsPerMs = new TCanvas(
......
......@@ -219,6 +219,7 @@ private:
TH1* fhChannelMap = nullptr;
TH2* fhHitMapEvo = nullptr;
TH2* fhHitTotEvo = nullptr;
TH1* fhChanHitMap = nullptr;
TH2* fhChanHitMapEvo = nullptr;
std::vector<TH1*> fvhDpbMapSpill = {};
std::vector<TH1*> fvhChannelMapSpill = {};
......@@ -244,6 +245,7 @@ private:
/// Canvases
TCanvas* fcSummary = nullptr;
TCanvas* fcSummaryMap = nullptr;
TCanvas* fcHitMaps = nullptr;
TCanvas* fcGenCntsPerMs = nullptr;
TCanvas* fcSpillCounts = nullptr;
......
......@@ -516,8 +516,14 @@ void CbmMcbm2018MonitorAlgoTofPulser::ProcessHit(gdpbv100::FullMessage mess) {
Double_t dHitTime = mess.GetFullTimeNs();
// Double_t dHitTot = uTot; // in bins
if (fuPulserChannel == uRemappedChanNrInFee && fuPulserMinTot < uTot
&& uTot < fuPulserMaxTot) {
/// Hardcode TOT limits for the T0