Dataset Class Reference

Interface to read a dataset. More...

#include <Dataset.h>

Collaboration diagram for Dataset:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Dataset (DatasetInfo info, int skipFiles=0, int maxFiles=-1)
 Constructor.
DatasetInfo const & Info () const
 Returns associated DatasetInfo object.
bool NextEntry ()
 Sets the next entry in the dataset as the current one.
int64_t NumEntries ()
 Returns number of entries in the selected input files from the dataset.
TTreeReader & Reader ()
 Returns reader for selected files.
std::vector< std::string > const & SelectedFiles () const
 Returns paths to selected input files.
void SetEntry (int64_t index)
 Sets the current entry for the reader.

Private Attributes

DatasetInfo info_
 Associated DatasetInfo object.
std::vector< std::string > selectedFiles_
 Selected files from the dataset.
TChain chain_
 TChain containing selected files.
TTreeReader reader_
 Reader associated with chain_.

Detailed Description

Interface to read a dataset.

This class is an aggregation of a DatasetInfo and a TTreeReader. The latter one implements reading of input files included in the dataset. Reading of a subset of files in the dataset is supported, as needed for parallel processing.

When a consumer registers a new branch to read, this modifies the Dataset object (meaning that Reader, which has to be called for this, is not a constant method). This can be thought of as a (dynamic) change in the content of the dataset.


Constructor & Destructor Documentation

Dataset::Dataset ( DatasetInfo  info,
int  skipFiles = 0,
int  maxFiles = -1 
)

Constructor.

Parameters:
[in] info DatasetInfo object that describes the dataset.
[in] skipFiles Number of input files in the dataset to skip, starting from the beginning.
[in] maxFiles Number of input files to include, starting after the skipped ones. Special value -1 indicates that all remaining files need to be included.

Member Function Documentation

bool Dataset::NextEntry (  )  [inline]

Sets the next entry in the dataset as the current one.

Returns:
False if the previous entry was the last one in the dataset; true otherwise.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator

Generated on 30 Oct 2020 for H→ZZ→2ℓ2ν analysis by  doxygen 1.6.1