R3BROOT
R3B analysis software
|
R3BIOConnector
The class R3BIOConnector
is used to declare the input and output data structure in the tasks based on FairTask
. It's highly recommended to use R3BIOConnector
instead of TClonesArray
.
Usage:
Additionally there are three built-in types to support data IO with STL containers:
InputVectorConnector
and OutputVectorConnector
: data IO with std::vector
InputMapConnector
and OutputMapConnector
: data IO with std::map
InputHashConnector
and OutputHashConnector
: data IO with std::unordered_map
The get()
API provides the access to the internal STL data container from R3BIOConnector
. For R3BInputConnector
, the return value is a const reference const T&
. And for R3BOutputConnector
, the return value is a simple reference T&
.
Additionally, the R3BInputConnector
provides iterators to loop through every element in the internal STL container:
Attention:
To successfully read and write STL container from/to the root file, the corresponding types must be also declared in the LinkDef.h
file. For example:
R3BValueError
R3BValueError
is a data structure which contains a value and an error to represent any measurement value with an uncertainty.
Usage:
Some basic arithmetic operations are implemented, such as +
, *
, /
, -
, -=
and +=
. For example:
Error values from the above mentioned operations are calculated using Gaussian error propagation. Therefore, it could be expensive in terms of computations.
R3BFileSource2
R3BFileSource2
is an improved version of R3BFileSource
with a much cleaner design using the same interfaces. It also supports reading root files containing just a single root tree.
Usage:
To add the source files which only contain root trees:
Please make sure that the run ID set to file_source is consistent with the run ID from the parameter file.
R3BFileSource2
also has a Event processing rate printer, to the set refresh rate of the printer, use
R3BDataMonitor
R3BDataMonitor
is a histogram/graph manager for tasks based on FairTask
.
Usage:
With R3BDataMonitor
, all histograms/graphs will be automatically saved and written to the file in the end of the task.
There are two APIs from R3BDataMonitor
to save histograms/graphs to a local root file:
save_to_sink(foldername)
saves all the histograms and graphs to the sink file (obtained from FairRun::Instance()->GetSink()
). The folder where histograms are located is "DataMonitor/foldername". If the foldername
is empty or not provided, the location would just be "DataMonitor" folder.save_to_file(filename)
saves all histograms and graphs to an independent root file with the file name filename
. If the filename
is empty or not provided, the file would be named with the current data and time.Histograms and graphs can also be grouped into different canvases (ROOT TCavnas
). This could happen quite often for the online monitoring using the ROOT THttp
server.
To create a new canvas and add histograms to it:
Again, all the histograms and graphs inside each canvas will be automatically saved into the specified folder.
THttp
server classIf the online analysis is based on Root THttp
server class, DataMonitor
provides an additional API to register all owning canvases: