Changeset 1474 for trunk/MagicSoft/Mars/mdata
- Timestamp:
- 08/02/02 09:32:34 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mdata
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mdata/MData.cc
r1361 r1474 50 50 #include <fstream.h> 51 51 52 #include "MLog.h" 53 52 54 ClassImp(MData); 53 55 … … 58 60 } 59 61 62 void MData::Print(Option_t *opt = "") const 63 { 64 *fLog << GetRule() << flush; 65 } -
trunk/MagicSoft/Mars/mdata/MData.h
r1348 r1474 18 18 public: 19 19 virtual Double_t GetValue() const = 0; 20 virtual Bool_t IsValid() const = 0; 21 virtual Bool_t PreProcess(const MParList *plist) = 0; 20 virtual Bool_t IsValid() const = 0; 21 virtual Bool_t PreProcess(const MParList *plist) = 0; 22 virtual TString GetRule() const = 0; 22 23 23 24 Double_t operator()() { return GetValue(); } 24 25 26 void Print(Option_t *opt = "") const; 25 27 Bool_t AsciiWrite(ostream &out) const; 26 28 -
trunk/MagicSoft/Mars/mdata/MDataChain.cc
r1465 r1474 448 448 } 449 449 450 /* 450 451 void MDataChain::Print(Option_t *opt) const 451 452 { 453 *fLog << GetRule() << flush; 452 454 Bool_t bracket = fOperatorType!=kENoop && !fMember->InheritsFrom(MDataList::Class()); 453 455 … … 483 485 if (bracket) 484 486 *fLog << ")" << flush; 485 } 487 } 488 */ 489 490 TString MDataChain::GetRule() const 491 { 492 TString str; 493 494 Bool_t bracket = fOperatorType!=kENoop && !fMember->InheritsFrom(MDataList::Class()); 495 496 switch (fOperatorType) 497 { 498 case kEAbs: str += "abs" ; break; 499 case kELog: str += "log" ; break; 500 case kELog10: str += "log10" ; break; 501 case kESin: str += "sin" ; break; 502 case kECos: str += "cos" ; break; 503 case kETan: str += "tan" ; break; 504 case kESinH: str += "sinh" ; break; 505 case kECosH: str += "cosh" ; break; 506 case kETanH: str += "tanh" ; break; 507 case kEASin: str += "asin" ; break; 508 case kEACos: str += "acos" ; break; 509 case kEATan: str += "atan" ; break; 510 case kESqrt: str += "sqrt" ; break; 511 case kEExp: str += "exp" ; break; 512 case kEPow10: str += "pow10" ; break; 513 case kESgn: str += "sgn" ; break; 514 case kENegative: str += "-" ; break; 515 case kEPositive: str += "+" ; break; 516 case kENoop: 517 break; 518 } 519 520 if (bracket) 521 str += "("; 522 523 str += fMember->GetRule(); 524 525 if (bracket) 526 str += ")"; 527 528 return str; 529 } -
trunk/MagicSoft/Mars/mdata/MDataChain.h
r1465 r1474 63 63 Bool_t IsReadyToSave() const; 64 64 65 void Print(Option_t *opt = "") const; 65 // void Print(Option_t *opt = "") const; 66 67 TString GetRule() const; 66 68 67 69 ClassDef(MDataChain, 0) // A chain/concatenation of MData objects -
trunk/MagicSoft/Mars/mdata/MDataList.cc
r1348 r1474 204 204 // one the option string must conatin a "v" 205 205 // 206 /* 206 207 void MDataList::Print(Option_t *opt) const 207 208 { … … 251 252 252 253 *fLog << ")" << flush; 253 } 254 254 } 255 */ 256 257 TString MDataList::GetRule() const 258 { 259 TIter Next(&fMembers); 260 261 MData *member=(MData*)Next(); 262 263 // 264 // loop over all members 265 // 266 if (!member) 267 return "(<empty>)"; 268 269 TString str = "("; 270 271 str += member->GetRule(); 272 273 while ((member=(MData*)Next())) 274 { 275 switch (fSign) 276 { 277 case kENone: 278 break; 279 280 case kEPlus: 281 str += "+"; 282 break; 283 284 case kEMinus: 285 str += "-"; 286 break; 287 288 case kEMult: 289 str += "*"; 290 break; 291 292 case kEDiv: 293 str += "/"; 294 break; 295 } 296 297 str += member->GetRule(); 298 } 299 300 str += ")"; 301 302 return str; 303 } -
trunk/MagicSoft/Mars/mdata/MDataList.h
r1348 r1474 46 46 Bool_t PreProcess(const MParList *plist); 47 47 48 void Print(Option_t *opt = "") const; 48 // void Print(Option_t *opt = "") const; 49 TString GetRule() const; 49 50 50 51 ClassDef(MDataList, 0) // A concatenation of MData objects by one operator -
trunk/MagicSoft/Mars/mdata/MDataMember.cc
r1348 r1474 158 158 // Print the name of the data member without an CR. 159 159 // 160 /* 160 161 void MDataMember::Print(Option_t *opt) const 161 162 { 162 163 *fLog << fName << flush; 163 164 } 165 */ 164 166 167 TString MDataMember::GetRule() const 168 { 169 return fName; 170 } -
trunk/MagicSoft/Mars/mdata/MDataMember.h
r1348 r1474 32 32 Bool_t IsReadyToSave() const; 33 33 34 void Print(Option_t *opt = "") const; 34 //void Print(Option_t *opt = "") const; 35 TString GetRule() const; 35 36 36 37 ClassDef(MDataMember, 0) // MData object corresponding to a single data member of a Mars container -
trunk/MagicSoft/Mars/mdata/MDataValue.cc
r1327 r1474 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 04/2002 <mailto:tbretz@ uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz 04/2002 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2002 … … 40 40 // -------------------------------------------------------------------------- 41 41 // 42 // Print the value42 // Return the value as a string 43 43 // 44 void MDataValue::Print(Option_t *opt) const44 TString MDataValue::GetRule() const 45 45 { 46 *fLog << fValue << flush; 46 TString str; 47 str += fValue; 48 return str.Strip(TString::kBoth); 47 49 } 48 50 -
trunk/MagicSoft/Mars/mdata/MDataValue.h
r1348 r1474 28 28 Bool_t IsReadyToSave() const { return kFALSE; } 29 29 30 void Print(Option_t *opt = "") const; 30 //void Print(Option_t *opt = "") const; 31 TString GetRule() const; 31 32 32 33 ClassDef(MDataValue, 0) // MData object corresponding to a single value
Note:
See TracChangeset
for help on using the changeset viewer.