00001
00002
00003 #ifndef XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H
00004 #define XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H
00005
00006
00007 #include <set>
00008 #include <string>
00009
00010
00011 #include <TString.h>
00012 #include <TInetAddress.h>
00013
00014
00015 class TFile;
00016
00017 namespace xAOD {
00018
00020 class ReadStats;
00021
00046 class TFileAccessTracer {
00047
00048 public:
00050 TFileAccessTracer();
00052 ~TFileAccessTracer();
00053
00055 void add( const ::TFile& file );
00056
00058 const std::string& serverAddress() const;
00060 void setServerAddress( const std::string& addr );
00061
00063 ::Double_t monitoredFraction() const;
00065 void setMonitoredFraction( ::Double_t value );
00066
00068 static void enableDataSubmission( ::Bool_t value );
00069
00070 private:
00072 class AccessedFile {
00073 public:
00075 ::TString filePath;
00077 ::TString fileName;
00079 bool operator< ( const AccessedFile& rhs ) const;
00081 ::TString fullFilePath() const;
00082 };
00083
00085 std::set< AccessedFile > m_accessedFiles;
00086
00088 std::string m_serverAddress;
00090 ::TInetAddress m_serverInetAddress;
00091
00093 ::Double_t m_monitoredFraction;
00094
00096 ReadStats* m_readStats;
00097
00099 static ::Bool_t m_enableDataSumbission;
00100
00101 };
00102
00103 }
00104
00105 #endif // XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H