![]() |
ATLAS Offline Software
|
Helper class keeping track of the files that got accessed. More...
#include <TFileAccessTracer.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| ~TFileAccessTracer () | |
| Destructor. | |
| void | add (std::string_view fileName) |
| Add information about a new file that got accessed. | |
| const std::string & | serverAddress () const |
| The address of the server that information is sent to. | |
| void | setServerAddress (const std::string &addr) |
| Set the address of the server that information is sent to. | |
| double | monitoredFraction () const |
| Fraction of jobs that should send monitoring information. | |
| void | setMonitoredFraction (double value) |
| Set the fraction of jobs that should send monitoring information. | |
| void | enableDataSubmission (bool value) |
| Function for turning data submission on/off. | |
Static Public Member Functions | |
| static TFileAccessTracer & | instance () |
| Access the singleton instance of this class. | |
Private Member Functions | |
| TFileAccessTracer () | |
| Default constructor. | |
Private Attributes | |
| std::unique_ptr< Impl > | m_impl |
| Pointer to the implementation of the class. | |
Helper class keeping track of the files that got accessed.
This class helps in keeping track of which files get accessed during a job. To be able to report about them to the DDM (Rucio) system in a way that doesn't rely on the grid middleware. (So backdoor access to files stored at data centres becomes visible to the DDM system.)
The class can also send information about which branches/variables got accessed in the job. This it simply gets from the xAODCore code.
xAOD::TEvent and xAOD::REvent use this class to send information about xAOD access to the central Rucio monitoring infrastructure. This default behaviour can be influenced in two ways:
"XAOD_ACCESSTRACER_FRACTION": This is a floating point value, which is the fraction of jobs that should be monitored within that session."XAOD_ACCESSTRACER_SERVER": This is the address of the server to which the monitoring information should be sent. Definition at line 37 of file TFileAccessTracer.h.
| xAOD::TFileAccessTracer::~TFileAccessTracer | ( | ) |
Destructor.
The destructor of the class is the one doing most of the heavy lifting.
If the $SEND_XAOD_FILE_ACCESS_STAT environment variable is set when the object gets deleted, it posts all the information it collected, to the address defined by SERVER_ADDRESS. By constructing an HTTP message from scratch.
Definition at line 81 of file TFileAccessTracer.cxx.
|
private |
Default constructor.
Definition at line 319 of file TFileAccessTracer.cxx.
| void xAOD::TFileAccessTracer::add | ( | std::string_view | fileName | ) |
Add information about a new file that got accessed.
This function is called by TEvent to record which files were read from during the job.
| fileName | The name of the file that is being read from |
Definition at line 266 of file TFileAccessTracer.cxx.
| void xAOD::TFileAccessTracer::enableDataSubmission | ( | bool | value | ) |
Function for turning data submission on/off.
This function can be used by concerned users to turn off data collection and submission for their jobs completely.
| value | Setting whether data submission should be enabled or not |
Definition at line 314 of file TFileAccessTracer.cxx.
|
static |
Access the singleton instance of this class.
Definition at line 255 of file TFileAccessTracer.cxx.
| double xAOD::TFileAccessTracer::monitoredFraction | ( | ) | const |
Fraction of jobs that should send monitoring information.
Definition at line 293 of file TFileAccessTracer.cxx.
| const std::string & xAOD::TFileAccessTracer::serverAddress | ( | ) | const |
The address of the server that information is sent to.
Definition at line 276 of file TFileAccessTracer.cxx.
| void xAOD::TFileAccessTracer::setMonitoredFraction | ( | double | value | ) |
| void xAOD::TFileAccessTracer::setServerAddress | ( | const std::string & | addr | ) |
Set the address of the server that information is sent to.
Definition at line 284 of file TFileAccessTracer.cxx.
|
private |
Pointer to the implementation of the class.
Definition at line 69 of file TFileAccessTracer.h.