ATLAS Offline Software
Loading...
Searching...
No Matches
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
22namespace xAOD {
23
24 // Forward declaration(s):
25 class ReadStats;
26
35 class IOStats {
36
37 public:
39 static IOStats& instance();
40
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
79 mutable std::mutex m_mutex;
80
81 }; // class IOStats
82
83} // namespace xAOD
84
85#endif // XAODCORE_TOOLS_IOSTATS_H
std::map< std::thread::id, ReadStats > m_stats
Objects describing the file access pattern, per thread.
Definition IOStats.h:73
ReadStats & stats()
Access the object belonging to the current thread.
Definition IOStats.cxx:17
AthContainers_detail::thread_specific_ptr< ReadStats > m_ptr
Thread specific pointer to the ReadStats object of the current thread.
Definition IOStats.h:76
IOStats(const IOStats &)=delete
The copy constructor is deleted.
ReadStats merged() const
Access the statistics object, merging information from all threads.
Definition IOStats.cxx:34
IOStats()
The constructor of the object is made private.
Definition IOStats.cxx:49
std::mutex m_mutex
Mutex for accessing the read statistics.
Definition IOStats.h:79
static IOStats & instance()
Singleton object accessor.
Definition IOStats.cxx:11
Class describing the access statistics of a collection of branches.
Definition ReadStats.h:123
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Threading definitions.