ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
|
Go to the documentation of this file.
6 #include <FairRootManager.h>
8 #include <TClonesArray.h>
15 #include <type_traits>
53 using BasePtr = std::shared_ptr<AtTabInfoBase>;
73 template <typename T, typename std::enable_if_t<std::is_base_of<AtTabInfoBase, T>::value> * =
nullptr>
76 return dynamic_cast<T *
>(
GetAugment(name).get());
109 return dynamic_cast<T *
>(
fArray->At(0));
const T * operator->() const
Contains all the data needed by an AtTab.
Subject for the branch in the FairRoot tree.
const DataHandling::AtBranch & GetBranch() const
void ReplaceAugment(BasePtr augment)
BasePtr GetAugment(std::string name)
virtual std::string GetDefaultName()=0
Default name for info type.
DataHandling::AtBranch & fBranchName
AtTabInfoFairRoot(DataHandling::AtBranch &branch)
Interface for AtTabInfo classes.
TString fCurrentBranchName
void AddAugment(BasePtr augment)
std::string GetDefaultName() override
Default name for info type.
std::map< std::string, BasePtr > fInfoAugments
Class for tracking the information from a branch of the FairRoot source tree.
virtual ~AtTabInfoBase()=default
std::shared_ptr< AtTabInfoBase > BasePtr
const T & operator*() const
T * GetAugment(std::string name)
Get Augment cast to anticipated type (which must have the proper base class).
std::string GetDefaultName() override
Default name for info type.
TString GetBranchName() const