Changeset 8091
- Timestamp:
- 10/17/06 14:39:40 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8090 r8091 44 44 * mdata/MDataPhrase.cc: 45 45 - improved output in case of failure 46 47 * manalysis/MFiltercutsCalc.[h,cc], mbase/MContinue.cc, 48 mjoptim/MJOptimize.cc, mjtrain/MJTrainRanForest.cc, 49 mtools/MTFillMatrix.cc: 50 - replaced MFDataChain by MFDataPhrase 51 52 * mfbase/FBaseLinkDef.h, mfbase/Makefile: 53 - added new class MFDataPhrase 54 55 * mfbase/MF.[h,cc]: 56 - replaced all the parsing stuff by the usage of MFDataPhrase 57 58 * mfbase/MFDataPhrase.[h,cc]: 59 - added 46 60 47 61 -
trunk/MagicSoft/Mars/NEWS
r8089 r8091 3 3 *** <cvs> 4 4 5 - mtools: MRolke.[cc,h]: Modification of TRolke from root_v5.12.00b.5 - general: MRolke.[cc,h]: Modification of TRolke from root_v5.12.00b. 6 6 Class for calculation of confidence intervals (upper limits). 7 7 Use model 3 or 4 for upper limit calculation for MAGIC observations. 8 8 Please read the class instruction of TRolke for more information. 9 9 10 11 12 *** <cvs>13 14 10 - general: The programs now return 0xfe if the requested resource file 15 11 doesn't exist. … … 17 13 - general: Errors comming from root itself are now not output to 18 14 stderr anymore but to our default (colored) log-stream. 15 16 - general: Changed the interface to TFormula such that now everything 17 is parsed by TFormula, which should allow to use phrases even 18 without paranthesis correctly parsed. 19 19 20 20 -
trunk/MagicSoft/Mars/manalysis/MFiltercutsCalc.cc
r2206 r8091 40 40 #include "MLogManip.h" 41 41 42 #include "MF.h" 43 #include "MFDataChain.h" 42 #include "MFDataPhrase.h" 44 43 #include "MParList.h" 45 44 #include "MFilterList.h" … … 98 97 } 99 98 99 /* 100 100 // -------------------------------------------------------------------------- 101 101 // 102 102 // There is MUCH space for speed improvement! 103 // Add MF (lo<name && name<up) to the filter list (&&),104 // for more details see MF ::MF(), too.103 // Add MFDataPhrase(lo<name && name<up) to the filter list (&&), 104 // for more details see MFDataPhrase::MFDataPhrase(), too. 105 105 // 106 106 void MFiltercutsCalc::AddCut(const char *name, Double_t lo, Double_t up) 107 107 { 108 AddToList(new MFData Chain(name, '>', lo));109 AddToList(new MFData Chain(name, '<', up));108 AddToList(new MFDataPhrase(Form("%s>%.15f", name, lo)); 109 AddToList(new MFDataPhrase(name, '<', up)); 110 110 } 111 111 … … 113 113 // 114 114 // There is MUCH space for speed improvement! 115 // Add MF (fabs(name)<val) to the filter list (&&),116 // for more details see MF ::MF(), too.115 // Add MFDataPhrase(fabs(name)<val) to the filter list (&&), 116 // for more details see MFDataPhrase::MFDataPhrase(), too. 117 117 // 118 118 void MFiltercutsCalc::AddCut(const char *name, Double_t val) … … 120 120 AddToList(new MFDataChain(Form("fabs(%s)", name), '<', val)); 121 121 } 122 */ 122 123 123 124 // -------------------------------------------------------------------------- … … 125 126 // There is MUCH space for speed improvement! 126 127 // Add 'cut' as MF(cut) to the filter list (&&), 127 // for more details see MF ::MF(), too.128 // for more details see MFDataPhrase::MFDataPhrase(), too. 128 129 // 129 130 void MFiltercutsCalc::AddCut(const char *cut) 130 131 { 131 AddToList(new MF (cut));132 AddToList(new MFDataPhrase(cut)); 132 133 } 133 134 … … 135 136 // 136 137 // There is MUCH space for speed improvement! 137 // Add cut to filter list (&&), for more details see MF ::MF(), too.138 // Add cut to filter list (&&), for more details see MFDataPhrase::MFDataPhrase(), too. 138 139 // 139 140 void MFiltercutsCalc::AddCut(MFilter *f) -
trunk/MagicSoft/Mars/manalysis/MFiltercutsCalc.h
r2206 r8091 36 36 TString GetHadronnessName() const { return fHadronnessName; } 37 37 38 void AddCut(const char *name, Double_t lo, Double_t up);39 void AddCut(const char *name, Double_t val);38 //void AddCut(const char *name, Double_t lo, Double_t up); 39 //void AddCut(const char *name, Double_t val); 40 40 void AddCut(const char *cut); 41 41 void AddCut(MFilter *f); -
trunk/MagicSoft/Mars/mdata/MDataPhrase.cc
r8083 r8091 352 352 { 353 353 *fLog << err << dbginf << "Syntax Error: TFormula::Compile failed..."<< endl; 354 *fLog << " >" << rule << endl;355 *fLog << " >" << txt << endl;354 *fLog << " Full Rule: " << rule << endl; 355 *fLog << " Parsed Rule: " << txt << endl; 356 356 Clear(); 357 357 return kFALSE; -
trunk/MagicSoft/Mars/mfbase/FBaseLinkDef.h
r3330 r8091 12 12 #pragma link C++ class MFDataChain+; 13 13 #pragma link C++ class MFDataMember+; 14 #pragma link C++ class MFDataPhrase+; 14 15 #pragma link C++ class MFRealTimePeriod+; 15 16 -
trunk/MagicSoft/Mars/mfbase/MF.cc
r7804 r8091 88 88 #include "MParList.h" 89 89 90 #include "MFilterList.h"91 #include "MFData Chain.h"92 #include "MFDataMember.h"90 //#include "MFilterList.h" 91 #include "MFDataPhrase.h" 92 //#include "MFDataMember.h" 93 93 94 94 #include "MLog.h" … … 123 123 124 124 *fLog << inf << "Parsing filter rule... " << flush; 125 fF = new MFDataPhrase(text); 126 /* 125 127 if (!(fF=ParseString(text, 1))) 126 128 { … … 128 130 return; 129 131 } 130 132 */ 131 133 *fLog << inf << "found: "; 132 134 fF->Print(); … … 143 145 delete fF; 144 146 } 145 147 /* 146 148 // -------------------------------------------------------------------------- 147 149 // … … 348 350 return filter0; 349 351 } 352 */ 350 353 351 354 // -------------------------------------------------------------------------- … … 481 484 482 485 /* 486 // It is assumed that each filter itself calls MFilter::ReadEnv 487 // to process the Inverted directive 483 488 Bool_t rc = MFilter::ReadEnv(env, prefix, print); 484 489 if (rc==kERROR) 485 return kERROR;486 */490 return kERROR; 491 */ 487 492 if (IsEnvDefined(env, prefix, "Condition", print)) 488 493 { … … 523 528 SetAllowEmpty(kFALSE); 524 529 530 const Int_t fg = rule.First('>'); 531 const Int_t fl = rule.First('<'); 532 533 if (fg<0 && fl<0) 534 { 535 MFilter *f = (MFilter*)GetNewObject(rule, MFilter::Class()); 536 if (!f) 537 { 538 *fLog << err << dbginf << "Syntax Error: '" << rule << "' is neither a MFilter nor conditional sign found." << endl; 539 return kERROR; 540 } 541 fF = f; 542 } 543 else 544 fF = new MFDataPhrase(rule); 545 /* 525 546 if (!(fF=ParseString(rule, 1))) 526 547 { … … 528 549 return kERROR; 529 550 } 530 551 */ 531 552 if (print) 532 553 { -
trunk/MagicSoft/Mars/mfbase/MF.h
r7804 r8091 23 23 MFilter *fF; // Filter 24 24 Bool_t fAllowEmpty; // Not a Bit to be stored 25 25 /* 26 26 Int_t IsRule(TString &txt, TString &rule) const; 27 27 Int_t IsVal(const TString &txt) const; … … 30 30 MFilter *ParseRule(TString &txt, MFilter *filter0, Int_t level) const; 31 31 MFilter *ParseString(TString txt, Int_t level); 32 32 */ 33 33 void StreamPrimitive(ostream &out) const; 34 34 -
trunk/MagicSoft/Mars/mfbase/Makefile
r3927 r8091 16 16 17 17 SRCFILES = MF.cc \ 18 MFDataPhrase.cc \ 18 19 MFilterList.cc \ 19 20 MFEventSelector.cc \ -
trunk/MagicSoft/Mars/mjoptim/MJOptimize.cc
r7633 r8091 113 113 114 114 // filters 115 #include "MF .h"115 #include "MFDataPhrase.h" 116 116 #include "MFilterList.h" 117 117 … … 319 319 void MJOptimize::AddFilter(const char *rule) 320 320 { 321 fFilter.Add(new MF (rule));321 fFilter.Add(new MFDataPhrase(rule)); 322 322 } 323 323 … … 330 330 void MJOptimize::AddPreCut(const char *rule) 331 331 { 332 MFilter *f = new MF (rule);332 MFilter *f = new MFDataPhrase(rule); 333 333 f->SetBit(kCanDelete); 334 334 AddPreCut(f); -
trunk/MagicSoft/Mars/mjtrain/MJTrainRanForest.cc
r7749 r8091 37 37 #include "MLogManip.h" 38 38 39 #include "MF .h"39 #include "MFDataPhrase.h" 40 40 #include "MParameterCalc.h" 41 41 … … 54 54 void MJTrainRanForest::AddCut(TList &l, const char *rule) 55 55 { 56 MFilter *f = new MF (rule);56 MFilter *f = new MFDataPhrase(rule); 57 57 f->SetBit(kCanDelete); //FIXME!!!! Why does not any other list delete it??? 58 58 Add(l, f); -
trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc
r7687 r8091 98 98 99 99 // filters 100 #include "MF .h"100 #include "MFDataPhrase.h" 101 101 #include "MFilterList.h" 102 102 #include "MFEventSelector.h" … … 202 202 void MTFillMatrix::AddPreCut(const char *rule) 203 203 { 204 MFilter *f = new MF (rule);204 MFilter *f = new MFDataPhrase(rule); 205 205 f->SetBit(kCanDelete); 206 206 AddPreCut(f); … … 369 369 // entries in MTaskList 370 370 tlist.AddToList(fReader); // Read events 371 tlist.AddToList(fPreTasks );// PreTasks371 tlist.AddToList(fPreTasks, 0); // PreTasks 372 372 if (fPreCuts.GetEntries()>0) 373 373 tlist.AddToList(&cont0); // PreCuts … … 375 375 tlist.AddToList(&cont); // select a sample of events 376 376 tlist.AddToList(&invsplit); // process invsplit (which implicitly processes split) 377 tlist.AddToList(fPostTasks );// PostTasks377 tlist.AddToList(fPostTasks, 0); // PostTasks 378 378 if (fDestMatrix1) 379 379 tlist.AddToList(&fill1); // fill matrix 1
Note:
See TracChangeset
for help on using the changeset viewer.