GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Friends
GGSTFilesHandler Class Reference

Class to handle group of Root files. More...

#include <GGSTFilesHandler.h>

Public Member Functions

 GGSTFilesHandler ()
 Constructor.
 
 ~GGSTFilesHandler ()
 Destructor.
 
unsigned int GetNFiles ()
 The number of files handled by this object. More...
 
const std::string & GetFileName (unsigned int iFile)
 Fetch the name of a handled file. More...
 

Friends

class GGSTRootReader
 

Detailed Description

Class to handle group of Root files.

This is a helper class for GGSTRootReader to help the management of groups of Root files. Files opened with different calls of GGSTRootReader::Open (possibly with wildcards or using a txt file containing the list of Root files) are handled by different GGSTFilesHandler objects. These handlers are in turn used to specify the files to be chained and read by each reader, allowing to read output informations spreaded on different files.

This class must be considered as an opaque handler from the point of view of the user. However some methods to retrieve informations about the handled files are present.

Definition at line 39 of file GGSTFilesHandler.h.

Member Function Documentation

const std::string & GGSTFilesHandler::GetFileName ( unsigned int  iFile)

Fetch the name of a handled file.

Parameters
iFileThe index of the desired file.
Returns
The name of the desired file.

Definition at line 35 of file GGSTFilesHandler.cpp.

35  {
36  static const std::string nullFile("");
37  if (iFile < GetNFiles())
38  return _files[iFile];
39  else
40  return nullFile;
41 }
unsigned int GetNFiles()
The number of files handled by this object.
unsigned int GGSTFilesHandler::GetNFiles ( )
inline

The number of files handled by this object.

Returns
The number of handled Root files.

Definition at line 51 of file GGSTFilesHandler.h.

51 { return _files.size(); }

The documentation for this class was generated from the following files: