CbmRoot
CbmFlesCanvasTools.h File Reference
#include <string>
#include <vector>
Include dependency graph for CbmFlesCanvasTools.h:
This graph shows which files directly or indirectly include this file:

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. More...
 

Function Documentation

◆ ExtractCanvasConfigFromString()

CanvasConfig ExtractCanvasConfigFromString ( std::string  sFullConfig)

Extraction.

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 373 of file CbmFlesCanvasTools.cxx.

References CanvasConfig::SetConfig().

Referenced by CbmMqHistoServer::PrepareCanvas().

◆ GenerateCanvasConfigString()

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 296 of file CbmFlesCanvasTools.cxx.

Referenced by CbmDeviceMonitorT0::InitContainers(), CbmDeviceMonitorTof::InitContainers(), and CbmDeviceMcbmEventBuilderWin::InitTask().

◆ GetNbPadsXY()

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 258 of file CbmFlesCanvasTools.cxx.