Changeset 9268
- Timestamp:
- 01/26/09 10:54:04 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r9255 r9268 89 89 #pragma link C++ class MParameterD+; 90 90 #pragma link C++ class MParameterDerr+; 91 92 #pragma link C++ class MParEnv+; 91 93 #pragma link C++ class MParEmulated+; 92 94 -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r9186 r9268 920 920 // Check For: Job4.MClassName.Varname 921 921 if (print) 922 *fLog << all << "Testing Prefix+Clas Name: " << prefix+ClassName() << endl;922 *fLog << all << "Testing Prefix+ClassName: " << prefix+ClassName() << endl; 923 923 rc = ReadEnv(env, prefix+ClassName(), print); 924 924 if (rc==kERROR || rc==kTRUE) -
trunk/MagicSoft/Mars/mbase/MParList.cc
r9026 r9268 51 51 52 52 #include "MIter.h" 53 #include "MParEnv.h" 53 54 #include "MTaskList.h" 54 55 … … 349 350 TObject *MParList::FindObject(const char *name) const 350 351 { 351 return fContainer->FindObject(name); 352 TObject *obj = fContainer->FindObject(name); 353 const MParEnv *env = dynamic_cast<const MParEnv*>(obj); 354 return env ? env->GetCont() : obj; 352 355 } 353 356 … … 358 361 TObject *MParList::FindObject(const TObject *obj) const 359 362 { 360 return fContainer->FindObject(obj); 363 TObject *ret = fContainer->FindObject(obj); 364 const MParEnv *env = dynamic_cast<const MParEnv*>(ret); 365 return env ? env->GetCont() : ret; 361 366 } 362 367 … … 370 375 TObject *MParList::FindObject(const char *name, const char *classname) const 371 376 { 372 TObject *obj = fContainer->FindObject(name);377 TObject *obj = FindObject(name); 373 378 374 379 if (!obj) … … 391 396 TObject *MParList::FindObject(const TObject *obj, const char *classname) const 392 397 { 393 TObject *nobj = fContainer->FindObject(obj);398 TObject *nobj = FindObject(obj); 394 399 395 400 if (!nobj) -
trunk/MagicSoft/Mars/mbase/MParameters.cc
r7808 r9268 81 81 } 82 82 83 // -------------------------------------------------------------------------- 84 // 85 // Print value of container. 86 // 83 87 void MParameterD::Print(Option_t *) const 84 88 { … … 86 90 } 87 91 92 // -------------------------------------------------------------------------- 93 // 94 // Print value and error of container. 95 // 88 96 void MParameterDerr::Print(Option_t *) const 89 97 { … … 91 99 } 92 100 101 // -------------------------------------------------------------------------- 102 // 103 // Print value of container. 104 // 93 105 void MParameterI::Print(Option_t *) const 94 106 { 95 107 *fLog << all << GetDescriptor() << ": Val=" << fVal << endl; 96 108 } 109 110 // -------------------------------------------------------------------------- 111 // 112 // MParameterD.Val: 55.7 113 // 114 Int_t MParameterD::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 115 { 116 Bool_t rc = kFALSE; 117 if (IsEnvDefined(env, prefix, "Val", print)) 118 { 119 rc = kTRUE; 120 fVal = GetEnvValue(env, prefix, "Val", fVal); 121 } 122 return rc; 123 } 124 125 // -------------------------------------------------------------------------- 126 // 127 // MParameterD.Val: 55.7 128 // MParameterD.Err: 12.3 129 // 130 Int_t MParameterDerr::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 131 { 132 Int_t rc = MParameterD::ReadEnv(env, prefix, print); 133 if (rc==kERROR) 134 return kERROR; 135 136 if (IsEnvDefined(env, prefix, "Err", print)) 137 { 138 rc = kTRUE; 139 fErr = GetEnvValue(env, prefix, "Err", fErr); 140 } 141 return rc; 142 } 143 144 // -------------------------------------------------------------------------- 145 // 146 // MParameterD.Val: 42 147 // 148 Int_t MParameterI::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 149 { 150 Bool_t rc = kFALSE; 151 if (IsEnvDefined(env, prefix, "Val", print)) 152 { 153 rc = kTRUE; 154 fVal = GetEnvValue(env, prefix, "Val", fVal); 155 } 156 return rc; 157 } -
trunk/MagicSoft/Mars/mbase/MParameters.h
r9035 r9268 10 10 private: 11 11 Double_t fVal; 12 13 protected: 14 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 12 15 13 16 public: … … 29 32 Double_t fErr; 30 33 34 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 35 31 36 public: 32 37 MParameterDerr(const char *name=NULL, const char *title=NULL); … … 45 50 private: 46 51 Int_t fVal; 52 53 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 47 54 48 55 public: -
trunk/MagicSoft/Mars/mbase/Makefile
r9255 r9268 34 34 MParContainer.cc \ 35 35 MParEmulated.cc \ 36 MParEnv.cc \ 36 37 MParameters.cc \ 37 38 MInputStreamID.cc \
Note:
See TracChangeset
for help on using the changeset viewer.