KaliVeda
Toolkit for HIC analysis
KVDatedFileManager Class Reference

Detailed Description

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 56 of file KVDatedFileManager.h.

#include <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...
 

Constructor & Destructor Documentation

◆ KVDatedFileManager() [1/2]

KVDatedFileManager::KVDatedFileManager ( )
inline

Definition at line 65 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 67 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.

◆ Update()

void KVDatedFileManager::Update ( )

Updates list of files.

Definition at line 112 of file KVDatedFileManager.cpp.