AnalysisTree
Loading...
Searching...
No Matches
AnalysisTree::BranchConfig Class Reference

A class to store configuration of the Container. More...

#include <BranchConfig.hpp>

Inheritance diagram for AnalysisTree::BranchConfig:
Inheritance graph
Collaboration diagram for AnalysisTree::BranchConfig:
Collaboration graph

Public Member Functions

 BranchConfig (const BranchConfig &)=default
 
 BranchConfig (BranchConfig &&)=default
 
BranchConfigoperator= (BranchConfig &&)=default
 
BranchConfigoperator= (const BranchConfig &)=default
 
 BranchConfig (std::string name, DetType type, std::string title="")
 
void Print () const override
 
void PrintBranchId () const
 
ANALYSISTREE_ATTR_NODISCARD Types GetFieldType (const std::string &sField) const
 
ANALYSISTREE_ATTR_NODISCARD ShortInt_t GetFieldId (const std::string &sField) const
 
template<typename T >
void AddField (const std::string &name, const std::string &title="")
 
template<typename T >
void AddFields (const std::vector< std::string > &names, const std::string &title="")
 
template<typename T >
void AddField (const std::string &name, ShortInt_t id, const std::string &title="")
 
void RemoveField (const std::string &name)
 
void RemoveFields (const std::vector< std::string > &names)
 
void SetTitle (std::string title)
 
template<typename T >
ANALYSISTREE_ATTR_NODISCARD const MapType & GetMap () const
 
template<typename T >
ANALYSISTREE_ATTR_NODISCARD ShortInt_t GetSize () const
 
ANALYSISTREE_ATTR_NODISCARD std::string GetName () const
 
ANALYSISTREE_ATTR_NODISCARD std::string GetTitle () const
 
template<typename T >
ANALYSISTREE_ATTR_NODISCARD std::vector< std::string > GetFieldsNamesT () const
 
ANALYSISTREE_ATTR_NODISCARD size_t GetId () const
 
ANALYSISTREE_ATTR_NODISCARD DetType GetType () const
 
ANALYSISTREE_ATTR_NODISCARD BranchConfig Clone (const std::string &name, DetType type) const
 Creates a copy with different name and/or detector type.
 
ANALYSISTREE_ATTR_NODISCARD BranchConfig CloneAndMerge (const BranchConfig &attached) const
 
bool HasField (const std::string &field) const
 
- Public Member Functions inherited from AnalysisTree::VectorConfig< int >
 VectorConfig (const VectorConfig &)=default
 
 VectorConfig (const MapType &map)
 
 VectorConfig (VectorConfig &&) noexcept(std::is_nothrow_move_constructible< MapType >::value)=default
 
VectorConfigoperator= (VectorConfig &&) noexcept(std::is_nothrow_move_assignable< MapType >::value)=default
 
VectorConfigoperator= (const VectorConfig &)=default
 
void AddField (const std::string &name, const ConfigElement &field)
 
ANALYSISTREE_ATTR_NODISCARD ShortInt_t GetId (const std::string &sField) const
 
- Public Member Functions inherited from AnalysisTree::VectorConfig< float >
 VectorConfig (const VectorConfig &)=default
 
 VectorConfig (const MapType &map)
 
 VectorConfig (VectorConfig &&) noexcept(std::is_nothrow_move_constructible< MapType >::value)=default
 
VectorConfigoperator= (VectorConfig &&) noexcept(std::is_nothrow_move_assignable< MapType >::value)=default
 
VectorConfigoperator= (const VectorConfig &)=default
 
void AddField (const std::string &name, const ConfigElement &field)
 
ANALYSISTREE_ATTR_NODISCARD ShortInt_t GetId (const std::string &sField) const
 
- Public Member Functions inherited from AnalysisTree::VectorConfig< bool >
 VectorConfig (const VectorConfig &)=default
 
 VectorConfig (const MapType &map)
 
 VectorConfig (VectorConfig &&) noexcept(std::is_nothrow_move_constructible< MapType >::value)=default
 
VectorConfigoperator= (VectorConfig &&) noexcept(std::is_nothrow_move_assignable< MapType >::value)=default
 
VectorConfigoperator= (const VectorConfig &)=default
 
void AddField (const std::string &name, const ConfigElement &field)
 
ANALYSISTREE_ATTR_NODISCARD ShortInt_t GetId (const std::string &sField) const
 

Protected Member Functions

void GenerateId ()
 
void GuaranteeFieldNameVacancy (const std::string &name) const
 
 ClassDefOverride (BranchConfig, 4)
 
- Protected Member Functions inherited from AnalysisTree::VectorConfig< int >
void RemoveField (const std::string &name, int id)
 
- Protected Member Functions inherited from AnalysisTree::VectorConfig< float >
void RemoveField (const std::string &name, int id)
 
- Protected Member Functions inherited from AnalysisTree::VectorConfig< bool >
void RemoveField (const std::string &name, int id)
 

Protected Attributes

std::string name_
 
std::string title_
 
size_t id_ {0}
 
DetType type_ {DetType(UndefValueShort)}
 
- Protected Attributes inherited from AnalysisTree::VectorConfig< int >
MapType map_
 
ShortInt_t size_
 
- Protected Attributes inherited from AnalysisTree::VectorConfig< float >
MapType map_
 
ShortInt_t size_
 
- Protected Attributes inherited from AnalysisTree::VectorConfig< bool >
MapType map_
 
ShortInt_t size_
 

Additional Inherited Members

- Static Protected Member Functions inherited from AnalysisTree::VectorConfig< int >
static std::vector< std::string > SplitString (const std::string &input)
 
- Static Protected Member Functions inherited from AnalysisTree::VectorConfig< float >
static std::vector< std::string > SplitString (const std::string &input)
 
- Static Protected Member Functions inherited from AnalysisTree::VectorConfig< bool >
static std::vector< std::string > SplitString (const std::string &input)
 

Detailed Description

A class to store configuration of the Container.

Maybe better design choise would be use composition over inheritance (?)

Member Function Documentation

◆ AddField() [1/2]

template<typename T >
void AnalysisTree::BranchConfig::AddField ( const std::string & name,
const std::string & title = "" )
inlinevirtual

Reimplemented from AnalysisTree::VectorConfig< int >.

◆ AddField() [2/2]

template<typename T >
void AnalysisTree::BranchConfig::AddField ( const std::string & name,
ShortInt_t id,
const std::string & title = "" )
inlinevirtual

Reimplemented from AnalysisTree::VectorConfig< int >.

◆ AddFields()

template<typename T >
void AnalysisTree::BranchConfig::AddFields ( const std::vector< std::string > & names,
const std::string & title = "" )
inlinevirtual

Reimplemented from AnalysisTree::VectorConfig< int >.

◆ Clone()

BranchConfig AnalysisTree::BranchConfig::Clone ( const std::string & name,
DetType type ) const

Creates a copy with different name and/or detector type.

Parameters
namenew name
typenew type

◆ GetMap()

template<typename T >
ANALYSISTREE_ATTR_NODISCARD const MapType & AnalysisTree::BranchConfig::GetMap ( ) const
inlinevirtual

Reimplemented from AnalysisTree::VectorConfig< int >.

◆ GetSize()

template<typename T >
ANALYSISTREE_ATTR_NODISCARD ShortInt_t AnalysisTree::BranchConfig::GetSize ( ) const
inlinevirtual

Reimplemented from AnalysisTree::VectorConfig< int >.

◆ Print()

void AnalysisTree::BranchConfig::Print ( ) const
overridevirtual

Reimplemented from AnalysisTree::VectorConfig< int >.


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