Changeset 5956 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 01/24/05 11:07:29 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MContinue.cc
r5910 r5956 73 73 // 74 74 MContinue::MContinue(const TString rule, const char *name, const char *title) 75 : fTaskList(0) 75 76 { 76 77 fName = name ? name : "MContinue"; … … 95 96 // 96 97 MContinue::MContinue(MFilter *f, const char *name, const char *title) 98 : fTaskList(0) 97 99 { 98 100 fName = name ? name : "MContinue"; … … 119 121 Int_t MContinue::PreProcess(MParList *list) 120 122 { 123 ResetBit(kFilterIsPrivate); 124 121 125 if (!GetFilter()) 122 126 { 127 if (IsAllowEmpty()) 128 { 129 *fLog << warn << GetDescriptor() << " - WARNING: Empty filter found... task removed." << endl; 130 return kSKIP; 131 } 132 123 133 *fLog << err << dbginf << "Unknown fatal Error! (fFilter=NULL?!?)" << endl; 124 134 return kFALSE; … … 144 154 } 145 155 156 // Make sure, that everything is correctly propageted to the childs 146 157 GetFilter()->SetDisplay(fDisplay); 147 158 GetFilter()->SetLogStream(fLog); 148 159 160 // Remeber that the filter is not already in tasklist 149 161 SetBit(kFilterIsPrivate); 150 162 … … 229 241 // MyContinue.0: MHillas.fSize>1000 230 242 // MyContinue.1: MHillas.fSize<10000 243 // or 244 // MyContinue.Condition: <MMyClass> 245 // MMyClass.Variable1: ... 246 // MMyClass.Variable2: ... 231 247 // 232 248 // For more details see MF::ReadEnv … … 234 250 Int_t MContinue::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 235 251 { 252 if (IsEnvDefined(env, prefix, "Condition", print)) 253 { 254 TString txt = GetEnvValue(env, prefix, "Condition", ""); 255 txt = txt.Strip(TString::kBoth); 256 if (txt.BeginsWith("<") && txt.EndsWith(">")) 257 { 258 *fLog << err << "NOT YET IMPLEMENTED..." << endl; 259 return kERROR; 260 } 261 } 262 236 263 MF *f = new MF; 237 264 f->SetName(fName); -
trunk/MagicSoft/Mars/mbase/MContinue.h
r5910 r5956 30 30 Int_t PostProcess(); 31 31 32 enum { kIsOwner = BIT(14), kFilterIsPrivate = BIT(15) };32 enum { kIsOwner = BIT(14), kFilterIsPrivate = BIT(15), kAllowEmpty = BIT(16) }; 33 33 34 34 public: … … 36 36 MContinue(MFilter *f, const char *name=NULL, const char *title=NULL); 37 37 ~MContinue(); 38 39 // MContinue 40 void SetAllowEmpty(Bool_t b=kTRUE) { b ? SetBit(kAllowEmpty) : ResetBit(kAllowEmpty); } 41 Bool_t IsAllowEmpty() const { return TestBit(kAllowEmpty); } 42 38 43 39 44 void SetInverted(Bool_t i=kTRUE); -
trunk/MagicSoft/Mars/mbase/MMath.cc
r5901 r5956 135 135 } 136 136 137 // -------------------------------------------------------------------------- 138 // 139 // This function truncates the precision to roughly 0.5% of a Float_t by 140 // changing its bit-pattern (Be carefull, in rare cases this function must 141 // be adapted to different machines!). This is usefull to enforce better 142 // compression by eg. gzip. 143 // 144 void MMath::TruncatePrecision(Float_t &val) 145 { 146 UInt_t &f = (UInt_t&)val; 147 148 f += 0x00004000; 149 f &= 0xffff8000; 150 } 151 137 152 // ------------------------------------------------------------------------- 138 153 // -
trunk/MagicSoft/Mars/mbase/MMath.h
r5832 r5956 18 18 Double_t SignificanceLiMaSigned(Double_t s, Double_t b, Double_t alpha=1); 19 19 20 void TruncatePrecision(Float_t &val); 21 20 22 TVector3 GetParab(const TVector3 &x, const TVector3 &y); 21 23 Double_t InterpolParabLin(const TVector3 &vx, const TVector3 &vy, Double_t x);
Note:
See TracChangeset
for help on using the changeset viewer.