CbmRoot
|
#include <cstdint>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
class | CanvasConfig |
Functions | |
void | GetNbPadsXY (TPad *pPad, uint32_t &uNbPadsX, uint32_t &uNbPadsY) |
std::string | GenerateCanvasConfigString (TCanvas *pCanv) |
CanvasConfig | ExtractCanvasConfigFromString (std::string sFullConfig) |
Extraction. | |
CanvasConfig ExtractCanvasConfigFromString | ( | std::string | sFullConfig | ) |
Format of Can config is "NbPadX(U);NbPadY(U);ConfigPad1(s);....;ConfigPadXY(s)" Format of Pad config is "GrixX(b),GridY(b),LogX(b),LogY(b),LogZ(b),(HistoName1,DrawOptions1),...,(HistoNameZ,DrawOptionsZ)"
Temp storage
start from 0
start from 0
start from 0
Extract General config
Name
Title
Nb Pads X
Nb Pads Y
Total Nb pads to expect in config
Create output object
Loop on pads
Extract Pad config Grid X
Grid Y
Log X
Log Y
Log Z
Objects config string
Objects in pad
Remove all leftover parts before current object config
Find delimiters for each field
Extract fields
Remove extracted object and comma from config string
Prepare string for next pad if any
Load Pad config
Clear objects vectors
Return full canvas config
Definition at line 357 of file CbmFlesCanvasTools.cxx.
References CanvasConfig::SetConfig().
Referenced by cbm::services::histserv::Application::PrepareCanvas(), and CbmMqHistoServer::PrepareCanvas().
std::string GenerateCanvasConfigString | ( | TCanvas * | pCanv | ) |
Format of Can config is "Name;NbPadX(U);NbPadY(U);ConfigPad1(s);....;ConfigPadXY(s)" Format of Pad config is "GrixX(b),GridY(b),LogX(b),LogY(b),LogZ(b),(HistoName1,DrawOptions1),...,(HistoNameZ,DrawOptionsZ)" Creation
Format of Can config is "NbPadX(U);NbPadY(U);ConfigPad1(s);....;ConfigPadXY(s)" Format of Pad config is "GrixX(b),GridY(b),LogX(b),LogY(b),LogZ(b),(HistoName1,DrawOptions1),...,(HistoNameZ,DrawOptionsZ)"
Add name to config
Add title to config string
Prepare generation of Pads config
start from 1
start from 0
start from 0
Previous Canvas geom
Loop until we run out of Pads
Go in pad to update gPad
Detect unknown columns: Indices scan from left to right => increasing values
Detect unknown rows: Indices scan from top to bottom => decreasing values
Get Pad properties GridX, GridY, LogX, LogY, LogZ
Histogram(s) name and draw option
catch case of empty pad
Add closing semi-colon
Increase pad Index/Counter
Definition at line 286 of file CbmFlesCanvasTools.cxx.
Referenced by CbmDeviceMonitorPsd::InitContainers(), CbmDeviceBmonMonitor::InitHistograms(), CbmDeviceBuildDigiEvents::InitHistograms(), CbmDeviceDigiEventSink::InitHistograms(), CbmDeviceMonitorBmon::InitHistograms(), CbmDeviceMonitorReqBmon::InitHistograms(), CbmDeviceMonitorReqTof::InitHistograms(), CbmDeviceMonitorTof::InitHistograms(), CbmDeviceUnpack::InitHistograms(), CbmMQTsaMultiSampler::InitHistograms(), CbmMQTsSamplerRepReq::InitHistograms(), CbmTsConsumerReqDevExample::InitHistograms(), CbmDeviceBuildRawEvents::InitTask(), and CbmDeviceMcbmEventBuilderWin::InitTask().
void GetNbPadsXY | ( | TPad * | pPad, |
uint32_t & | uNbPadsX, | ||
uint32_t & | uNbPadsY ) |
start from 1
start from 0
start from 0
Previous Canvas geom
Loop until we run out of Pads
Go in pad to update gPad
Detect unknown columns: Indices scan from left to right => increasing values
Detect unknown rows: Indices scan from top to bottom => decreasing values
Increase pad Index/Counter
Definition at line 249 of file CbmFlesCanvasTools.cxx.