Belle II Software light-2406-ragdoll
RootInputModule::ReadStats Struct Reference

for collecting statistics over multiple files. More...

Public Member Functions

void add (const ReadStats &b)
 add other stats object.
 
void addFromFile (const TFile *f)
 add current statistics from TFile object.
 
std::string getString () const
 string suitable for printing.
 

Public Attributes

long calls {0}
 number of read calls.
 
long bytesRead {0}
 total number of bytes read.
 
long bytesReadExtra {0}
 what TFile thinks was the overhead.
 

Detailed Description

for collecting statistics over multiple files.

Definition at line 188 of file RootInputModule.h.

Member Function Documentation

◆ add()

void add ( const ReadStats b)
inline

add other stats object.

Definition at line 193 of file RootInputModule.h.

194 {
195 calls += b.calls;
196 bytesRead += b.bytesRead;
197 bytesReadExtra += b.bytesReadExtra;
198 }
long calls
number of read calls.
long bytesRead
total number of bytes read.
long bytesReadExtra
what TFile thinks was the overhead.

◆ addFromFile()

void addFromFile ( const TFile *  f)
inline

add current statistics from TFile object.

Definition at line 200 of file RootInputModule.h.

201 {
202 calls += f->GetReadCalls();
203 bytesRead += f->GetBytesRead();
204 bytesReadExtra += f->GetBytesReadExtra();
205 }

◆ getString()

std::string getString ( ) const
inline

string suitable for printing.

Definition at line 207 of file RootInputModule.h.

208 {
209 std::string s;
210 s += "read: " + std::to_string(bytesRead) + " Bytes";
211 s += ", overhead: " + std::to_string(bytesReadExtra) + " Bytes";
212 s += ", Read() calls: " + std::to_string(calls);
213 return s;
214 }

Member Data Documentation

◆ bytesRead

long bytesRead {0}

total number of bytes read.

Definition at line 190 of file RootInputModule.h.

◆ bytesReadExtra

long bytesReadExtra {0}

what TFile thinks was the overhead.

Definition at line 191 of file RootInputModule.h.

◆ calls

long calls {0}

number of read calls.

Definition at line 189 of file RootInputModule.h.


The documentation for this struct was generated from the following file: