The example code bellow shows how to create Runs inside DataSets, how to iterate over all the runs in a DataSet, how to access a Run from a parent DataSet, and how to search for Runs.
main.cpp (show/hide)
../../examples/04_runs/main.cpp
The Runs in a DataSets can be accessed using the DataSet::runs()
method, which produces a RunSet
object. A RunSet
is a view of the DataSet for the purpose of accessing Runs.
The RunSet class presents an interface very similar to that of an std::map<RunNumber,Run>
, providing users with begin
and end
functions to get forward iterators, as well as find
, lower_bound
, and upper_bound
to search for specific Runs. Runs are sorted in increasing order of run number.