ndmspc 0.20250304.0
Loading...
Searching...
No Matches
Ndmspc::Utils Class Reference

Utils object. More...

#include <Utils.h>

Inheritance diagram for Ndmspc::Utils:

Static Public Member Functions

static TFile * OpenFile (std::string filename, std::string mode="READ", bool createLocalDir=true)
 
static std::string OpenRawFile (std::string filename)
 
static bool SaveRawFile (std::string filename, std::string content)
 
static TMacro * OpenMacro (std::string filename)
 
static std::string GetCutsPath (json cuts)
 
static Int_t GetBinFromBase (Int_t bin, Int_t rebin, Int_t rebin_start)
 
static int SetResultValueError (json cfg, THnSparse *output, std::string name, Int_t *point, double val, double err, bool normalizeToWidth=false, bool onlyPositive=false, double times=1)
 
static std::vector< std::string > Tokenize (std::string_view input, const char delim)
 

Private Member Functions

 Utils ()
 Constructor.
 
virtual ~Utils ()
 Destructor.
 

Detailed Description

Utils object.

Author
Martin Vala mvala.nosp@m.@cer.nosp@m.n.ch

Definition at line 20 of file Utils.h.

Constructor & Destructor Documentation

◆ Utils()

Ndmspc::Utils::Utils ( )
inlineprivate

Constructor.

Definition at line 23 of file Utils.h.

◆ ~Utils()

virtual Ndmspc::Utils::~Utils ( )
inlineprivatevirtual

Destructor.

Definition at line 25 of file Utils.h.

Member Function Documentation

◆ GetBinFromBase()

Int_t Ndmspc::Utils::GetBinFromBase ( Int_t bin,
Int_t rebin,
Int_t rebin_start )
static

Returns bin from base

Definition at line 175 of file Utils.cxx.

Referenced by Ndmspc::PointRun::ApplyCuts().

◆ GetCutsPath()

std::string Ndmspc::Utils::GetCutsPath ( json cuts)
static

Get cut path from config

Definition at line 143 of file Utils.cxx.

Referenced by Ndmspc::PointDraw::DrawPoint(), Ndmspc::PointRun::Init(), and Ndmspc::PointRun::OutputFileOpen().

◆ OpenFile()

TFile * Ndmspc::Utils::OpenFile ( std::string filename,
std::string mode = "READ",
bool createLocalDir = true )
static

◆ OpenMacro()

TMacro * Ndmspc::Utils::OpenMacro ( std::string filename)
static

Open macro

Definition at line 100 of file Utils.cxx.

References OpenRawFile().

Referenced by Ndmspc::PointRun::PointRun().

◆ OpenRawFile()

std::string Ndmspc::Utils::OpenRawFile ( std::string filename)
static

Opens raw file

Definition at line 57 of file Utils.cxx.

References OpenFile().

Referenced by Ndmspc::Core::LoadConfig(), and OpenMacro().

◆ SaveRawFile()

bool Ndmspc::Utils::SaveRawFile ( std::string filename,
std::string content )
static

Save raw file

Definition at line 85 of file Utils.cxx.

References OpenFile().

Referenced by Ndmspc::Core::SaveConfig().

◆ SetResultValueError()

int Ndmspc::Utils::SetResultValueError ( json cfg,
THnSparse * output,
std::string name,
Int_t * point,
double val,
double err,
bool normalizeToWidth = false,
bool onlyPositive = false,
double times = 1 )
static

Set result value and error

Definition at line 197 of file Utils.cxx.

◆ Tokenize()

std::vector< std::string > Ndmspc::Utils::Tokenize ( std::string_view input,
const char delim )
static

Tokenize helper function

Definition at line 256 of file Utils.cxx.

Referenced by Ndmspc::PointRun::GenerateJobs(), Ndmspc::PointDraw::HighlightData(), and Ndmspc::Core::LoadConfig().


The documentation for this class was generated from the following files: