- Timestamp:
- 07/08/11 09:49:52 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/FilesStatisticsService.cc
r11290 r11291 20 20 fCurrentFolder("."), 21 21 fContinueStats(true), 22 fDebug(false), 22 23 fBaseSize(0), 23 24 fPeriodDuration(1), … … 80 81 //! @param folder the path to the folder 81 82 // 82 bool FilesStatisticsService::SetCurrentFolder( string& folder)83 bool FilesStatisticsService::SetCurrentFolder(const string& folder) 83 84 { 84 85 fMutex.lock(); -
trunk/FACT++/src/FilesStatisticsService.h
r11290 r11291 25 25 { 26 26 private: 27 ///The name of the server which created the object 27 28 string fServerName; 29 ///The current folder being watched for free space 28 30 string fCurrentFolder; 31 ///The boost thread used to update the service 29 32 boost::thread fThread; 33 ///The data structure holding the stat data 30 34 FileStatisticsData fStats; 35 ///The mutex used to make sure that the service isn't updated while changing conf. 31 36 mutex fMutex; 37 ///the Dim service 32 38 DimDescribedService* fService; 39 ///Bool indicating if main loop should be exited 33 40 bool fContinueStats; 41 ///Bool indicating if debug information should be printed 34 42 bool fDebug; 43 ///Main loop 35 44 void UpdateService(); 45 ///Returns the free space on the disk of the folder being watched (fCurrentFolder) 36 46 long GetFreeSpace(); 47 ///Returns the size on disk of a given file 37 48 long GetFileSizeOnDisk(const string& file); 49 ///This is the total base size of all opened files 38 50 long fBaseSize; 51 ///This is the list of all opened files. set is used to easily check for entries 39 52 set<string> fOpenedFiles; 53 ///This is the duration, in second between two service updates. 0 means no more updates 40 54 float fPeriodDuration; 55 ///This is the MessageImp object used for messaging 41 56 MessageImp* fMess; 42 57 public: 43 ///Default constructor 44 // FilesStatisticsService(); 58 ///Constructor 45 59 FilesStatisticsService(const string& serverName, MessageImp* mess); 46 60 ///Default destructor 47 61 ~FilesStatisticsService(); 48 62 ///Configures that current folder where files are written to 49 bool SetCurrentFolder( string& folder);63 bool SetCurrentFolder(const string& folder); 50 64 bool FileOpened(const string& fileName); 51 65 void SetDebugMode(bool); -
trunk/FACT++/src/datalogger.cc
r11290 r11291 1696 1696 Message(str); 1697 1697 1698 fFilesStats.SetDebugMode(fDebugIsOn); 1699 1698 1700 return GetCurrentState(); 1699 1701 } … … 1708 1710 int DataLogger::SetStatsPeriod(const Event& evt) 1709 1711 { 1710 const float backupDuration = fStatsPeriodDuration;1712 /* const float backupDuration = fStatsPeriodDuration; 1711 1713 1712 1714 fStatsPeriodDuration = evt.GetFloat(); … … 1735 1737 Message(str); 1736 1738 } 1737 1739 */ 1740 fFilesStats.SetStatPeriod(evt.GetFloat()); 1738 1741 return GetCurrentState(); 1739 1742 } … … 1845 1848 1846 1849 target = givenPath; 1850 1851 fFilesStats.SetCurrentFolder(givenPath); 1847 1852 1848 1853 return GetCurrentState();
Note:
See TracChangeset
for help on using the changeset viewer.