Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
JSONIOUtils.cxx File Reference
#include "JSONIOUtils.h"
#include <RooAbsLValue.h>
#include <RooArgList.h>
#include <RooCategory.h>
#include <RooConstVar.h>
#include <RooDataHist.h>
#include <RooSuperCategory.h>
#include <RooWorkspace.h>
#include <RooStats/HistFactory/ParamHistFunc.h>
#include <RooFitHS3/RooJSONFactoryWSTool.h>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <set>
#include <sstream>
#include <string>
#include <utility>
Include dependency graph for JSONIOUtils.cxx:

Functions

void checkParamHistFuncOrderIsDefined (RooFit::HS3::Version const &version, RooAbsCollection const &vars, std::string const &context)
 
bool endsWith (std::string_view str, std::string_view suffix)
 
std::unique_ptr< RooArgSet > histogramVariablesNamedAfterObservables (RooDataHist const &dh, RooArgSet const &histObs, RooArgSet const &funcObs)
 
bool isLiteralConstVar (RooAbsArg const &arg)
 
bool isLiteralIdentifier (std::string_view name)
 
std::vector< RooAbsReal * > paramHistFuncParamsInBinOrder (ParamHistFunc const &func)
 
std::string removeSuffix (std::string_view str, std::string_view suffix)
 
std::vector< RooCategory const * > selectionColumns (RooAbsCategory const &indexCat)
 
std::vector< RooCategory const * > selectionColumns (RooAbsCollection const &vars)
 
std::vector< std::vector< std::string > > selectionKeys (std::vector< RooCategory const * > const &columns)
 
std::string selectionKeyToString (std::vector< std::string > const &key)
 
std::string selectionLabel (RooAbsCategory const &indexCat, std::vector< RooCategory const * > const &columns, std::vector< std::string > const &key)
 
std::string selectionLabel (std::vector< std::string > const &key)
 
bool startsWith (std::string_view str, std::string_view prefix)
 
std::optional< double > toNumber (const std::string &str)
 
RooArgList toParamHistFuncOrder (RooArgList const &paramsInBinOrder, RooAbsCollection const &vars)
 
std::string transformedArgument (RooAbsReal const &param)
 
std::string transformedBaseName (RooAbsReal const &param)
 
std::string transformedOriginal (std::string_view name, std::string_view suffix)
 
void writeReference (JSONNode &node, RooAbsArg const &arg)
 

Function Documentation

◆ checkParamHistFuncOrderIsDefined()

void checkParamHistFuncOrderIsDefined ( RooFit::HS3::Version const & version,
RooAbsCollection const & vars,
std::string const & context )

Definition at line 225 of file JSONIOUtils.cxx.

◆ endsWith()

bool endsWith ( std::string_view str,
std::string_view suffix )

Definition at line 55 of file JSONIOUtils.cxx.

◆ histogramVariablesNamedAfterObservables()

std::unique_ptr< RooArgSet > histogramVariablesNamedAfterObservables ( RooDataHist const & dh,
RooArgSet const & histObs,
RooArgSet const & funcObs )

Definition at line 182 of file JSONIOUtils.cxx.

◆ isLiteralConstVar()

bool isLiteralConstVar ( RooAbsArg const & arg)

Definition at line 35 of file JSONIOUtils.cxx.

◆ isLiteralIdentifier()

bool isLiteralIdentifier ( std::string_view name)

Definition at line 138 of file JSONIOUtils.cxx.

◆ paramHistFuncParamsInBinOrder()

std::vector< RooAbsReal * > paramHistFuncParamsInBinOrder ( ParamHistFunc const & func)

Definition at line 198 of file JSONIOUtils.cxx.

◆ removeSuffix()

std::string removeSuffix ( std::string_view str,
std::string_view suffix )

Definition at line 60 of file JSONIOUtils.cxx.

◆ selectionColumns() [1/2]

std::vector< RooCategory const * > selectionColumns ( RooAbsCategory const & indexCat)

Definition at line 247 of file JSONIOUtils.cxx.

◆ selectionColumns() [2/2]

std::vector< RooCategory const * > selectionColumns ( RooAbsCollection const & vars)

Definition at line 270 of file JSONIOUtils.cxx.

◆ selectionKeys()

std::vector< std::vector< std::string > > selectionKeys ( std::vector< RooCategory const * > const & columns)

Definition at line 282 of file JSONIOUtils.cxx.

◆ selectionKeyToString()

std::string selectionKeyToString ( std::vector< std::string > const & key)

Definition at line 310 of file JSONIOUtils.cxx.

◆ selectionLabel() [1/2]

std::string selectionLabel ( RooAbsCategory const & indexCat,
std::vector< RooCategory const * > const & columns,
std::vector< std::string > const & key )

Definition at line 319 of file JSONIOUtils.cxx.

◆ selectionLabel() [2/2]

std::string selectionLabel ( std::vector< std::string > const & key)

Definition at line 298 of file JSONIOUtils.cxx.

◆ startsWith()

bool startsWith ( std::string_view str,
std::string_view prefix )

Definition at line 50 of file JSONIOUtils.cxx.

◆ toNumber()

std::optional< double > toNumber ( const std::string & str)

Definition at line 25 of file JSONIOUtils.cxx.

◆ toParamHistFuncOrder()

RooArgList toParamHistFuncOrder ( RooArgList const & paramsInBinOrder,
RooAbsCollection const & vars )

Definition at line 207 of file JSONIOUtils.cxx.

◆ transformedArgument()

std::string transformedArgument ( RooAbsReal const & param)

Definition at line 110 of file JSONIOUtils.cxx.

◆ transformedBaseName()

std::string transformedBaseName ( RooAbsReal const & param)

Definition at line 120 of file JSONIOUtils.cxx.

◆ transformedOriginal()

std::string transformedOriginal ( std::string_view name,
std::string_view suffix )

Definition at line 143 of file JSONIOUtils.cxx.

◆ writeReference()

void writeReference ( JSONNode & node,
RooAbsArg const & arg )

Definition at line 41 of file JSONIOUtils.cxx.