Changeset 1600 for trunk/MagicSoft/Mars/mfilter
- Timestamp:
- 11/13/02 17:03:19 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mfilter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MFEventSelector.cc
r1589 r1600 40 40 // To get around 2000 events from all events use (Remark: This will only 41 41 // work if the parlist has an entry called MTaskList which has a task 42 // MR TeadTree inheriting from MReadTree):42 // MRead inheriting from MRead): 43 43 // MFEventSelector sel; 44 // sel.SetNumSelectEv ents(2000);44 // sel.SetNumSelectEvts(2000); 45 45 // MFillH filler(...); 46 46 // filler.SetFilter(&sel); … … 48 48 // tlist.AddToList(&filler); 49 49 // 50 // If you don't have MRead Treeavailable you have to set the number of50 // If you don't have MRead available you have to set the number of 51 51 // total events manually, using sel.SetNumTotalEvts(10732); 52 52 // … … 67 67 #include "MParList.h" 68 68 #include "MTaskList.h" 69 #include "MRead Tree.h"69 #include "MRead.h" 70 70 71 71 #include "MLog.h" … … 127 127 return kFALSE; 128 128 } 129 MReadTree *read = (MReadTree*)tlist->FindObject("MReadTree"); 130 if (!read) 131 read = (MReadTree*)tlist->FindObject("MReadMarsFile"); 129 MRead *read = (MRead*)tlist->FindObject("MRead"); 132 130 if (!read) 133 131 { 134 *fLog << err << dbginf << "Sorry can't determin total number of events from 'MRead Tree/MReadMarsFile'." << endl;132 *fLog << err << dbginf << "Sorry can't determin total number of events from 'MRead'." << endl; 135 133 return kFALSE; 136 134 } 137 135 fNumTotalEvts = read->GetEntries(); 136 137 SetBit(kNumTotalFromFile); 138 138 } 139 139 … … 166 166 Bool_t MFEventSelector::PostProcess() 167 167 { 168 if (TestBit(kNumTotalFromFile)) 169 fNumTotalEvts = -1; 168 170 return kTRUE; 169 171 } -
trunk/MagicSoft/Mars/mfilter/MFEventSelector.h
r1588 r1600 27 27 void StreamPrimitive(ofstream &out) const; 28 28 29 enum { kNumTotalFromFile = BIT(14) }; 29 30 /* 30 31 enum { kUseFixedRatio=BIT(14) } … … 38 39 Bool_t IsExpressionTrue() const { return fResult; } 39 40 40 void SetNumTotalEvts(Int_t n) { fNumTotalEvts = n; }41 void SetNumTotalEvts(Int_t n) { fNumTotalEvts = n; ResetBit(kNumTotalFromFile); } 41 42 void SetNumSelectEvts(Int_t n) { fNumSelectEvts = n; } 42 43 void SetSelectionRatio(Float_t f) { fSelRatio = f; }
Note:
See TracChangeset
for help on using the changeset viewer.