Project
Loading...
Searching...
No Matches
o2::framework::MakeRootTreeWriterSpec::BranchDefinition< T > Struct Template Reference

#include <MakeRootTreeWriterSpec.h>

Inherits o2::framework::RootTreeWriter::BranchDef< T, InputSpec, KeyExtractor >.

Public Member Functions

template<typename KeyType , typename Arg = const char*, std::enable_if_t< StringAssignable< Arg >::value, int > = 0>
 BranchDefinition (KeyType &&key, std::string _branchName, Arg _optionKey="")
 
template<typename KeyType , typename Arg = const char*, std::enable_if_t< StringAssignable< Arg >::value, int > = 0>
 BranchDefinition (KeyType &&key, std::string _branchName, int _nofBranches, Arg _optionKey="")
 
template<typename KeyType , typename Arg , typename... Args, std::enable_if_t< StringAssignable< Arg >::value, int > = 0>
 BranchDefinition (KeyType key, std::string _branchName, Arg &&_optionKey, Args &&... args)
 
template<typename KeyType , typename Arg , typename... Args, std::enable_if_t<!StringAssignable< Arg >::value, int > = 0>
 BranchDefinition (KeyType key, std::string _branchName, Arg &&arg, Args &&... args)
 constructor, the argument pack is simply forwarded to base class
 
- Public Member Functions inherited from o2::framework::RootTreeWriter::BranchDef< T, InputSpec, KeyExtractor >
 BranchDef (key_type key, std::string _branchName, size_t _nofBranches=1)
 
 BranchDef (key_type key, std::string _branchName, Args &&... args)
 
 BranchDef (std::vector< key_type > vec, std::string _branchName, Args &&... args)
 
void init (Arg &&arg, Args &&... args)
 recursively init member variables from parameter pack
 
void assertNoMatchingType (Arg &&arg)
 

Public Attributes

std::string optionKey = ""
 key for command line option
 
- Public Attributes inherited from o2::framework::RootTreeWriter::BranchDef< T, InputSpec, KeyExtractor >
std::vector< key_typekeys
 
std::string branchName
 
size_t nofBranches
 number of branches controlled by this definition for the same type
 
IndexExtractor getIndex
 extractor function for the index for parallel branches
 
BranchNameMapper getName
 get name of branch from base name and index
 
BranchCallback callback
 

Additional Inherited Members

- Public Types inherited from o2::framework::RootTreeWriter::BranchDef< T, InputSpec, KeyExtractor >
using type = T
 
using key_type = InputSpec
 
using key_extractor = KeyExtractor
 
using Fill = std::function< void(TBranch &branch, T const &)>
 
using FillExt = std::function< void(TBranch &branch, T const &, DataRef const &)>
 
using Spectator = std::function< void(T const &)>
 
using SpectatorExt = std::function< void(T const &, DataRef const &)>
 
using BranchCallback = std::variant< std::monostate, Fill, FillExt, Spectator, SpectatorExt >
 

Detailed Description

template<typename T>
struct o2::framework::MakeRootTreeWriterSpec::BranchDefinition< T >

branch definition structure uses InputSpec as key type Main pupose is to support specification of a branch name option key in addition to all other branch definition arguments. The spec generator will add this as an option to the processor

Definition at line 273 of file MakeRootTreeWriterSpec.h.

Constructor & Destructor Documentation

◆ BranchDefinition() [1/4]

template<typename T >
template<typename KeyType , typename Arg = const char*, std::enable_if_t< StringAssignable< Arg >::value, int > = 0>
o2::framework::MakeRootTreeWriterSpec::BranchDefinition< T >::BranchDefinition ( KeyType &&  key,
std::string  _branchName,
Arg  _optionKey = "" 
)
inline

constructor allows to specify an optional key used to generate a command line option, base class uses default parameters

Definition at line 277 of file MakeRootTreeWriterSpec.h.

◆ BranchDefinition() [2/4]

template<typename T >
template<typename KeyType , typename Arg = const char*, std::enable_if_t< StringAssignable< Arg >::value, int > = 0>
o2::framework::MakeRootTreeWriterSpec::BranchDefinition< T >::BranchDefinition ( KeyType &&  key,
std::string  _branchName,
int  _nofBranches,
Arg  _optionKey = "" 
)
inline

constructor allows to specify number of branches and an optional key used to generate a command line option, base class uses default parameters

Definition at line 284 of file MakeRootTreeWriterSpec.h.

◆ BranchDefinition() [3/4]

template<typename T >
template<typename KeyType , typename Arg , typename... Args, std::enable_if_t< StringAssignable< Arg >::value, int > = 0>
o2::framework::MakeRootTreeWriterSpec::BranchDefinition< T >::BranchDefinition ( KeyType  key,
std::string  _branchName,
Arg &&  _optionKey,
Args &&...  args 
)
inline

constructor, if the first argument from the pack can be assigned to string this is treated as option key, all other arguments are simply forwarded to base class

Definition at line 291 of file MakeRootTreeWriterSpec.h.

◆ BranchDefinition() [4/4]

template<typename T >
template<typename KeyType , typename Arg , typename... Args, std::enable_if_t<!StringAssignable< Arg >::value, int > = 0>
o2::framework::MakeRootTreeWriterSpec::BranchDefinition< T >::BranchDefinition ( KeyType  key,
std::string  _branchName,
Arg &&  arg,
Args &&...  args 
)
inline

constructor, the argument pack is simply forwarded to base class

Definition at line 297 of file MakeRootTreeWriterSpec.h.

Member Data Documentation

◆ optionKey

template<typename T >
std::string o2::framework::MakeRootTreeWriterSpec::BranchDefinition< T >::optionKey = ""

key for command line option

Definition at line 302 of file MakeRootTreeWriterSpec.h.


The documentation for this struct was generated from the following file: