294#include "TRestDataSetPlot.h"
297#include "TDirectory.h"
350 TiXmlElement* cutele =
GetElement(
"addCut", ele);
351 while (cutele !=
nullptr) {
353 if (!cutName.empty()) {
354 if (cut ==
nullptr) {
372 RESTWarning <<
"Plot metadata already initialized" <<
RESTendl;
376 while (panelele !=
nullptr) {
377 std::string active =
GetParameter(
"value", panelele,
"ON");
378 if (
ToUpper(active) !=
"ON")
continue;
383 panel.delimiter =
GetParameter(
"delimiter", panelele,
": ");
385 panel.panelCut =
ReadCut(panel.panelCut, panelele);
387 TiXmlElement* labelele =
GetElement(
"variable", panelele);
388 while (labelele !=
nullptr) {
389 std::array<std::string, 3> label;
396 panel.variablePos.push_back(std::make_pair(label, TVector2(posX, posY)));
400 TiXmlElement* metadata =
GetElement(
"metadata", panelele);
401 while (metadata !=
nullptr) {
402 std::array<std::string, 3> label;
409 panel.metadataPos.push_back(std::make_pair(label, TVector2(posX, posY)));
413 TiXmlElement* observable =
GetElement(
"observable", panelele);
414 while (observable !=
nullptr) {
415 std::array<std::string, 3> label;
422 panel.obsPos.push_back(std::make_pair(label, TVector2(posX, posY)));
426 TiXmlElement* expression =
GetElement(
"expression", panelele);
427 while (expression !=
nullptr) {
428 std::array<std::string, 4> label;
436 panel.expPos.push_back(std::make_pair(label, TVector2(posX, posY)));
452 RESTWarning <<
"Plot metadata already initialized" <<
RESTendl;
457 while (plotele !=
nullptr) {
458 std::string active =
GetParameter(
"value", plotele,
"ON");
459 if (
ToUpper(active) !=
"ON")
continue;
464 plot.logX = StringToBool(
GetParameter(
"logX", plotele,
"false"));
465 plot.logY = StringToBool(
GetParameter(
"logY", plotele,
"false"));
466 plot.logZ = StringToBool(
GetParameter(
"logZ", plotele,
"false"));
467 plot.gridY = StringToBool(
GetParameter(
"gridY", plotele,
"false"));
468 plot.gridX = StringToBool(
GetParameter(
"gridX", plotele,
"false"));
477 plot.legendOn = StringToBool(
GetParameter(
"legend", plotele,
"OFF"));
478 plot.stackDrawOption =
GetParameter(
"stackOption", plotele,
"nostack");
482 plot.timeDisplay = StringToBool(
GetParameter(
"timeDisplay", plotele,
"OFF"));
485 TiXmlElement* histele =
GetElement(
"histo", plotele);
486 if (histele ==
nullptr) {
489 while (histele !=
nullptr) {
492 hist.drawOption =
GetParameter(
"option", histele,
"colz");
493 TiXmlElement* varele =
GetElement(
"variable", histele);
494 while (varele !=
nullptr) {
507 hist.statistics = StringToBool(
GetParameter(
"stats", histele,
"OFF"));
509 hist.histoCut =
ReadCut(hist.histoCut, histele);
510 plot.histos.push_back(hist);
512 if (histele == plotele) {
529 std::vector<std::string> obsList;
532 if (
fCut !=
nullptr) {
533 const auto paramCut =
fCut->GetParamCut();
534 for (
const auto& [param, condition] : paramCut) {
535 obsList.push_back(param);
540 for (
const auto& plots :
fPlots) {
541 for (
const auto& hist : plots.histos) {
542 for (
const auto& var : hist.variable) {
543 obsList.push_back(var);
545 if (hist.histoCut ==
nullptr)
continue;
546 const auto paramCut = hist.histoCut->GetParamCut();
547 for (
const auto& [param, condition] : paramCut) {
548 obsList.push_back(param);
553 std::map<std::string, TRestDataSet::RelevantQuantity> quantity;
557 for (
auto& [key, posLabel] : panel.expPos) {
559 auto&& [exp, label,
units, precision] = key;
560 std::string text = exp;
561 while (text.find_last_of(
'[') != std::string::npos) {
562 int squareBracketCorrector = 0;
563 size_t posOpen = text.find_last_of(
'[');
564 size_t posClose = text.find_first_of(
']', posOpen);
566 if (text[posOpen - 1] ==
'[') {
567 squareBracketCorrector = 1;
570 std::string varOrMeta = text.substr(posOpen - squareBracketCorrector,
571 posClose + 1 - posOpen + 2 * squareBracketCorrector);
572 if (squareBracketCorrector == 0) {
578 quantity[label] = quant;
580 text =
Replace(text, varOrMeta,
"1");
584 while (text.find(
"_") != std::string::npos) {
585 size_t pos_ = text.find(
"_");
586 size_t beginning = text.find_last_of(
" -+*/)(^%", pos_) + 1;
587 size_t end = text.find_first_of(
" -+*/)(^%", pos_);
588 std::string obs = text.substr(beginning, end - beginning);
589 text =
Replace(text, obs,
"1");
590 obsList.push_back(obs);
594 RESTWarning <<
"The expression " << exp
595 <<
" has not been correctly parsed into variables, metadata and observables"
600 for (
auto& [key, posLabel] : panel.obsPos) {
601 auto&& [obs, label,
units] = key;
602 obsList.push_back(obs);
605 for (
auto& [key, posLabel] : panel.metadataPos) {
606 auto&& [metadata, label,
units] = key;
610 quantity[label] = quant;
615 std::sort(obsList.begin(), obsList.end());
616 obsList.erase(std::unique(obsList.begin(), obsList.end()), obsList.end());
618 dataSet.SetObservablesList(obsList);
619 dataSet.SetQuantity(quantity);
629 dataSet.EnableMultiThreading(
true);
635 if (dataSet.
GetTree() ==
nullptr) {
636 RESTWarning <<
"Cannot import dataSet, trying to generate it with pattern " <<
fDataSetName
638 RESTWarning <<
"Note that the generation of a dataSet inside TRestDataSetPlot is deplecated. Check "
639 "TRestDataSet documentation to generate a dataSet"
642 if (dataSet.
GetTree() ==
nullptr) {
643 RESTError <<
"Cannot generate dataSet " <<
RESTendl;
652 combinedCanvas.Divide((Int_t)fCanvasDivisions.X(), (Int_t)fCanvasDivisions.Y(),
653 fCanvasDivisionMargins.X(), fCanvasDivisionMargins.Y());
658 const double startTime = dataSet.GetStartTime();
659 const double endTime = dataSet.GetEndTime();
662 std::map<std::string, std::string> paramMap;
667 const auto quantity = dataSet.GetQuantity();
672 combinedCanvas.cd(canvasIndex);
674 auto dataFrame = dataSet.
MakeCut(panel.panelCut);
675 const int entries = *dataFrame.Count();
676 const double meanRate = entries / duration;
677 const double runLength = duration / 3600.;
682 paramMap[
"[[cutNames]]"] =
"";
683 paramMap[
"[[cuts]]"] =
"";
685 for (
const auto& cut :
fCut->GetCuts()) {
686 if (paramMap[
"[[cutNames]]"].empty())
687 paramMap[
"[[cutNames]]"] += cut.GetName();
689 paramMap[
"[[cutNames]]"] +=
"," + (std::string)cut.GetName();
690 if (paramMap[
"[[cuts]]"].empty())
691 paramMap[
"[[cuts]]"] += cut.GetTitle();
693 paramMap[
"[[cuts]]"] +=
" && " + (std::string)cut.GetTitle();
697 paramMap[
"[[panelCutNames]]"] =
"";
698 paramMap[
"[[panelCuts]]"] =
"";
699 if (panel.panelCut) {
700 for (
const auto& cut : panel.panelCut->GetCuts()) {
701 if (paramMap[
"[[panelCutNames]]"].empty())
702 paramMap[
"[[panelCutNames]]"] += cut.GetName();
704 paramMap[
"[[panelCutNames]]"] +=
"," + (std::string)cut.GetName();
705 if (paramMap[
"[[panelCuts]]"].empty())
706 paramMap[
"[[panelCuts]]"] += cut.GetTitle();
708 paramMap[
"[[panelCuts]]"] +=
" && " + (std::string)cut.GetTitle();
712 RESTInfo <<
"Global cuts: " << paramMap[
"[[cuts]]"] <<
RESTendl;
713 if (!paramMap[
"[[panelCuts]]"].empty())
714 RESTInfo <<
"Additional panel cuts: " << paramMap[
"[[panelCuts]]"] <<
RESTendl;
717 for (
const auto& [key, posLabel] : panel.variablePos) {
718 auto&& [variable, label,
units] = key;
720 std::string var = variable;
722 for (
const auto& [param, val] : paramMap) {
725 var =
Replace(var, param, val, pos);
730 if (!found) RESTWarning <<
"Variable " << variable <<
" not found" <<
RESTendl;
733 if (var.find(
'.') == std::string::npos) {
735 var = StringWithPrecision(dblVar, panel.precision);
738 var = StringWithPrecision(dblVar, panel.precision);
742 label + panel.delimiter.Data() + StringWithPrecision(var, panel.precision) +
" " +
units;
743 panel.text.emplace_back(
new TLatex(posLabel.X(), posLabel.Y(), lab.c_str()));
747 for (
const auto& [key, posLabel] : panel.metadataPos) {
748 auto&& [metadata, label,
units] = key;
749 std::string value =
"";
751 for (
const auto& [name, quant] : quantity) {
752 if (quant.metadata == metadata) value = quant.value;
756 RESTWarning <<
"Metadata quantity " << metadata <<
" not found in dataSet" <<
RESTendl;
761 label + panel.delimiter.Data() + StringWithPrecision(value, panel.precision) +
" " +
units;
762 panel.text.emplace_back(
new TLatex(posLabel.X(), posLabel.Y(), lab.c_str()));
766 for (
const auto& [key, posLabel] : panel.obsPos) {
767 auto&& [obs, label,
units] = key;
768 auto value = *dataFrame.Mean(obs);
771 label + panel.delimiter.Data() + StringWithPrecision(value, panel.precision) +
" " +
units;
772 panel.text.emplace_back(
new TLatex(posLabel.X(), posLabel.Y(), lab.c_str()));
776 for (
const auto& [key, posLabel] : panel.expPos) {
777 auto&& [text, label,
units, precision] = key;
778 std::string var = text;
781 std::vector<std::string> subtexts;
782 while (var.find_last_of(
'{') != std::string::npos) {
783 size_t posOpen = var.find_last_of(
'{');
784 size_t posClose = var.find_first_of(
'}', posOpen);
785 if (posClose == std::string::npos) {
786 RESTWarning <<
"Unmatched { in expression: " << var <<
RESTendl;
789 std::string subtext = var.substr(posOpen + 1, posClose - posOpen - 1);
790 subtexts.push_back(subtext);
792 var.erase(posOpen, posClose - posOpen + 1);
797 std::vector<std::string> precisionParts;
798 for (
const auto& part :
Split(precision,
",",
false,
true)) {
799 precisionParts.push_back(part);
801 if (precisionParts.size() != subtexts.size()) {
802 RESTDebug <<
"Not enough precision values provided for the expression: `" << text
803 <<
"`. Using " << precisionParts.back() <<
" for last subtexts." <<
RESTendl;
804 precisionParts.resize(subtexts.size(), precisionParts.back());
807 size_t precisionIndex = precisionParts.size() - 1;
808 for (
const auto& subtext : subtexts) {
809 std::string subVar = subtext;
811 for (
const auto& [param, val] : paramMap) {
812 subVar =
Replace(subVar, param, val);
815 for (
const auto& [name, quant] : quantity) {
816 subVar =
Replace(subVar,
"[" + name +
"]", quant.value);
817 subVar =
Replace(subVar, name, quant.value);
820 for (
const auto& obs : dataFrame.GetColumnNames()) {
821 if (var.find(obs) == std::string::npos)
continue;
824 double value = *dataFrame.Mean(obs);
827 subVar =
Replace(subVar,
"[",
"(");
828 subVar =
Replace(subVar,
"]",
")");
832 std::string prec = precisionParts[precisionIndex--];
833 if (prec.find(
'%') != std::string::npos) {
838 RESTWarning <<
"Unknown precision format: " << prec
839 <<
". Using panels precision: " << panel.precision <<
RESTendl;
840 subVar = StringWithPrecision(value, panel.precision);
843 var =
Replace(var,
"{" + subtext +
"}", subVar);
846 std::string lab = label + panel.delimiter.Data() + var +
" " +
units;
847 panel.text.emplace_back(
new TLatex(posLabel.X(), posLabel.Y(), lab.c_str()));
851 for (
const auto& text : panel.text) {
852 text->SetTextColor(1);
853 text->SetTextSize(panel.font_size);
859 for (
auto& plots :
fPlots) {
861 combinedCanvas.cd(canvasIndex);
862 plots.hs =
new THStack(plots.name.c_str(), plots.title.c_str());
863 if (plots.legendOn) plots.legend =
new TLegend(
fLegendX1, fLegendY1, fLegendX2, fLegendY2);
865 for (
auto& hist : plots.histos) {
866 auto dataFrame = dataSet.
MakeCut(hist.histoCut);
867 if (hist.variable.front() ==
"timeStamp") {
868 hist.range.front().SetX(startTime);
869 hist.range.front().SetY(endTime);
872 if (hist.variable.size() == 1) {
873 auto histo = dataFrame.Histo1D({hist.name.c_str(), hist.name.c_str(), hist.nBins.front(),
874 hist.range.front().X(), hist.range.front().Y()},
875 hist.variable.front());
876 hist.histo =
static_cast<TH1*
>(histo->DrawClone());
878 }
else if (hist.variable.size() == 2) {
879 auto histo = dataFrame.Histo2D(
880 {hist.name.c_str(), hist.name.c_str(), hist.nBins.front(), hist.range.front().X(),
881 hist.range.front().Y(), hist.nBins.back(), hist.range.back().X(), hist.range.back().Y()},
882 hist.variable.front(), hist.variable.back());
883 hist.histo =
static_cast<TH1*
>(histo->DrawClone());
885 RESTError <<
"Only 1D or 2D histograms are supported " <<
RESTendl;
888 hist.histo->SetLineColor(hist.lineColor);
889 hist.histo->SetLineWidth(hist.lineWidth);
890 hist.histo->SetLineStyle(hist.lineStyle);
891 hist.histo->SetFillColor(hist.fillColor);
892 hist.histo->SetFillStyle(hist.fillStyle);
894 if (hist.statistics) {
895 hist.histo->SetStats(
true);
897 combinedCanvas.Update();
899 hist.histo->SetStats(
false);
902 if (plots.normalize > 0) {
903 const double integral = hist.histo->Integral();
904 if (integral > 0) hist.histo->Scale(plots.normalize / integral);
907 if (plots.scale !=
"") {
908 std::string inputScale = plots.scale;
909 double binSize = hist.histo->GetXaxis()->GetBinWidth(1);
910 double entries = hist.histo->GetEntries();
912 double integral = hist.histo->Integral(
"width");
919 std::string scale =
"1./(" + inputScale +
")";
924 plots.hs->Add(hist.histo, hist.drawOption.c_str());
926 if (plots.legend !=
nullptr) plots.legend->AddEntry(hist.histo, hist.histo->GetName(),
"lf");
931 for (
auto& plots :
fPlots) {
932 if (plots.hs ==
nullptr)
continue;
934 TPad* targetPad = (TPad*)combinedCanvas.cd(canvasIndex);
935 targetPad->SetLogx(plots.logX);
936 targetPad->SetLogy(plots.logY);
937 targetPad->SetLogz(plots.logZ);
938 targetPad->SetGridx(plots.gridX);
939 targetPad->SetGridy(plots.gridY);
940 targetPad->SetLeftMargin(plots.marginLeft);
941 targetPad->SetRightMargin(plots.marginRight);
942 targetPad->SetBottomMargin(plots.marginBottom);
943 targetPad->SetTopMargin(plots.marginTop);
946 plots.hs->Draw(plots.stackDrawOption.c_str());
947 plots.hs->GetXaxis()->SetTitle(plots.labelX.c_str());
948 plots.hs->GetYaxis()->SetTitle(plots.labelY.c_str());
949 plots.hs->GetXaxis()->SetLabelSize(1.1 * plots.hs->GetXaxis()->GetLabelSize());
950 plots.hs->GetYaxis()->SetLabelSize(1.1 * plots.hs->GetYaxis()->GetLabelSize());
951 plots.hs->GetXaxis()->SetTitleSize(1.1 * plots.hs->GetXaxis()->GetTitleSize());
952 plots.hs->GetYaxis()->SetTitleSize(1.1 * plots.hs->GetYaxis()->GetTitleSize());
954 if (plots.timeDisplay) plots.hs->GetXaxis()->SetTimeDisplay(1);
955 if (plots.legend !=
nullptr) plots.legend->Draw();
958 combinedCanvas.Update();
964 combinedCanvas.Resize();
969 for (
auto& plots :
fPlots) {
970 if (plots.save.empty())
continue;
971 std::unique_ptr<TCanvas> canvas(
new TCanvas());
972 canvas->SetLogx(plots.logX);
973 canvas->SetLogy(plots.logY);
974 canvas->SetLogz(plots.logZ);
975 canvas->SetGridx(plots.gridX);
976 canvas->SetGridy(plots.gridY);
977 canvas->SetLeftMargin(plots.marginLeft);
978 canvas->SetRightMargin(plots.marginRight);
979 canvas->SetBottomMargin(plots.marginBottom);
980 canvas->SetTopMargin(plots.marginTop);
981 plots.hs->Draw(plots.stackDrawOption.c_str());
982 canvas->Print(plots.save.c_str());
987 for (
const auto& [name, quant] : quantity) {
994 std::unique_ptr<TFile> f(TFile::Open(
fOutputFileName.c_str(),
"UPDATE"));
995 for (
auto& plots :
fPlots) {
996 for (
auto& hist : plots.histos) {
1012 for (
auto& plots :
fPlots) {
1013 for (
auto& hist : plots.histos) {
1017 delete plots.legend;
1021 for (
auto& text : panel.text) {
1034 if (in.find_first_not_of(
"0123456789") == std::string::npos) {
1037 auto it = mapStr.find(in);
1038 if (it != mapStr.end()) {
1041 RESTWarning <<
"cannot find ID with name \"" << in <<
"\"" <<
RESTendl;
1056 RESTMetadata <<
"Canvas divisions: (" << fCanvasDivisions.X() <<
" ," << fCanvasDivisions.Y() <<
")"
1058 RESTMetadata <<
"-------------------" <<
RESTendl;
1059 for (
const auto& plot :
fPlots) {
1060 RESTMetadata <<
"-------------------" <<
RESTendl;
1061 RESTMetadata <<
"Plot name/title: " << plot.name <<
" " << plot.title <<
RESTendl;
1062 RESTMetadata <<
"Save string: " << plot.save <<
RESTendl;
1063 RESTMetadata <<
"Set log X,Y,Z: " << plot.logX <<
", " << plot.logY <<
", " << plot.logZ <<
RESTendl;
1064 RESTMetadata <<
"Stack draw Option: " << plot.stackDrawOption <<
RESTendl;
1065 if (plot.legend) RESTMetadata <<
"Legend is ON" <<
RESTendl;
1066 if (plot.timeDisplay) RESTMetadata <<
"Time display is ON" <<
RESTendl;
1067 RESTMetadata <<
"Labels X,Y: " << plot.labelX <<
", " << plot.labelY <<
RESTendl;
1068 for (
const auto& hist : plot.histos) {
1069 RESTMetadata <<
"****************" <<
RESTendl;
1070 RESTMetadata <<
"Histo name: " << hist.name <<
RESTendl;
1071 RESTMetadata <<
"Draw Option: " << hist.drawOption <<
RESTendl;
1072 RESTMetadata <<
"Histogram size: " << hist.variable.size() <<
" with parameters:" <<
RESTendl;
1073 for (
size_t i = 0; i < hist.variable.size(); i++) {
1074 RESTMetadata <<
"\t" << i <<
" " << hist.variable[i] <<
", " << hist.nBins[i] <<
", "
1075 << hist.range[i].X() <<
", " << hist.range[i].Y() <<
RESTendl;
1077 RESTMetadata <<
"****************" <<
RESTendl;
1080 RESTMetadata <<
"-------------------" <<
RESTendl;
1082 RESTMetadata <<
"-------------------" <<
RESTendl;
1083 RESTMetadata <<
"Panel font size/precision " << panel.font_size <<
", " << panel.precision
1085 RESTMetadata <<
"****************" <<
RESTendl;
1086 for (
auto& [key, posLabel] : panel.variablePos) {
1087 auto&& [obs, label,
units] = key;
1088 RESTMetadata <<
"Label variable " << obs <<
", label " << label <<
", units " <<
units <<
" Pos ("
1089 << posLabel.X() <<
", " << posLabel.Y() <<
")" <<
RESTendl;
1091 RESTMetadata <<
"****************" <<
RESTendl;
1092 for (
auto& [key, posLabel] : panel.metadataPos) {
1093 auto&& [obs, label,
units] = key;
1094 RESTMetadata <<
"Label metadata " << obs <<
", label " << label <<
", units " <<
units <<
" Pos ("
1095 << posLabel.X() <<
", " << posLabel.Y() <<
")" <<
RESTendl;
1097 RESTMetadata <<
"****************" <<
RESTendl;
1098 for (
auto& [key, posLabel] : panel.obsPos) {
1099 auto&& [obs, label,
units] = key;
1100 RESTMetadata <<
"Label Observable " << obs <<
", label " << label <<
", units " <<
units
1101 <<
" Pos (" << posLabel.X() <<
", " << posLabel.Y() <<
")" <<
RESTendl;
1103 RESTMetadata <<
"****************" <<
RESTendl;
1104 for (
auto& [key, posLabel] : panel.expPos) {
1105 auto&& [obs, label,
units, precision] = key;
1106 RESTMetadata <<
"Label Expression " << obs <<
", label " << label <<
", units " <<
units
1107 <<
", precision " << precision <<
" Pos (" << posLabel.X() <<
", " << posLabel.Y()
1110 RESTMetadata <<
"****************" <<
RESTendl;
1112 RESTMetadata <<
"-------------------" <<
RESTendl;
A class to help on cuts definitions. To be used with TRestAnalysisTree.
Perform the plot over datasets.
Int_t GetIDFromMapString(const std::map< std::string, int > &mapStr, const std::string &in)
This functions gets the ID from a map string that is passed by reference. It is used to translate col...
std::vector< PanelInfo > fPanels
Vector with panels/label options.
TRestCut * ReadCut(TRestCut *cut, TiXmlElement *ele=nullptr)
this function is used to add the different cuts provided in different metadata sections,...
void Initialize() override
Function to initialize input/output event members and define the section name.
void PlotCombinedCanvas()
This functions performs the plot of the combined canvas with the different panels and plots.
const std::map< std::string, int > LineStyleMap
LineStyleMap as enum "ELineStyle" defined in TAttLine.h.
std::string fDataSetName
Name of the dataset to be imported.
void ReadPlotInfo()
This function reads the config file plot info and stores it in a vector of PlotInfo.
void ReadPanelInfo()
This function reads the config file panel info and stores it in a vector of PanelInfo.
void GenerateDataSetFromFilePattern(TRestDataSet &dataSet)
This functions generates a dataSet based on the information of the rml file. A TRestDataSet is pased ...
Int_t fPaletteStyle
Palette style.
const std::map< std::string, int > FillStyleMap
FillStyleMap as enum "EFillStyle" defined in TAttFill.h.
TRestDataSetPlot()
Default constructor.
TRestCut * fCut
Global cut for the entire dataSet.
Bool_t fPreviewPlot
Preview plot.
const std::map< std::string, int > ColorIdMap
Maps for internal use only.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestDataSetPlot.
TVector2 fCanvasSize
Canvas options, size, divisions and margins.
std::string fOutputFileName
OutputFileName.
~TRestDataSetPlot()
Default destructor.
Double_t fLegendX1
Legend position and size.
std::vector< PlotInfo > fPlots
Vector with plots/pads options.
void InitFromConfigFile() override
Initialization of specific TRestDataSetPlot members through an RML file.
void CleanUp()
Clean up histos and text but note that the metadata is unchanged.
It allows to group a number of runs that satisfy given metadata conditions.
void Import(const std::string &fileName)
This function imports metadata from a root file it import metadata info from the previous dataSet whi...
Double_t GetTotalTimeInSeconds() const
It returns the accumulated run time in seconds.
ROOT::RDF::RNode MakeCut(const TRestCut *cut)
This function applies a TRestCut to the dataframe and returns a dataframe with the applied cuts....
void GenerateDataSet()
This function generates the data frame with the filelist and column names (or observables) that have ...
TTree * GetTree() const
Gives access to the tree.
@ REST_Info
+show most of the information for each steps
Int_t GetChar(std::string hint="Press a KEY to continue ...")
Helps to pause the program, printing a message before pausing.
std::string IntegerToString(Int_t n, std::string format="%d")
Gets a string from an integer.
std::vector< std::string > Split(std::string in, std::string separator, bool allowBlankString=false, bool removeWhiteSpaces=false, int startPos=-1)
Split the input string according to the given separator. Returning a vector of fragments.
Double_t StringToDouble(std::string in)
Gets a double from a string.
std::string ToUpper(std::string in)
Convert string to its upper case. Alternative of TString::ToUpper.
Int_t StringToInteger(std::string in)
Gets an integer from a string.
Int_t isAExpression(const std::string &in)
Returns 1 only if valid mathematical expression keywords (or numbers) are found in the string in....
std::string DoubleToString(Double_t d, std::string format="%8.6e")
Gets a string from a double.
TVector2 StringTo2DVector(std::string in)
Gets a 2D-vector from a string.
std::string EvaluateExpression(std::string exp)
Evaluates a complex numerical expression and returns the resulting value using TFormula.
Int_t isANumber(std::string in)
Returns 1 only if a valid number is found in the string in. If not it returns 0.
std::string RemoveWhiteSpaces(std::string in)
Returns the input string removing all white spaces.
std::string ToDateTimeString(time_t time)
Format time_t into string.
std::string Replace(std::string in, std::string thisString, std::string byThisString, size_t fromPosition=0, Int_t N=0)
Replace any occurences of thisSring by byThisString inside string in.
Nested classes for internal use only.
Auxiliary class for panels/labels.
Auxiliary struct for plots/pads.
std::string metadata
The associated metadata member used to register the relevant quantity.
std::string strategy
It determines how to produce the relevant quantity (accumulate/unique/last/max/min)