Changeset 7401 for trunk/MagicSoft/Mars/mtools
- Timestamp:
- 11/15/05 11:36:17 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc
r7130 r7401 18 18 ! Author(s): Thomas Bretz, 12/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 320 ! Copyright: MAGIC Software Development, 2000-2005 21 21 ! 22 22 ! … … 81 81 #include <TFile.h> 82 82 83 // environment 83 84 #include "MHMatrix.h" 84 85 … … 86 87 #include "MLogManip.h" 87 88 89 // eventloop 88 90 #include "MParList.h" 89 91 #include "MTaskList.h" 90 92 #include "MEvtLoop.h" 91 93 94 // tasks 92 95 #include "MRead.h" 93 96 #include "MFillH.h" 94 97 #include "MContinue.h" 98 99 // filters 100 #include "MF.h" 95 101 #include "MFilterList.h" 96 102 #include "MFEventSelector.h" … … 174 180 delete fReference; 175 181 } 182 183 //------------------------------------------------------------------------ 184 // 185 // Add a cut which is used to fill the matrix, eg "MMcEvt.fOartId<1.5" 186 // (The rule is applied, nit inverted: The matrix is filled with 187 // the events fullfilling the condition) 188 // 189 void MTFillMatrix::AddPreCut(const char *rule) 190 { 191 MFilter *f = new MF(rule); 192 f->SetBit(kCanDelete); 193 AddPreCut(f); 194 } 195 196 //------------------------------------------------------------------------ 197 // 198 // Add a cut which is used to fill the matrix. If kCanDelete is set 199 // MJOptimize takes the ownership. 200 // 201 void MTFillMatrix::AddPreCut(MFilter *f) 202 { 203 fPreCuts.Add(f); 204 } 205 176 206 177 207 // -------------------------------------------------------------------------- … … 236 266 237 267 // 268 // Continue for PreCuts 269 // 270 MFilterList list; 271 list.SetName("PreCuts"); 272 if (!list.AddToList(fPreCuts)) 273 *fLog << err << "ERROR - Calling MFilterList::AddToList for fPreCuts failed!" << endl; 274 275 MContinue cont0(&list); 276 cont0.SetInverted(); 277 278 // 238 279 // Continue for all events which are not (SetInverted()) 239 280 // selected by the 'selector' … … 268 309 // entries in MTaskList 269 310 tlist.AddToList(fReader); // Read events 311 if (fPreCuts.GetEntries()>0) 312 tlist.AddToList(&cont0); // PreCuts 270 313 if (fReference && selector) 271 314 tlist.AddToList(&cont); // select a sample of events
Note:
See TracChangeset
for help on using the changeset viewer.