UtilFile Namespace Reference

Typedefs

typedef std::string Str
typedef std::vector< std::string > StrVec

Functions

bool CheckDir (const char *DirName, bool MakeDir=true)
bool CheckFile (Str FileName, bool TestCreate=false)
StrVec DirFileList (Str DirName="./", Str Suf=".root", bool IncludePath=true, bool IncludeSuf=true, StrVec FList=(StrVec) 0)
StrVec FileFileList (Str FileName, Str Suf=".root", bool IncludePath=true, bool IncludeSuf=true, StrVec FList=(StrVec) 0)
void FileListOut (Str FileName, StrVec FList, bool Append=false)
void FileListOut (Str FileName, Str FStr, bool Append=false)

Typedef Documentation

typedef std::string UtilFile::Str

Definition at line 8 of file UtilFile.h.

typedef std::vector<std::string> UtilFile::StrVec

Definition at line 9 of file UtilFile.h.


Function Documentation

bool UtilFile::CheckDir ( const char *  DirName,
bool  MakeDir = true 
)

Definition at line 19 of file UtilFile.cxx.

References gSystem(), Msg::kVerbose, and MSG.

00019                                                          {
00020   MSG("Util",Msg::kVerbose) << "UtilFile::CheckDir" << endl;
00021 
00022   string cwd = gSystem->pwd();
00023 
00024   if (gSystem->cd(DirName)) {
00025     gSystem->cd(cwd.c_str());
00026     return true;
00027   }
00028 
00029   if (!MakeDir) return false;
00030 
00031   gSystem->mkdir(DirName,kTRUE);
00032   if (gSystem->cd(DirName)) {
00033     gSystem->cd(cwd.c_str());
00034     return true;
00035   }
00036 
00037   gSystem->cd(cwd.c_str());
00038 
00039   return false;
00040 }

bool UtilFile::CheckFile ( Str  FileName,
bool  TestCreate = false 
)
StrVec UtilFile::DirFileList ( Str  DirName = "./",
Str  Suf = ".root",
bool  IncludePath = true,
bool  IncludeSuf = true,
StrVec  FList = (StrVec) 0 
)
StrVec UtilFile::FileFileList ( Str  FileName,
Str  Suf = ".root",
bool  IncludePath = true,
bool  IncludeSuf = true,
StrVec  FList = (StrVec) 0 
)
void UtilFile::FileListOut ( Str  FileName,
Str  FStr,
bool  Append = false 
)
void UtilFile::FileListOut ( Str  FileName,
StrVec  FList,
bool  Append = false 
)

Generated on 24 Apr 2018 for loon by  doxygen 1.6.1