Ignore:
Timestamp:
10/15/06 16:44:55 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MEnv.cc

    r7808 r8071  
    4848
    4949using namespace std;
     50
     51//---------------------------------------------------------------------------
     52//
     53// (Default) constructor. If the given file cannot be accessed the data
     54// member fName is set to "" which can then be checked by IsValid()
     55//
     56MEnv::MEnv(const char *name) : TEnv(name), fName(name)
     57{
     58    fChecked.SetOwner();
     59
     60    if (fName.IsNull())
     61        return;
     62
     63    TString fname(name);
     64    gSystem->ExpandPathName(fname);
     65
     66    if (gSystem->AccessPathName(fname, kFileExists))
     67        fName = "";
     68}
    5069
    5170//---------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MEnv.h

    r7450 r8071  
    2626
    2727public:
    28     MEnv(const char *name="") : TEnv(name), fName(name) { fChecked.SetOwner(); }
     28    MEnv(const char *name="");
     29
     30    Bool_t      IsValid() const { return !fName.IsNull(); }
    2931
    3032    TObject    *Clone(const char *newname="") const;
Note: See TracChangeset for help on using the changeset viewer.