Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RDF::SnapshotOutputWriter Struct Reference

An object to store an output file and a tree in one common place to share them between instances of Snapshot with systematic uncertainties.

Definition at line 1007 of file RDFSnapshotHelpers.cxx.

Classes

struct  Bitmask
 

Public Member Functions

 SnapshotOutputWriter (SnapshotOutputWriter &&) noexcept=delete
 
 SnapshotOutputWriter (SnapshotOutputWriter const &)=delete
 
 SnapshotOutputWriter (TFile *file)
 
 ~SnapshotOutputWriter ()
 
void ClearMaskBits ()
 Clear all bits, as if none of the variations passed its filter.
 
bool MaskEmpty () const
 Test if any of the mask bits are set.
 
SnapshotOutputWriteroperator= (SnapshotOutputWriter &&) noexcept=delete
 
SnapshotOutputWriteroperator= (SnapshotOutputWriter const &)=delete
 
void RegisterBranch (std::string const &branchName, unsigned int variationIndex)
 Register a branch and corresponding systematic uncertainty.
 
void SetMaskBit (unsigned int index)
 Set a bit signalling that the variation at index passed its filter.
 
void Write () const
 Write the current event and the bitmask to the output dataset.
 

Public Attributes

std::vector< BitmaskfBitMasks
 
std::unordered_map< std::string, std::pair< std::string, unsigned int > > fBranchToBitmaskMapping
 
std::unordered_map< std::string, unsigned intfBranchToVariationMapping
 
std::string fDirectoryName
 
std::unique_ptr< TFilefFile
 
unsigned int fNBits = 0
 
RLoopManagerfOutputLoopManager
 
std::unique_ptr< TTreefTree
 

Constructor & Destructor Documentation

◆ SnapshotOutputWriter() [1/3]

ROOT::Internal::RDF::SnapshotOutputWriter::SnapshotOutputWriter ( TFile * file)
inline

Definition at line 1027 of file RDFSnapshotHelpers.cxx.

◆ ~SnapshotOutputWriter()

ROOT::Internal::RDF::SnapshotOutputWriter::~SnapshotOutputWriter ( )
inline

Definition at line 1028 of file RDFSnapshotHelpers.cxx.

◆ SnapshotOutputWriter() [2/3]

ROOT::Internal::RDF::SnapshotOutputWriter::SnapshotOutputWriter ( SnapshotOutputWriter const & )
delete

◆ SnapshotOutputWriter() [3/3]

ROOT::Internal::RDF::SnapshotOutputWriter::SnapshotOutputWriter ( SnapshotOutputWriter && )
deletenoexcept

Member Function Documentation

◆ ClearMaskBits()

void ROOT::Internal::RDF::SnapshotOutputWriter::ClearMaskBits ( )
inline

Clear all bits, as if none of the variations passed its filter.

Definition at line 1090 of file RDFSnapshotHelpers.cxx.

◆ MaskEmpty()

bool ROOT::Internal::RDF::SnapshotOutputWriter::MaskEmpty ( ) const
inline

Test if any of the mask bits are set.

Definition at line 1105 of file RDFSnapshotHelpers.cxx.

◆ operator=() [1/2]

SnapshotOutputWriter & ROOT::Internal::RDF::SnapshotOutputWriter::operator= ( SnapshotOutputWriter && )
deletenoexcept

◆ operator=() [2/2]

SnapshotOutputWriter & ROOT::Internal::RDF::SnapshotOutputWriter::operator= ( SnapshotOutputWriter const & )
delete

◆ RegisterBranch()

void ROOT::Internal::RDF::SnapshotOutputWriter::RegisterBranch ( std::string const & branchName,
unsigned int variationIndex )
inline

Register a branch and corresponding systematic uncertainty.

This will create an entry in the mapping from branch names to bitmasks, so the corresponding column can be masked if it doesn't contain valid entries. This mapping is written next to the tree into the output file.

Definition at line 1061 of file RDFSnapshotHelpers.cxx.

◆ SetMaskBit()

void ROOT::Internal::RDF::SnapshotOutputWriter::SetMaskBit ( unsigned int index)
inline

Set a bit signalling that the variation at index passed its filter.

Definition at line 1097 of file RDFSnapshotHelpers.cxx.

◆ Write()

void ROOT::Internal::RDF::SnapshotOutputWriter::Write ( ) const
inline

Write the current event and the bitmask to the output dataset.

Definition at line 1111 of file RDFSnapshotHelpers.cxx.

Member Data Documentation

◆ fBitMasks

std::vector<Bitmask> ROOT::Internal::RDF::SnapshotOutputWriter::fBitMasks

Definition at line 1020 of file RDFSnapshotHelpers.cxx.

◆ fBranchToBitmaskMapping

std::unordered_map<std::string, std::pair<std::string, unsigned int> > ROOT::Internal::RDF::SnapshotOutputWriter::fBranchToBitmaskMapping

Definition at line 1024 of file RDFSnapshotHelpers.cxx.

◆ fBranchToVariationMapping

std::unordered_map<std::string, unsigned int> ROOT::Internal::RDF::SnapshotOutputWriter::fBranchToVariationMapping

Definition at line 1022 of file RDFSnapshotHelpers.cxx.

◆ fDirectoryName

std::string ROOT::Internal::RDF::SnapshotOutputWriter::fDirectoryName

Definition at line 1010 of file RDFSnapshotHelpers.cxx.

◆ fFile

std::unique_ptr<TFile> ROOT::Internal::RDF::SnapshotOutputWriter::fFile

Definition at line 1008 of file RDFSnapshotHelpers.cxx.

◆ fNBits

unsigned int ROOT::Internal::RDF::SnapshotOutputWriter::fNBits = 0

Definition at line 1025 of file RDFSnapshotHelpers.cxx.

◆ fOutputLoopManager

RLoopManager* ROOT::Internal::RDF::SnapshotOutputWriter::fOutputLoopManager

Definition at line 1011 of file RDFSnapshotHelpers.cxx.

◆ fTree

std::unique_ptr<TTree> ROOT::Internal::RDF::SnapshotOutputWriter::fTree

Definition at line 1009 of file RDFSnapshotHelpers.cxx.

Collaboration diagram for ROOT::Internal::RDF::SnapshotOutputWriter:
[legend]

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