![]() |
MaCh3
2.4.2
Reference Guide
|
Definitions of generic parameter structs and utility templates for MaCh3. More...
#include <set>#include <list>#include <unordered_map>#include "Manager/MaCh3Exception.h"#include "Manager/MaCh3Logger.h"#include "Manager/Core.h"#include "TSpline.h"#include "TObjString.h"#include "TFile.h"#include "TF1.h"#include "TH2Poly.h"#include "TH1.h"Go to the source code of this file.
Classes | |
| struct | TypeParameterBase |
| Base class storing info for parameters types, helping unify codebase. More... | |
| struct | NormParameter |
| ETA - Normalisations for cross-section parameters Carrier for whether you want to apply a systematic to an event or not. More... | |
| struct | FunctionalParameter |
| HH - Functional parameters Carrier for whether you want to apply a systematic to an event or not. More... | |
| struct | SplineParameter |
| KS: Struct holding info about Spline Systematics. More... | |
| struct | OscillationParameter |
| KS: Struct holding info about oscillation Systematics. More... | |
Typedefs | |
| using | FuncParFuncType = std::function< void(const double *, std::size_t)> |
| HH - a shorthand type for funcpar functions. More... | |
Enumerations | |
| enum | RespFuncType { kTSpline3_red , kTF1_red , kRespFuncTypes } |
| Make an enum of the spline interpolation type. More... | |
| enum | SplineInterpolation { kTSpline3 , kLinear , kMonotonic , kAkima , kKochanekBartels , kLinearFunc , kSplineInterpolations } |
| Make an enum of the spline interpolation type. More... | |
| enum | SystType { kNorm , kSpline , kFunc , kOsc , kSystTypes } |
Functions | |
| template<typename T , size_t N> | |
| std::vector< T > | MakeVector (const T(&data)[N]) |
| Template to make vector out of an array of any length. More... | |
| template<typename T > | |
| void | CleanVector (T &) |
| Base case: do nothing for non-vector types. More... | |
| template<typename T > | |
| void | CleanVector (std::vector< T > &v) |
| Recursively releases memory held by a std::vector (including nested). More... | |
| template<typename T > | |
| void | CleanContainer (T &) |
| Base case: do nothing for non-pointer types. More... | |
| template<typename T > | |
| void | CleanContainer (T *&ptr) |
| Deletes an owned raw pointer and nulls it. More... | |
| template<typename T > | |
| void | CleanContainer (std::vector< T > &container) |
| Recursively deletes elements stored as pointers inside containers and releases the container capacity. More... | |
| std::string | GetTF1 (const SplineInterpolation i) |
| Get function for TF1_red. More... | |
| RespFuncType | SplineInterpolation_ToRespFuncType (const SplineInterpolation i) |
| Convert a RespFuncType type to a SplineInterpolation. More... | |
| std::string | SplineInterpolation_ToString (const SplineInterpolation i) |
| Convert a LLH type to a string. More... | |
| std::string | SystType_ToString (const SystType i) |
| Convert a Syst type type to a string. More... | |
Definitions of generic parameter structs and utility templates for MaCh3.
Definition in file ParameterStructs.h.
| using FuncParFuncType = std::function<void (const double*, std::size_t)> |
HH - a shorthand type for funcpar functions.
Definition at line 134 of file ParameterStructs.h.
| enum RespFuncType |
Make an enum of the spline interpolation type.
| Enumerator | |
|---|---|
| kTSpline3_red | Uses TSpline3_red for interpolation. |
| kTF1_red | Uses TF1_red for interpolation. |
| kRespFuncTypes | This only enumerates. |
Definition at line 169 of file ParameterStructs.h.
| enum SplineInterpolation |
Make an enum of the spline interpolation type.
Definition at line 176 of file ParameterStructs.h.
| enum SystType |
Make an enum of systematic type recognised by covariance class
| Enumerator | |
|---|---|
| kNorm | For normalisation parameters. |
| kSpline | For splined parameters (1D) |
| kFunc | For functional parameters. |
| kOsc | For oscillation parameters. |
| kSystTypes | This only enumerates. |
Definition at line 279 of file ParameterStructs.h.
| void CleanContainer | ( | std::vector< T > & | container | ) |
Recursively deletes elements stored as pointers inside containers and releases the container capacity.
This is required for structures like std::vector<T*> or deeply nested pointer containers. Without deleting first, memory is leaked; without shrink_to_fit(), capacity is retained.
Definition at line 86 of file ParameterStructs.h.
| void CleanContainer | ( | T & | ) |
Base case: do nothing for non-pointer types.
Definition at line 64 of file ParameterStructs.h.
| void CleanContainer | ( | T *& | ptr | ) |
Deletes an owned raw pointer and nulls it.
Only use when ownership is explicit (allocated with new).
Definition at line 72 of file ParameterStructs.h.
| void CleanVector | ( | std::vector< T > & | v | ) |
Recursively releases memory held by a std::vector (including nested).
Recursively clears a vector and requests release of its unused capacity. clear() or vec = {} only destroy elements but keep the allocated buffer. For deeply nested vectors we must clean children first, then call shrink_to_fit() to ask the implementation to return the capacity.
Definition at line 52 of file ParameterStructs.h.
| void CleanVector | ( | T & | ) |
|
inline |
Get function for TF1_red.
| i | Interpolation type |
Definition at line 189 of file ParameterStructs.h.
| std::vector<T> MakeVector | ( | const T(&) | data[N] | ) |
Template to make vector out of an array of any length.
Definition at line 35 of file ParameterStructs.h.
|
inline |
Convert a RespFuncType type to a SplineInterpolation.
| i | Interpolation type |
Definition at line 215 of file ParameterStructs.h.
|
inline |
Convert a LLH type to a string.
Definition at line 242 of file ParameterStructs.h.
|
inline |