Ignore:
Timestamp:
05/25/07 13:48:15 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8240 r8539  
    1818!   Author(s): Thomas Bretz  2/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2005
     20!   Copyright: MAGIC Software Development, 2000-2007
    2121!
    2222!
     
    5151//---------------------------------------------------------------------------
    5252//
    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 //
    56 MEnv::MEnv(const char *name) : TEnv(name), fName(name)
     53// (Default) constructor. If the given file cannot be accessed SetRcName("")
     54// is called which can then be checked by IsValid()
     55//
     56MEnv::MEnv(const char *name) : TEnv(name)
    5757{
    5858    fChecked.SetOwner();
    5959
    60     if (fName.IsNull())
     60    if (!IsValid())
    6161        return;
    6262
     
    6565
    6666    if (gSystem->AccessPathName(fname, kFileExists))
    67         fName = "";
     67        fname = "";
     68
     69    SetRcName(fname);
     70
     71    if (GetEntries()<=0 && !fname.IsNull() && fname!=name)
     72        ReadFile(fname, kEnvLocal);;
     73}
     74
     75//---------------------------------------------------------------------------
     76//
     77// Return the total number of entries in the table
     78//
     79Int_t MEnv::GetEntries() const
     80{
     81    if (!GetTable())
     82        return -1;
     83
     84    return GetTable()->GetEntries();
    6885}
    6986
     
    123140{
    124141    MEnv *env = new MEnv("/dev/null");
    125     env->fName = fName;
     142    env->SetRcName(GetRcName());
    126143    env->AddEnv(*this);
    127144    return env;
     
    836853    int i=0;
    837854    gLog << inf << flush;
    838     gLog.Separator("Untouched Resources");
     855
     856    TString sep = "Untouched Resources - ";
     857    sep += GetRcName();
     858    gLog.Separator(sep);
    839859    TIter Next(GetTable());
    840860    TObject *o=0;
Note: See TracChangeset for help on using the changeset viewer.