FACT++  1.0
bool DimWriteStatistics::FileOpened ( const std::string &  fileName)

Let the object know that a new file has been opened

Parameters
fileNamethe full name of the file newly opened
Returns
whether this file could be stated or not

Definition at line 206 of file DimWriteStatistics.cc.

References fBaseSize, fOpenedFiles, and GetFileSizeOnDisk().

Referenced by GetFileSizeOnDisk(), DataLogger::Start(), and EventBuilderWrapper::UpdateRuns().

207 {
208  if (fOpenedFiles.find(fileName) != fOpenedFiles.end())
209  return false;
210 
211  //Add a newly opened file, and remember its original size
212  const int64_t newSize = GetFileSizeOnDisk(fileName);
213  if (newSize == -1)
214  return false;
215 
216  fBaseSize += newSize;
217  fOpenedFiles.insert(fileName);
218 
219  return true;
220 }
std::set< std::string > fOpenedFiles
Total base size of all opened files.
int64_t GetFileSizeOnDisk(const std::string &file)
Returns the size on disk of a given file.
size_t fBaseSize
Duration, in millisecond between two service updates. 0 means no more updates.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: