20#ifndef RDF_SNAPSHOTHELPERS
21#define RDF_SNAPSHOTHELPERS
36class TBufferMergerFile;
66 std::unique_ptr<ROOT::RNTupleWriter>
fWriter;
79 const std::vector<const std::type_info *> &
colTypeIDs);
89 void Exec(
unsigned int ,
const std::vector<void *> &values);
112 bool fBranchAddressesNeedReset{
true};
130 const std::vector<const std::type_info *> &
colTypeIDs);
140 void Exec(
unsigned int,
const std::vector<
void *> &values);
142 void UpdateCArraysPtrs(
const std::vector<
void *> &values);
144 void SetBranches(
const std::vector<
void *> &values);
152 std::
string GetActionName() {
return "Snapshot"; }
156 return [
this](
unsigned int,
const RSampleInfo &)
mutable { fBranchAddressesNeedReset =
true; };
201 const std::vector<const std::type_info *> &
colTypeIDs);
211 void FinalizeTask(
unsigned int slot);
213 void Exec(
unsigned int slot,
const std::vector<
void *> &values);
215 void UpdateCArraysPtrs(
unsigned int slot,
const std::vector<
void *> &values);
217 void SetBranches(
unsigned int slot,
const std::vector<
void *> &values);
225 std::
string GetActionName() {
return "Snapshot"; }
229 return [
this](
unsigned int slot,
const RSampleInfo &)
mutable { fBranchAddressesNeedReset[
slot] = 1; };
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Base class for action helpers, see RInterface::Book() for more information.
The head node of a RDF computation graph.
void Insert(const std::string &name, TBranch *address, bool isCArray=false)
std::vector< TBranch * > fBranches
std::vector< std::string > fNames
void AssertNoNullBranchAddresses()
bool IsCArray(const std::string &name) const
TBranch * Get(const std::string &name) const
std::vector< bool > fIsCArray
ROOT::RDF::SampleCallback_t GetSampleCallback() final
Override this method to register a callback that is executed before the processing a new data sample ...
std::string GetActionName()
UntypedSnapshotRNTupleHelper(const UntypedSnapshotRNTupleHelper &)=delete
std::unique_ptr< ROOT::RNTupleWriter > fWriter
RSnapshotOptions fOptions
std::vector< bool > fIsDefine
ColumnNames_t fOutputFieldNames
std::unique_ptr< TFile > fOutputFile
UntypedSnapshotRNTupleHelper & operator=(const UntypedSnapshotRNTupleHelper &)=delete
ROOT::REntry * fOutputEntry
std::vector< const std::type_info * > fInputColumnTypeIDs
ROOT::Detail::RDF::RLoopManager * fOutputLoopManager
UntypedSnapshotRNTupleHelper(UntypedSnapshotRNTupleHelper &&) noexcept
ROOT::Detail::RDF::RLoopManager * fInputLoopManager
ColumnNames_t fInputFieldNames
std::vector< bool > fIsDefine
ROOT::Detail::RDF::RLoopManager * fInputLoopManager
UntypedSnapshotTTreeHelperMT(UntypedSnapshotTTreeHelperMT &&) noexcept
ROOT::Detail::RDF::RLoopManager * fOutputLoopManager
std::vector< std::shared_ptr< ROOT::TBufferMergerFile > > fOutputFiles
ROOT::RDF::SampleCallback_t GetSampleCallback() final
Override this method to register a callback that is executed before the processing a new data sample ...
std::vector< std::string > fOutputBranchNames
RSnapshotOptions fOptions
std::vector< int > fBranchAddressesNeedReset
std::vector< TTree * > fInputTrees
UntypedSnapshotTTreeHelperMT & operator=(const UntypedSnapshotTTreeHelperMT &)=delete
std::vector< std::vector< TBranch * > > fBranches
std::vector< std::unique_ptr< TTree > > fOutputTrees
std::vector< RBranchSet > fOutputBranches
std::vector< const std::type_info * > fInputColumnTypeIDs
std::unique_ptr< ROOT::TBufferMerger > fMerger
UntypedSnapshotTTreeHelperMT(const UntypedSnapshotTTreeHelperMT &)=delete
std::vector< std::vector< void * > > fBranchAddresses
std::vector< std::string > fInputBranchNames
RSnapshotOptions fOptions
ROOT::Detail::RDF::RLoopManager * fOutputLoopManager
ROOT::Detail::RDF::RLoopManager * fInputLoopManager
std::vector< bool > fIsDefine
std::vector< void * > fBranchAddresses
UntypedSnapshotTTreeHelper(UntypedSnapshotTTreeHelper &&) noexcept
std::vector< TBranch * > fBranches
std::unique_ptr< TFile > fOutputFile
UntypedSnapshotTTreeHelper(const UntypedSnapshotTTreeHelper &)=delete
ColumnNames_t fOutputBranchNames
ColumnNames_t fInputBranchNames
std::unique_ptr< TTree > fOutputTree
RBranchSet fOutputBranches
UntypedSnapshotTTreeHelper & operator=(const UntypedSnapshotTTreeHelper &)=delete
ROOT::RDF::SampleCallback_t GetSampleCallback() final
Override this method to register a callback that is executed before the processing a new data sample ...
std::vector< const std::type_info * > fInputColumnTypeIDs
This type represents a sample identifier, to be used in conjunction with RDataFrame features such as ...
The REntry is a collection of values in an RNTuple corresponding to a complete row in the data set.
A TTree is a list of TBranches.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
A TTree represents a columnar dataset.
std::function< void(unsigned int, const ROOT::RDF::RSampleInfo &)> SampleCallback_t
The type of a data-block callback, registered with an RDataFrame computation graph via e....
std::vector< std::string > ColumnNames_t
Namespace for new ROOT classes and functions.
A collection of options to steer the creation of the dataset on file.