Changeset 19256 for trunk/Mars/mdata
- Timestamp:
- 10/22/18 18:49:04 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mdata/MDataPhrase.cc
r9552 r19256 116 116 #include <TFormula.h> 117 117 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,26,00) 118 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 118 119 #include <TFormulaPrimitive.h> 120 #else 121 #include <v5/TFormulaPrimitive.h> 122 #endif 119 123 #endif 120 124 … … 472 476 MDataPhrase::MDataPhrase(const char *rule, const char *name, const char *title) : fFormula(0) 473 477 { 478 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 479 #define TFP TFormulaPrimtive 480 #else 481 #define TFP ROOT::v5::TFormulaPrimitive 482 #endif 483 474 484 // More in TFormulaPrimitive.cxx 475 485 // More in TFormulaMathInterface 476 if (!TF ormulaPrimitive::FindFormula("isnan"))477 { 478 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("log2", "log2", (TFormulaPrimitive::GenFunc10)TMath::Log2));479 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("fabs", "fabs", (TFormulaPrimitive::GenFunc10)TMath::Abs));480 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("floor", "floor", (TFormulaPrimitive::GenFunc10)TMath::Floor));481 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("ceil", "ceil", (TFormulaPrimitive::GenFunc10)TMath::Ceil));482 483 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("nint", "nint", (TFormulaPrimitive::GenFunc10)MFastFun::Nint));484 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("round", "round", (TFormulaPrimitive::GenFunc10)MFastFun::Nint));485 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("sgn", "sgn", (TFormulaPrimitive::GenFunc10)MFastFun::Sign));486 487 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("isnan", "isnan", (TFormulaPrimitive::GenFunc10)MFastFun::IsNaN));488 TF ormulaPrimitive::AddFormula(new TFormulaPrimitive("finite", "finite", (TFormulaPrimitive::GenFunc10)MFastFun::Finite));486 if (!TFP::FindFormula("isnan")) 487 { 488 TFP::AddFormula(new TFP("log2", "log2", (TFP::GenFunc10)TMath::Log2)); 489 TFP::AddFormula(new TFP("fabs", "fabs", (TFP::GenFunc10)TMath::Abs)); 490 TFP::AddFormula(new TFP("floor", "floor", (TFP::GenFunc10)TMath::Floor)); 491 TFP::AddFormula(new TFP("ceil", "ceil", (TFP::GenFunc10)TMath::Ceil)); 492 493 TFP::AddFormula(new TFP("nint", "nint", (TFP::GenFunc10)MFastFun::Nint)); 494 TFP::AddFormula(new TFP("round", "round", (TFP::GenFunc10)MFastFun::Nint)); 495 TFP::AddFormula(new TFP("sgn", "sgn", (TFP::GenFunc10)MFastFun::Sign)); 496 497 TFP::AddFormula(new TFP("isnan", "isnan", (TFP::GenFunc10)MFastFun::IsNaN)); 498 TFP::AddFormula(new TFP("finite", "finite", (TFP::GenFunc10)MFastFun::Finite)); 489 499 } 490 500
Note:
See TracChangeset
for help on using the changeset viewer.