ATLAS Offline Software
Loading...
Searching...
No Matches
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):
18class TFile;
19
20namespace 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:
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
94
97
99 mutable std::mutex m_mutex;
100
101 }; // class TFileAccessTracer
102
103} // namespace xAOD
104
105#endif // XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H
Class describing the access statistics of a collection of branches.
Definition ReadStats.h:123
Helper class storing information about the accessed files.
::TString filePath
The full path to the file.
::TString fileName
The name of the file.
::TString fullFilePath() const
Function returning the full file path.
bool operator<(const AccessedFile &rhs) const
Operator to be able to put this into an std::set.
void add(const ::TFile &file)
Add information about a new file that got accessed.
void setMonitoredFraction(::Double_t value)
Set the fraction of jobs that should send monitoring information.
::Double_t monitoredFraction() const
Fraction of jobs that should send monitoring information.
const std::string & serverAddress() const
The address of the server that information is sent to.
::Double_t m_monitoredFraction
Fraction of jobs that should send monitoring information.
ReadStats * m_readStats
Object describing the job's xAOD access statistics.
std::mutex m_mutex
Mutex for modifying the object.
::TInetAddress m_serverInetAddress
Technical address of the server.
static void enableDataSubmission(::Bool_t value)
Function for turning data submission on/off.
TFileAccessTracer()
Default constructor.
void setServerAddress(const std::string &addr)
Set the address of the server that information is sent to.
std::set< AccessedFile > m_accessedFiles
List of all the input files that were accessed in the job.
std::string m_serverAddress
Address of the server to send monitoring information to.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TFile * file