![]() |
ATLAS Offline Software
|
Singleton object holding on to the process's I/O statistics. More...
#include <IOStats.h>
Public Member Functions | |
| ReadStats & | stats () |
| Access the object belonging to the current thread. | |
| ReadStats | merged () const |
| Access the statistics object, merging information from all threads. | |
Static Public Member Functions | |
| static IOStats & | instance () |
| Singleton object accessor. | |
Private Member Functions | |
| IOStats () | |
| The constructor of the object is made private. | |
| IOStats (const IOStats &)=delete | |
| The copy constructor is deleted. | |
Private Attributes | |
| std::map< std::thread::id, ReadStats > | m_stats |
| Objects describing the file access pattern, per thread. | |
| AthContainers_detail::thread_specific_ptr< ReadStats > | m_ptr |
| Thread specific pointer to the ReadStats object of the current thread. | |
| std::mutex | m_mutex |
| Mutex for accessing the read statistics. | |
Singleton object holding on to the process's I/O statistics.
This singleton class holds the xAOD file access statistics object describing the auxiliary variable access pattern of the current process.
|
private |
The constructor of the object is made private.
Definition at line 49 of file IOStats.cxx.
|
privatedelete |
The copy constructor is deleted.
|
static |
Singleton object accessor.
Definition at line 11 of file IOStats.cxx.
| ReadStats xAOD::IOStats::merged | ( | ) | const |
Access the statistics object, merging information from all threads.
This function should only be used during the finalisation of a process, once all the event processing threads have already finished. That's because it's not absolutely thread-safe. If another thread modifies an xAOD::ReadStats object through the stats() function while this function is executing, that can possibly lead to a crash.
In the end the function is not made thread safe, because doing so would require the stats() function to be made slower.
Definition at line 34 of file IOStats.cxx.
| ReadStats & xAOD::IOStats::stats | ( | ) |
Access the object belonging to the current thread.
Components collecting information should always use this function. It is safe to be called at any point during the process, from any thread, without any outside protection.
Definition at line 17 of file IOStats.cxx.
|
mutableprivate |
|
private |
|
private |