Changeset 5910 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 01/20/05 14:21:25 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MContinue.cc
r4833 r5910 55 55 // -------------------------------------------------------------------------- 56 56 // 57 // Default constructor. 58 // 57 59 // Use this constructor if a rule (see MF for more details) shell be used. 58 60 // MContinue will create a MF object and use it as a filter for the … … 67 69 // is added to the tasklist in front of MContinue. 68 70 // 71 // Use the default constructor (or an empty rule) if you want to read the 72 // rule from a resource file. 73 // 69 74 MContinue::MContinue(const TString rule, const char *name, const char *title) 70 75 { … … 147 152 } 148 153 154 // -------------------------------------------------------------------------- 155 // 156 // Propagate display to filter (if set) 157 // 149 158 void MContinue::SetDisplay(MStatusDisplay *d) 150 159 { … … 155 164 } 156 165 166 // -------------------------------------------------------------------------- 167 // 168 // Propagate log stream to filter (if set) 169 // 157 170 void MContinue::SetLogStream(MLog *lg) 158 171 { … … 181 194 } 182 195 196 // -------------------------------------------------------------------------- 197 // 198 // If a filter is setup, call its 'IsInverted' to invert its meaning 199 // (boolean "not") 200 // 183 201 void MContinue::SetInverted(Bool_t i) 184 202 { 185 GetFilter()->SetInverted(i); 186 } 187 203 if (GetFilter()) 204 GetFilter()->SetInverted(i); 205 } 206 207 // -------------------------------------------------------------------------- 208 // 209 // If a filter is setup, its IsInverted status is returned. If now filter 210 // has been setup yet, kFALSE is returned. 211 // 188 212 Bool_t MContinue::IsInverted() const 189 213 { 190 return GetFilter()->IsInverted(); 191 } 214 return GetFilter() ? GetFilter()->IsInverted() : kFALSE; 215 } 216 217 // -------------------------------------------------------------------------- 218 // 219 // Check for corresponding entries in resource file and setup filters. 220 // Avoid trailing 0's! 221 // 222 // Example: 223 // test.C: 224 // MContinue cont("", "MyContinue"); 225 // 226 // test.rc: 227 // MyContinue.Condition: {0} && {1} 228 // MyContinue.Inverted: yes 229 // MyContinue.0: MHillas.fSize>1000 230 // MyContinue.1: MHillas.fSize<10000 231 // 232 // For more details see MF::ReadEnv 233 // 234 Int_t MContinue::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 235 { 236 MF *f = new MF; 237 f->SetName(fName); 238 239 const Bool_t rc = f->ReadEnv(env, prefix, print); 240 if (rc!=kTRUE) 241 { 242 delete f; 243 return rc; 244 } 245 246 if (TestBit(kIsOwner)) 247 delete GetFilter(); 248 249 SetBit(kIsOwner); 250 MTask::SetFilter(f); 251 252 f->SetName(Form("MF:%s", fName.Data())); 253 254 return kTRUE; 255 } -
trunk/MagicSoft/Mars/mbase/MContinue.h
r2206 r5910 25 25 MTaskList *fTaskList; //! pointer to the present tasklist 26 26 27 // MTask 27 28 Int_t PreProcess(MParList *list); 28 29 Int_t Process() { return kCONTINUE; } … … 39 40 Bool_t IsInverted() const; 40 41 42 // MParContainer 41 43 void SetDisplay(MStatusDisplay *d); 42 44 void SetLogStream(MLog *lg); 45 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE); 43 46 44 47 ClassDef(MContinue, 1) //Task returning kCONTINUE
Note:
See TracChangeset
for help on using the changeset viewer.