Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IOStats.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef XAODCORE_TOOLS_IOSTATS_H
8 #define XAODCORE_TOOLS_IOSTATS_H
9 
10 // System include(s):
11 #include <map>
12 #include <thread>
13 #include <mutex>
14 
15 // EDM include(s):
18 
19 // Local include(s):
21 
22 namespace xAOD {
23 
24  // Forward declaration(s):
25  class ReadStats;
26 
35  class IOStats {
36 
37  public:
39  static IOStats& instance();
40 
49  ReadStats& stats();
50 
64  ReadStats merged() const;
65 
66  private:
68  IOStats();
70  IOStats( const IOStats& ) = delete;
71 
73  std::map< std::thread::id, ReadStats > m_stats;
74 
76  AthContainers_detail::thread_specific_ptr< ReadStats > m_ptr;
77 
80 
81  }; // class IOStats
82 
83 } // namespace xAOD
84 
85 #endif // XAODCORE_TOOLS_IOSTATS_H
xAOD::IOStats::m_ptr
AthContainers_detail::thread_specific_ptr< ReadStats > m_ptr
Thread specific pointer to the ReadStats object of the current thread.
Definition: IOStats.h:76
xAOD::IOStats::stats
ReadStats & stats()
Access the object belonging to the current thread.
Definition: IOStats.cxx:17
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
xAOD::IOStats::IOStats
IOStats(const IOStats &)=delete
The copy constructor is deleted.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
ReadStats.h
xAOD::IOStats::IOStats
IOStats()
The constructor of the object is made private.
Definition: IOStats.cxx:49
xAOD::IOStats::instance
static IOStats & instance()
Singleton object accessor.
Definition: IOStats.cxx:11
xAOD::IOStats
Singleton object holding on to the process's I/O statistics.
Definition: IOStats.h:35
threading.h
Threading definitions.
xAOD::IOStats::merged
ReadStats merged() const
Access the statistics object, merging information from all threads.
Definition: IOStats.cxx:34
xAOD::IOStats::m_mutex
std::mutex m_mutex
Mutex for accessing the read statistics.
Definition: IOStats.h:79
xAOD::ReadStats
Class describing the access statistics of a collection of branches.
Definition: ReadStats.h:123
thread_specific_ptr.h
xAOD::IOStats::m_stats
std::map< std::thread::id, ReadStats > m_stats
Objects describing the file access pattern, per thread.
Definition: IOStats.h:73