ATLAS Offline Software
IOStats.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 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):
17 
18 // Local include(s):
20 
21 namespace xAOD {
22 
23  // Forward declaration(s):
24  class ReadStats;
25 
34  class IOStats {
35 
36  public:
38  static IOStats& instance();
39 
48  ReadStats& stats();
49 
63  ReadStats merged() const;
64 
65  private:
67  IOStats();
69  IOStats( const IOStats& ) = delete;
70 
72  std::map< std::thread::id, ReadStats > m_stats;
73 
75  AthContainers_detail::thread_specific_ptr< ReadStats > m_ptr;
76 
79 
80  }; // class IOStats
81 
82 } // namespace xAOD
83 
84 #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:75
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:34
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:78
xAOD::ReadStats
Class describing the access statistics of a collection of branches.
Definition: ReadStats.h:123
xAOD::IOStats::m_stats
std::map< std::thread::id, ReadStats > m_stats
Objects describing the file access pattern, per thread.
Definition: IOStats.h:72