Changeset 1020 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 10/31/01 14:38:20 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r967 r1020 56 56 #include <iostream.h> 57 57 58 #include <TSystem.h> 58 59 #include <TStopwatch.h> 60 #include <TGProgressBar.h> 59 61 60 62 #include "MLog.h" … … 76 78 // default constructor - emty 77 79 // 78 MEvtLoop::MEvtLoop() : fParList(NULL) 80 MEvtLoop::MEvtLoop() : fParList(NULL), fProgress(NULL) 79 81 { 80 82 } … … 166 168 *fLog << " events)..." << flush; 167 169 170 if (fProgress && maxcnt>0) 171 fProgress->SetRange(0, maxcnt); 172 168 173 Int_t dummy = maxcnt<0 ? 0 : maxcnt; 169 174 … … 181 186 if (maxcnt<0) 182 187 // process first and increment if sucessfull 183 while (fTaskList->Process()) dummy++; 188 if (fProgress) 189 while (fTaskList->Process()) 190 { 191 fProgress->SetPosition(++dummy); 192 gSystem->ProcessEvents(); 193 } 194 else 195 while (fTaskList->Process()) dummy++; 184 196 else 185 197 // check for number and break if unsuccessfull 186 while (dummy-- && fTaskList->Process()); 198 if (fProgress) 199 while (dummy-- && fTaskList->Process()) 200 { 201 fProgress->SetPosition(maxcnt - dummy); 202 gSystem->ProcessEvents(); 203 } 204 else 205 while (dummy-- && fTaskList->Process()); 187 206 188 207 // -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r1014 r1020 16 16 class MParList; 17 17 class MTaskList; 18 class TGProgressBar; 18 19 19 20 class MEvtLoop : public MParContainer … … 22 23 MParList *fParList; 23 24 MTaskList *fTaskList; 25 26 TGProgressBar *fProgress; 24 27 25 28 enum { kIsOwner = BIT(14) }; … … 34 37 void SetOwner(Bool_t enable=kTRUE); 35 38 39 void SetProgressBar(TGProgressBar *bar) { fProgress = bar; } 40 36 41 Bool_t PreProcess(const char *tlist="MTaskList"); 37 42 void Process(Int_t maxcnt) const; -
trunk/MagicSoft/Mars/mbase/MFilterList.h
r1014 r1020 27 27 FilterType_t fFilterType; 28 28 29 enum { kIsOwner = BIT(14) }; 30 29 31 public: 30 32 MFilterList(const char *type="&&"); 33 MFilterList(MFilterList &ts); 31 34 ~MFilterList() 32 35 { 36 if (TestBit(kIsOwner)) 37 fFilters.SetOwner(); 33 38 } 34 MFilterList(MFilterList &ts);35 39 36 40 Bool_t AddToList(MFilter *filter); 41 void SetOwner(Bool_t enable=kTRUE) { enable ? SetBit(kIsOwner) : ResetBit(kIsOwner); } 37 42 38 43 Bool_t IsExpressionTrue() const; -
trunk/MagicSoft/Mars/mbase/MLogManip.h
r1014 r1020 53 53 // 54 54 #ifndef __CINT__ 55 #define dbginf __FILE__ << " l." << __LINE__ << ": "55 #define dbginf __FILE__ << " l." << dec << __LINE__ << ": " 56 56 #endif 57 57 // -
trunk/MagicSoft/Mars/mbase/MReadTree.cc
r1014 r1020 55 55 56 56 #include <TChain.h> 57 #include <TGProgressBar.h> 57 58 #include <TChainElement.h> 58 59 #include <TOrdCollection.h> … … 316 317 EnableBranches(pList); 317 318 319 if (fProgress) 320 fProgress->SetRange(0, fNumEntries); 321 318 322 return kTRUE; 319 323 } -
trunk/MagicSoft/Mars/mbase/MReadTree.h
r1014 r1020 7 7 8 8 class TChain; 9 class TGProgressBar; 9 10 10 11 class MReadTree : public MTask … … 21 22 TOrdCollection *fVetoList; // List of Branches which are not allowed to get enabled 22 23 24 TGProgressBar *fProgress; // Possible display of status 25 23 26 void EnableBranches(MParList *plist); 24 27 void EnableBranchChoosing(); … … 30 33 Bool_t PreProcess(MParList *pList); 31 34 Bool_t Process(); 35 36 void SetProgressBar(TGProgressBar *bar) { fProgress = bar; } 32 37 33 38 Int_t AddFile(const char *fname); -
trunk/MagicSoft/Mars/mbase/MTask.h
r1014 r1020 71 71 virtual void PrintStatistics(const Int_t lvl=0) const; 72 72 73 UInt_t GetNumExecutions() { return fNumExecutions; } 74 73 75 Bool_t CallPreProcess(MParList *plist); 74 76 Bool_t CallProcess();
Note:
See TracChangeset
for help on using the changeset viewer.