ATLAS Offline Software
|
Data source for xAOD input files. More...
#include <RDataSource.h>
Public Types | |
typedef std::vector< std::pair< ULong64_t, ULong64_t > > | EntryRanges_t |
Type describing the entry ranges of the input file(s) More... | |
Public Member Functions | |
RDataSource (std::string_view fileNameGlob, std::string_view treeName="CollectionTree") | |
Constructor with the file name pattern. More... | |
RDataSource (const std::vector< std::string > &fileNames, std::string_view treeName="CollectionTree") | |
Constructor with list of file names. More... | |
~RDataSource () | |
Destructor. More... | |
void | setVerboseOutput (Bool_t value=kTRUE) |
Set whether verbose output should be printed (for debugging) More... | |
Bool_t | isVerboseOutput () const |
Check whether verbose output is set up to be printed. More... | |
Functions implemented from @c ROOT::RDF::RDataSource | |
virtual void | SetNSlots (unsigned int slots) override final |
Set the number of threads/slots that the data source should use. More... | |
virtual void | Initialize () override final |
Initialize the data source, before the start of the event loop. More... | |
virtual void | InitSlot (unsigned int slot, ULong64_t firstEntry) override final |
Initialize one of the slots/threads. More... | |
virtual void | FinalizeSlot (unsigned int slot) override final |
Close the input file reading in one of the slots/threads. More... | |
virtual void | Finalize () override final |
Finalize the data source, after the event loop. More... | |
virtual const std::vector< std::string > & | GetColumnNames () const override final |
Get the column/object names for the input file(s) More... | |
virtual bool | HasColumn (std::string_view name) const override final |
Check if the dataset has a certain column/object. More... | |
virtual std::string | GetTypeName (std::string_view column) const override final |
Get the type name of a given column/object. More... | |
virtual EntryRanges_t | GetEntryRanges () override final |
Get the entry ranges in the input file(s) More... | |
virtual bool | SetEntry (unsigned int slot, ULong64_t entry) override final |
Set which entry a give slot/thread should be processing. More... | |
Private Member Functions | |
virtual Record_t | GetColumnReadersImpl (std::string_view column, const std::type_info &typeInfo) override final |
Return the type-erased vector of pointers to pointers to column values. More... | |
void | readInputMetadata () |
Fill the metadata variables. More... | |
Private Attributes | |
Arguments provided by the user | |
std::vector< std::string > | m_fileNames |
Files to read. More... | |
std::string | m_treeName |
Name of the event tree in the input files. More... | |
Bool_t | m_verboseOutput |
Whether verbose output should be printed or not. More... | |
Variables valid right after construction | |
std::vector< std::string > | m_columnNames |
Names of the columns/objects on the input. More... | |
std::unordered_map< std::string, std::string > | m_classNameMap |
The object name -> class name map. More... | |
Variables that become valid after calling @c Initialize() | |
EntryRanges_t | m_entryRanges |
Optimal entry ranges to split the processing into. More... | |
Variables that become valid after calling @c SetNSlots(...) | |
std::vector< std::unique_ptr< TChain > > | m_chains |
Chains used in the file I/O. More... | |
std::vector< std::unique_ptr< RDataSourceEvent > > | m_events |
Event objects performing the file I/O. More... | |
std::vector< std::unique_ptr< TStore > > | m_stores |
In-memory whiteboards used during the event loop. More... | |
Data source for xAOD input files.
This data source can be used to allow ROOT::RDataFrame
to process (D)xAOD inputs.
Definition at line 35 of file RDataSource.h.
typedef std::vector< std::pair< ULong64_t, ULong64_t > > xAOD::RDataSource::EntryRanges_t |
Type describing the entry ranges of the input file(s)
Definition at line 48 of file RDataSource.h.
xAOD::RDataSource::RDataSource | ( | std::string_view | fileNameGlob, |
std::string_view | treeName = "CollectionTree" |
||
) |
xAOD::RDataSource::RDataSource | ( | const std::vector< std::string > & | fileNames, |
std::string_view | treeName = "CollectionTree" |
||
) |
xAOD::RDataSource::~RDataSource | ( | ) |
|
finaloverridevirtual |
Close the input file reading in one of the slots/threads.
Definition at line 294 of file RDataSource.cxx.
|
finaloverridevirtual |
Get the column/object names for the input file(s)
Definition at line 313 of file RDataSource.cxx.
|
finaloverrideprivatevirtual |
Return the type-erased vector of pointers to pointers to column values.
Definition at line 392 of file RDataSource.cxx.
|
finaloverridevirtual |
|
finaloverridevirtual |
|
finaloverridevirtual |
|
finaloverridevirtual |
Initialize the data source, before the start of the event loop.
Definition at line 187 of file RDataSource.cxx.
Bool_t xAOD::RDataSource::isVerboseOutput | ( | ) | const |
Check whether verbose output is set up to be printed.
Definition at line 386 of file RDataSource.cxx.
|
private |
Set which entry a give slot/thread should be processing.
Definition at line 358 of file RDataSource.cxx.
Set the number of threads/slots that the data source should use.
Definition at line 127 of file RDataSource.cxx.
void xAOD::RDataSource::setVerboseOutput | ( | Bool_t | value = kTRUE | ) |
Set whether verbose output should be printed (for debugging)
Definition at line 380 of file RDataSource.cxx.
|
private |
Chains used in the file I/O.
Definition at line 141 of file RDataSource.h.
|
private |
The object name -> class name map.
Definition at line 125 of file RDataSource.h.
|
private |
Names of the columns/objects on the input.
Definition at line 123 of file RDataSource.h.
|
private |
Optimal entry ranges to split the processing into.
Definition at line 133 of file RDataSource.h.
|
private |
Event objects performing the file I/O.
Definition at line 143 of file RDataSource.h.
|
private |
Files to read.
Definition at line 111 of file RDataSource.h.
|
private |
In-memory whiteboards used during the event loop.
Definition at line 145 of file RDataSource.h.
|
private |
Name of the event tree in the input files.
Definition at line 113 of file RDataSource.h.
|
private |
Whether verbose output should be printed or not.
Definition at line 115 of file RDataSource.h.