File size of a closed remote file

Please read tips for efficient and successful posting and posting code

ROOT Version: 5.34.36
Platform: CentOS 7
Compiler: gcc 4.9

My off-line production system is based on C++ and ROOT. To keep track of the amount of written data, when I close an output file I do the following:

  fOutSizeTotal += fTFileHandle->GetSize();
  delete fTFileHandle;

This works fine for local files but when I use this code with xrootd remote files like


I get this error:

Error in <TNetXNGFile::TNetXNGFile>: The remote file is not open

What is the correct procedure to get the final size of a xrootd remote file after closing it?

Thank you

Emanuele Leonardi


Can you try with

  fOutSizeTotal += fTFileHandle->GetSize();

before closing the file?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.