ATLAS Offline Software
|
Helper class keeping track of the files that got accessed. More...
#include <TFileAccessTracer.h>
Classes | |
class | AccessedFile |
Helper class storing information about the accessed files. More... | |
Public Member Functions | |
TFileAccessTracer () | |
Default constructor. More... | |
~TFileAccessTracer () | |
Destructor. More... | |
void | add (const ::TFile &file) |
Add information about a new file that got accessed. More... | |
const std::string & | serverAddress () const |
The address of the server that information is sent to. More... | |
void | setServerAddress (const std::string &addr) |
Set the address of the server that information is sent to. More... | |
::Double_t | monitoredFraction () const |
Fraction of jobs that should send monitoring information. More... | |
void | setMonitoredFraction (::Double_t value) |
Set the fraction of jobs that should send monitoring information. More... | |
Static Public Member Functions | |
static void | enableDataSubmission (::Bool_t value) |
Function for turning data submission on/off. More... | |
Private Attributes | |
std::set< AccessedFile > | m_accessedFiles |
List of all the input files that were accessed in the job. More... | |
std::string | m_serverAddress |
Address of the server to send monitoring information to. More... | |
::TInetAddress | m_serverInetAddress |
Technical address of the server. More... | |
::Double_t | m_monitoredFraction |
Fraction of jobs that should send monitoring information. More... | |
ReadStats * | m_readStats |
Object describing the job's xAOD access statistics. More... | |
std::mutex | m_mutex |
Mutex for modifying the object. More... | |
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 uses this class to send information about xAOD access to the central Rucio monitoring infrastructure. This default behaviour can be influenced in two ways:
Definition at line 46 of file TFileAccessTracer.h.
xAOD::TFileAccessTracer::TFileAccessTracer | ( | ) |
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 48 of file TFileAccessTracer.cxx.
void xAOD::TFileAccessTracer::add | ( | const ::TFile & | file | ) |
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.
file | The file object that is being read from |
Definition at line 223 of file TFileAccessTracer.cxx.
|
static |
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 281 of file TFileAccessTracer.cxx.
Double_t xAOD::TFileAccessTracer::monitoredFraction | ( | ) | const |
Fraction of jobs that should send monitoring information.
Definition at line 259 of file TFileAccessTracer.cxx.
const std::string & xAOD::TFileAccessTracer::serverAddress | ( | ) | const |
The address of the server that information is sent to.
Definition at line 237 of file TFileAccessTracer.cxx.
void xAOD::TFileAccessTracer::setMonitoredFraction | ( | ::Double_t | value | ) |
Set the fraction of jobs that should send monitoring information.
Definition at line 267 of file TFileAccessTracer.cxx.
void xAOD::TFileAccessTracer::setServerAddress | ( | const std::string & | addr | ) |
Set the address of the server that information is sent to.
Definition at line 245 of file TFileAccessTracer.cxx.
|
private |
List of all the input files that were accessed in the job.
Definition at line 85 of file TFileAccessTracer.h.
|
private |
Fraction of jobs that should send monitoring information.
Definition at line 93 of file TFileAccessTracer.h.
|
mutableprivate |
Mutex for modifying the object.
Definition at line 99 of file TFileAccessTracer.h.
|
private |
Object describing the job's xAOD access statistics.
Definition at line 96 of file TFileAccessTracer.h.
|
private |
Address of the server to send monitoring information to.
Definition at line 88 of file TFileAccessTracer.h.
|
private |
Technical address of the server.
Definition at line 90 of file TFileAccessTracer.h.