KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
KVDatedFileManager Class Reference

Handles a set of different versions of files with the same base name and a timestamp.

Read all versions of file with a given basename in directory and put them in a list sorted according to their timestamps. Environment variables (like $KVROOT) and other special symbols ('~') can be used in the directory name.

Definition at line 54 of file KVDatedFileManager.h.

Public Member Functions

 KVDatedFileManager ()
 
 KVDatedFileManager (const Char_t *base, const Char_t *dir)
 
virtual ~KVDatedFileManager ()
 
const Char_tGetOldestVersion ()
 Returns name of file with earliest timestamp. More...
 
const Char_tGetPreviousVersion (const Char_t *name)
 
void Update ()
 Updates list of files. More...
 

Private Member Functions

void ReadFiles ()
 

Private Attributes

KVString fBaseName
 the base name of the file More...
 
KVString fDirectory
 the directory containg the files More...
 
KVList fFileList
 list of files sorted by timestamp More...
 

#include <KVDatedFileManager.h>

Constructor & Destructor Documentation

◆ KVDatedFileManager() [1/2]

KVDatedFileManager::KVDatedFileManager ( )
inline

Definition at line 63 of file KVDatedFileManager.h.

◆ KVDatedFileManager() [2/2]

KVDatedFileManager::KVDatedFileManager ( const Char_t base,
const Char_t dir 
)

Read all versions of file with basename 'base' in directory 'dir' and put them in a list sorted according to their timestamps Environment variables ($KVROOT) and other special symbols ('~') can be used in the directory name.

Definition at line 25 of file KVDatedFileManager.cpp.

◆ ~KVDatedFileManager()

virtual KVDatedFileManager::~KVDatedFileManager ( )
inlinevirtual

Definition at line 65 of file KVDatedFileManager.h.

Member Function Documentation

◆ GetOldestVersion()

const Char_t * KVDatedFileManager::GetOldestVersion ( )

Returns name of file with earliest timestamp.

Definition at line 100 of file KVDatedFileManager.cpp.

◆ GetPreviousVersion()

const Char_t * KVDatedFileManager::GetPreviousVersion ( const Char_t name)

Returns name of file with timestamp immediately prior to the given name. Example: to know the name of the most recent backup version, give the base name of the file

If no older version exists, returns empty string

Definition at line 72 of file KVDatedFileManager.cpp.

◆ ReadFiles()

void KVDatedFileManager::ReadFiles ( )
private

Read all versions of file with given basename in directory and put them in a list sorted according to their timestamps

Definition at line 41 of file KVDatedFileManager.cpp.

◆ Update()

void KVDatedFileManager::Update ( )

Updates list of files.

Definition at line 112 of file KVDatedFileManager.cpp.

Member Data Documentation

◆ fBaseName

KVString KVDatedFileManager::fBaseName
private

the base name of the file

Definition at line 55 of file KVDatedFileManager.h.

◆ fDirectory

KVString KVDatedFileManager::fDirectory
private

the directory containg the files

Definition at line 56 of file KVDatedFileManager.h.

◆ fFileList

KVList KVDatedFileManager::fFileList
private

list of files sorted by timestamp

Definition at line 57 of file KVDatedFileManager.h.


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