Changeset 8674 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 08/18/07 12:04:44 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MEnv.cc
r8539 r8674 71 71 if (GetEntries()<=0 && !fname.IsNull() && fname!=name) 72 72 ReadFile(fname, kEnvLocal);; 73 } 74 75 //--------------------------------------------------------------------------- 76 // 77 // Make sure that the name used for writing doesn't contain a full path 78 // 79 const char *MEnv::GetName() const 80 { 81 const char *pos = strrchr(GetRcName(), '/'); 82 return pos>0 ? pos+1 : GetRcName(); 73 83 } 74 84 … … 847 857 //--------------------------------------------------------------------------- 848 858 // 859 // Add name and full path to output 860 // 861 void MEnv::PrintEnv(EEnvLevel level) const 862 { 863 cout << "# Path: " << GetRcName() << endl; 864 cout << "# Name: " << GetName() << endl; 865 TEnv::PrintEnv(level); 866 } 867 868 //--------------------------------------------------------------------------- 869 // 849 870 // Print resources which have never been touched (for debugging) 850 871 // -
trunk/MagicSoft/Mars/mbase/MEnv.h
r8582 r8674 38 38 const char *GetValue(const char *name, const char *dflt); 39 39 40 const char *GetName() const { return GetRcName(); }40 const char *GetName() const { return strrchr(GetRcName(), '/')?strrchr(GetRcName(), '/')+1:GetRcName(); } 41 41 42 42 Int_t GetColor(const char *name, Int_t dftl); … … 67 67 void AddEnv(const TEnv &env, Bool_t overwrite=kTRUE); 68 68 69 void PrintEnv(EEnvLevel level = kEnvAll) const; 69 70 void Print(Option_t *option) const { TEnv::Print(option); } 70 void Print() const { TEnv::PrintEnv(kEnvLocal); } //*MENU*71 void Print() const { PrintEnv(kEnvLocal); } //*MENU* 71 72 72 73 void PrintUntouched() const;
Note:
See TracChangeset
for help on using the changeset viewer.