Changeset 4722 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 08/24/04 14:51:17 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MArgs.cc
r4452 r4722 231 231 // -------------------------------------------------------------------------- 232 232 // 233 // Returns GetIntAndRemove. If HasOption returns kFALSE def is returned. 234 // 235 Int_t MArgs::GetIntAndRemove(const TString name, Int_t def) 236 { 237 if (!HasOption(name)) 238 return def; 239 return GetIntAndRemove(name); 240 } 241 242 // -------------------------------------------------------------------------- 243 // 244 // Returns GetFloatAndRemove. If HasOption returns kFALSE def is returned. 245 // 246 Double_t MArgs::GetFloatAndRemove(const TString name, Double_t def) 247 { 248 if (!HasOption(name)) 249 return def; 250 return GetFloatAndRemove(name); 251 } 252 253 // -------------------------------------------------------------------------- 254 // 255 // Returns GetStringAndRemove. If HasOption returns kFALSE def is returned. 256 // 257 TString MArgs::GetStringAndRemove(const TString name, const TString def) 258 { 259 if (!HasOption(name)) 260 return def; 261 return GetStringAndRemove(name); 262 } 263 264 // -------------------------------------------------------------------------- 265 // 233 266 // Return the TString corresponding to the i-th argument. 234 267 // This is ment for enumerations like -
trunk/MagicSoft/Mars/mbase/MArgs.h
r3183 r4722 43 43 TString GetStringAndRemove(const TString name); 44 44 45 Int_t GetIntAndRemove(const TString name, Int_t def); 46 Double_t GetFloatAndRemove(const TString name, Double_t def); 47 TString GetStringAndRemove(const TString name, const TString def); 48 45 49 Bool_t Has(const TString name) const; 46 50 Bool_t HasOnly(const TString name) const; -
trunk/MagicSoft/Mars/mbase/MDirIter.cc
r4215 r4722 151 151 // -------------------------------------------------------------------------- 152 152 // 153 // Adds all entries from iter to this object 154 // 155 void MDirIter::Add(const MDirIter &iter) 156 { 157 TIter Next(&iter.fList); 158 TObject *o=0; 159 while ((o=Next())) 160 fList.Add(o->Clone()); 161 } 162 163 // -------------------------------------------------------------------------- 164 // 153 165 // Return the pointer to the current directory. If the pointer is NULL 154 166 // a new directory is opened. If no new directory can be opened NULL is -
trunk/MagicSoft/Mars/mbase/MDirIter.h
r4219 r4722 49 49 50 50 Int_t AddDirectory(const char *dir, const char *filter="", Int_t recursive=0); 51 void Add(const MDirIter &iter); 51 52 void Reset(); 52 53 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r4601 r4722 964 964 Bool_t MEvtLoop::ReadEnv(const char *config) 965 965 { 966 return config ? ReadEnv(TEnv(config)) : kTRUE; 966 if (!config) 967 return kTRUE; 968 969 const Bool_t fileexist = !gSystem->AccessPathName(config, kFileExists); 970 if (!fileexist) 971 { 972 *fLog << warn << "WARNING - resource file '" << config << "' not found... no resources applied." << endl; 973 return kFALSE; 974 } 975 976 return ReadEnv(TEnv(config)); 967 977 } 968 978 -
trunk/MagicSoft/Mars/mbase/MLog.cc
r4601 r4722 512 512 // -------------------------------------------------------------------------- 513 513 // 514 // Print usage information setup in Setup() 515 // 516 void MLog::Usage() 517 { 518 // 1 2 3 4 5 6 7 8 519 // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 520 *this << " -v# Verbosity level # [default=2]" << endl; 521 *this << " -a, --no-colors Do not use Ansii color codes" << endl; 522 *this << " --debug[=n] Enable root debugging [default: gDebug=1]" << endl; 523 } 524 525 // -------------------------------------------------------------------------- 526 // 514 527 // Setup MLog and global debug output from command line arguments. 515 528 // -
trunk/MagicSoft/Mars/mbase/MLog.h
r4452 r4722 185 185 186 186 void Setup(MArgs &arg); 187 void Usage(); 187 188 188 189 void ReadEnv(const TEnv &env, TString prefix="", Bool_t print=kFALSE);
Note:
See TracChangeset
for help on using the changeset viewer.