Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RBranchData Struct Reference

Stores properties of each output branch in a Snapshot.

Definition at line 101 of file SnapshotHelpers.hxx.

Classes

struct  EmptyDynamicType
 Stores empty instances of classes, so a dummy object can be written when a systematic variation doesn't pass a selection cut. More...
struct  FundamentalType
 Stores variations of a fundamental type. More...

Public Member Functions

 RBranchData ()=default
 RBranchData (std::string inputBranchName, std::string outputBranchName, bool isDefine, const std::type_info *typeID)
void ClearBranchContents ()
 Point the branch address to an empty instance of the type represented by this branch or write null bytes into the space used by the fundamental type.
void ClearBranchPointers ()
void * EmptyInstance (bool pointerToPointer)
 Return a pointer to an empty instance of the type represented by this branch.
bool WriteValueIfFundamental (void *valuePtr)
 For fundamental types represented by TDataType, fetch a value from the pointer into the local branch buffer.

Public Attributes

void * fBranchAddressForCArrays = nullptr
std::string fInputBranchName
const std::type_info * fInputTypeID = nullptr
bool fIsCArray = false
bool fIsDefine = false
TBranchfOutputBranch = nullptr
std::string fOutputBranchName
std::variant< FundamentalType, EmptyDynamicTypefTypeData = FundamentalType{0}
int fVariationIndex = -1

#include <ROOT/RDF/SnapshotHelpers.hxx>

Constructor & Destructor Documentation

◆ RBranchData() [1/2]

◆ RBranchData() [2/2]

ROOT::Internal::RDF::RBranchData::RBranchData ( std::string inputBranchName,
std::string outputBranchName,
bool isDefine,
const std::type_info * typeID )

Definition at line 342 of file RDFSnapshotHelpers.cxx.

Member Function Documentation

◆ ClearBranchContents()

Point the branch address to an empty instance of the type represented by this branch or write null bytes into the space used by the fundamental type.

This is used in case of variations, when certain defines/actions don't execute. We nevertheless need to write something, so we point the branch to an empty instance.

Definition at line 392 of file RDFSnapshotHelpers.cxx.

◆ ClearBranchPointers()

◆ EmptyInstance()

Return a pointer to an empty instance of the type represented by this branch.

For fundamental types, this is simply an 8-byte region of zeroes. For classes, it is an instance created with TClass::New.

Parameters
pointerToPointerReturn a pointer to a pointer, so it can be used directly in TTree::SetBranchAddress().

Definition at line 361 of file RDFSnapshotHelpers.cxx.

◆ WriteValueIfFundamental()

For fundamental types represented by TDataType, fetch a value from the pointer into the local branch buffer.

If the branch holds a class type, nothing happens.

Returns
true if the branch holds a fundamental type, false if it holds a class type.

Definition at line 145 of file SnapshotHelpers.hxx.

Member Data Documentation

◆ fBranchAddressForCArrays

◆ fInputBranchName

◆ fInputTypeID

const std::type_info* ROOT::Internal::RDF::RBranchData::fInputTypeID = nullptr

Definition at line 121 of file SnapshotHelpers.hxx.

◆ fIsCArray

◆ fIsDefine

◆ fOutputBranch

◆ fOutputBranchName

◆ fTypeData

◆ fVariationIndex


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