KaliVeda
Toolkit for HIC analysis
KVSystemDirectory Class Reference

Detailed Description

Extension of ROOT TSystemDirectory class, handling browsing directories on disk.

Created by KVClassFactory on Mon Sep 24 10:45:52 2012 Author: John Frankland,,,

Definition at line 15 of file KVSystemDirectory.h.

#include <KVSystemDirectory.h>

Inheritance diagram for KVSystemDirectory:

Public Member Functions

 KVSystemDirectory ()
 Default constructor. More...
 
 KVSystemDirectory (const Char_t *dirname, const Char_t *path)
 
virtual ~KVSystemDirectory ()
 Destructor. More...
 
virtual TList * GetListOfDirectories () const
 
virtual TList * GetListOfFiles () const
 
Long64_t GetTotalFiles () const
 
Long64_t GetTotalSize () const
 
Long64_t GetTotalSubdirs () const
 
void ls (Option_t *option="") const
 

Private Member Functions

virtual void GetListings ()
 Fill lists of files and directories. More...
 

Private Attributes

TList * fContents
 contents of directory More...
 
TList * fSubdirs
 subdirectories of directory More...
 
Long64_t fTotDirs
 total size of files in subdirectories More...
 
Long64_t fTotFiles
 total size of files in directory More...
 

Constructor & Destructor Documentation

◆ KVSystemDirectory() [1/2]

KVSystemDirectory::KVSystemDirectory ( )

Default constructor.

Definition at line 18 of file KVSystemDirectory.cpp.

◆ KVSystemDirectory() [2/2]

KVSystemDirectory::KVSystemDirectory ( const Char_t *  dirname,
const Char_t *  path 
)

Constructor with name for directory and path. Path can be given as "." for current working directory. Shell variables can be used if written as "$(VARIABLE)"

Definition at line 34 of file KVSystemDirectory.cpp.

◆ ~KVSystemDirectory()

KVSystemDirectory::~KVSystemDirectory ( )
virtual

Destructor.

Definition at line 57 of file KVSystemDirectory.cpp.

Member Function Documentation

◆ GetListings()

void KVSystemDirectory::GetListings ( )
privatevirtual

Fill lists of files and directories.

Definition at line 101 of file KVSystemDirectory.cpp.

◆ GetListOfDirectories()

TList * KVSystemDirectory::GetListOfDirectories ( ) const
virtual

Returns a TList of KVSystemDirectory objects representing the contents of the directory. Returns 0 in case of errors.

Definition at line 87 of file KVSystemDirectory.cpp.

◆ GetListOfFiles()

TList * KVSystemDirectory::GetListOfFiles ( ) const
virtual

Returns a TList of KVSystemFile objects representing the contents of the directory. Returns 0 in case of errors.

Definition at line 71 of file KVSystemDirectory.cpp.

◆ GetTotalFiles()

Long64_t KVSystemDirectory::GetTotalFiles ( ) const
inline

Definition at line 28 of file KVSystemDirectory.h.

◆ GetTotalSize()

Long64_t KVSystemDirectory::GetTotalSize ( ) const
inline

Definition at line 36 of file KVSystemDirectory.h.

◆ GetTotalSubdirs()

Long64_t KVSystemDirectory::GetTotalSubdirs ( ) const
inline

Definition at line 32 of file KVSystemDirectory.h.

◆ ls()

void KVSystemDirectory::ls ( Option_t *  opt = "") const

if opt="nosubdirs", do not list contents of subdirectories default is to list recursively contents of all subdirectories

Definition at line 150 of file KVSystemDirectory.cpp.

Member Data Documentation

◆ fContents

TList* KVSystemDirectory::fContents
private

contents of directory

Definition at line 16 of file KVSystemDirectory.h.

◆ fSubdirs

TList* KVSystemDirectory::fSubdirs
private

subdirectories of directory

Definition at line 17 of file KVSystemDirectory.h.

◆ fTotDirs

Long64_t KVSystemDirectory::fTotDirs
private

total size of files in subdirectories

Definition at line 19 of file KVSystemDirectory.h.

◆ fTotFiles

Long64_t KVSystemDirectory::fTotFiles
private

total size of files in directory

Definition at line 18 of file KVSystemDirectory.h.