ATLAS Offline Software
TFileAccessTracer.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 //
3 // Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4 //
5 #ifndef XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H
6 #define XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H
7 
8 // System include(s):
9 #include <set>
10 #include <string>
11 #include <mutex>
12 
13 // ROOT include(s):
14 #include <TString.h>
15 #include <TInetAddress.h>
16 
17 // Forward declaration(s):
18 class TFile;
19 
20 namespace xAOD {
21 
23  class ReadStats;
24 
47 
48  public:
53 
55  void add( const ::TFile& file );
56 
58  const std::string& serverAddress() const;
60  void setServerAddress( const std::string& addr );
61 
63  ::Double_t monitoredFraction() const;
65  void setMonitoredFraction( ::Double_t value );
66 
68  static void enableDataSubmission( ::Bool_t value );
69 
70  private:
72  class AccessedFile {
73  public:
75  ::TString filePath;
77  ::TString fileName;
79  bool operator< ( const AccessedFile& rhs ) const;
81  ::TString fullFilePath() const;
82  };
83 
85  std::set< AccessedFile > m_accessedFiles;
86 
88  std::string m_serverAddress;
90  ::TInetAddress m_serverInetAddress;
91 
93  ::Double_t m_monitoredFraction;
94 
97 
100 
101  }; // class TFileAccessTracer
102 
103 } // namespace xAOD
104 
105 #endif // XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H
xAOD::TFileAccessTracer::setMonitoredFraction
void setMonitoredFraction(::Double_t value)
Set the fraction of jobs that should send monitoring information.
Definition: TFileAccessTracer.cxx:267
xAOD::TFileAccessTracer::AccessedFile::fileName
::TString fileName
The name of the file.
Definition: TFileAccessTracer.h:77
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
xAOD::TFileAccessTracer::m_serverAddress
std::string m_serverAddress
Address of the server to send monitoring information to.
Definition: TFileAccessTracer.h:88
xAOD::TFileAccessTracer::enableDataSubmission
static void enableDataSubmission(::Bool_t value)
Function for turning data submission on/off.
Definition: TFileAccessTracer.cxx:281
xAOD::TFileAccessTracer::add
void add(const ::TFile &file)
Add information about a new file that got accessed.
Definition: TFileAccessTracer.cxx:223
xAOD::TFileAccessTracer::~TFileAccessTracer
~TFileAccessTracer()
Destructor.
Definition: TFileAccessTracer.cxx:48
athena.value
value
Definition: athena.py:124
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TFileAccessTracer::monitoredFraction
::Double_t monitoredFraction() const
Fraction of jobs that should send monitoring information.
Definition: TFileAccessTracer.cxx:259
xAOD::TFileAccessTracer::AccessedFile
Helper class storing information about the accessed files.
Definition: TFileAccessTracer.h:72
xAOD::TFileAccessTracer::m_mutex
std::mutex m_mutex
Mutex for modifying the object.
Definition: TFileAccessTracer.h:99
xAOD::TFileAccessTracer::AccessedFile::filePath
::TString filePath
The full path to the file.
Definition: TFileAccessTracer.h:75
file
TFile * file
Definition: tile_monitor.h:29
xAOD::TFileAccessTracer::TFileAccessTracer
TFileAccessTracer()
Default constructor.
Definition: TFileAccessTracer.cxx:30
xAOD::TFileAccessTracer::m_serverInetAddress
::TInetAddress m_serverInetAddress
Technical address of the server.
Definition: TFileAccessTracer.h:90
xAOD::TFileAccessTracer::m_monitoredFraction
::Double_t m_monitoredFraction
Fraction of jobs that should send monitoring information.
Definition: TFileAccessTracer.h:93
xAOD::TFileAccessTracer::setServerAddress
void setServerAddress(const std::string &addr)
Set the address of the server that information is sent to.
Definition: TFileAccessTracer.cxx:245
xAOD::TFileAccessTracer
Helper class keeping track of the files that got accessed.
Definition: TFileAccessTracer.h:46
xAOD::TFileAccessTracer::m_accessedFiles
std::set< AccessedFile > m_accessedFiles
List of all the input files that were accessed in the job.
Definition: TFileAccessTracer.h:85
xAOD::TFileAccessTracer::AccessedFile::operator<
bool operator<(const AccessedFile &rhs) const
Operator to be able to put this into an std::set.
Definition: TFileAccessTracer.cxx:296
xAOD::TFileAccessTracer::serverAddress
const std::string & serverAddress() const
The address of the server that information is sent to.
Definition: TFileAccessTracer.cxx:237
xAOD::ReadStats
Class describing the access statistics of a collection of branches.
Definition: ReadStats.h:123
xAOD::TFileAccessTracer::AccessedFile::fullFilePath
::TString fullFilePath() const
Function returning the full file path.
Definition: TFileAccessTracer.cxx:315
xAOD::TFileAccessTracer::m_readStats
ReadStats * m_readStats
Object describing the job's xAOD access statistics.
Definition: TFileAccessTracer.h:96