Changeset 1020


Ignore:
Timestamp:
10/31/01 14:38:20 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r967 r1020  
    5656#include <iostream.h>
    5757
     58#include <TSystem.h>
    5859#include <TStopwatch.h>
     60#include <TGProgressBar.h>
    5961
    6062#include "MLog.h"
     
    7678// default constructor - emty
    7779//
    78 MEvtLoop::MEvtLoop() : fParList(NULL)
     80MEvtLoop::MEvtLoop() : fParList(NULL), fProgress(NULL)
    7981{
    8082}
     
    166168    *fLog << " events)..." << flush;
    167169
     170    if (fProgress && maxcnt>0)
     171        fProgress->SetRange(0, maxcnt);
     172
    168173    Int_t dummy = maxcnt<0 ? 0 : maxcnt;
    169174
     
    181186    if (maxcnt<0)
    182187        // 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++;
    184196    else
    185197        // 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());
    187206
    188207    //
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r1014 r1020  
    1616class MParList;
    1717class MTaskList;
     18class TGProgressBar;
    1819
    1920class MEvtLoop : public MParContainer
     
    2223    MParList  *fParList;
    2324    MTaskList *fTaskList;
     25
     26    TGProgressBar *fProgress;
    2427
    2528    enum { kIsOwner = BIT(14) };
     
    3437    void SetOwner(Bool_t enable=kTRUE);
    3538
     39    void SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
     40
    3641    Bool_t PreProcess(const char *tlist="MTaskList");
    3742    void   Process(Int_t maxcnt) const;
  • trunk/MagicSoft/Mars/mbase/MFilterList.h

    r1014 r1020  
    2727    FilterType_t fFilterType;
    2828
     29    enum { kIsOwner = BIT(14) };
     30
    2931public:
    3032    MFilterList(const char *type="&&");
     33    MFilterList(MFilterList &ts);
    3134    ~MFilterList()
    3235    {
     36        if (TestBit(kIsOwner))
     37            fFilters.SetOwner();
    3338    }
    34     MFilterList(MFilterList &ts);
    3539
    3640    Bool_t AddToList(MFilter *filter);
     41    void SetOwner(Bool_t enable=kTRUE) { enable ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
    3742
    3843    Bool_t IsExpressionTrue() const;
  • trunk/MagicSoft/Mars/mbase/MLogManip.h

    r1014 r1020  
    5353//
    5454#ifndef __CINT__
    55 #define dbginf      __FILE__ << " l." << __LINE__ << ": "
     55#define dbginf      __FILE__ << " l." << dec << __LINE__ << ": "
    5656#endif
    5757//
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r1014 r1020  
    5555
    5656#include <TChain.h>
     57#include <TGProgressBar.h>
    5758#include <TChainElement.h>
    5859#include <TOrdCollection.h>
     
    316317    EnableBranches(pList);
    317318
     319    if (fProgress)
     320        fProgress->SetRange(0, fNumEntries);
     321
    318322    return kTRUE;
    319323}
  • trunk/MagicSoft/Mars/mbase/MReadTree.h

    r1014 r1020  
    77
    88class TChain;
     9class TGProgressBar;
    910
    1011class MReadTree : public MTask
     
    2122    TOrdCollection *fVetoList; // List of Branches which are not allowed to get enabled
    2223
     24    TGProgressBar *fProgress;  // Possible display of status
     25
    2326    void EnableBranches(MParList *plist);
    2427    void EnableBranchChoosing();
     
    3033    Bool_t PreProcess(MParList *pList);
    3134    Bool_t Process();
     35
     36    void   SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
    3237
    3338    Int_t  AddFile(const char *fname);
  • trunk/MagicSoft/Mars/mbase/MTask.h

    r1014 r1020  
    7171    virtual void PrintStatistics(const Int_t lvl=0) const;
    7272
     73    UInt_t GetNumExecutions() { return fNumExecutions; }
     74
    7375    Bool_t CallPreProcess(MParList *plist);
    7476    Bool_t CallProcess();
  • trunk/MagicSoft/Mars/merpp.cc

    r969 r1020  
    8484        }
    8585
     86    MParContainer::Class()->IgnoreTObjectStreamer();
     87
    8688    //
    8789    // create a (empty) list of parameters which can be used by the tasks
  • trunk/MagicSoft/Mars/mraw/RawLinkDef.h

    r545 r1020  
    99#pragma link C++ class MRawEvtHeader;
    1010#pragma link C++ class MRawEvtData;
    11 #pragma link C++ class MRawEvtPixelIter;
     11#pragma link C++ class MRawEvtPixelIter+;
    1212
    13 #pragma link C++ class MRawCrateArray;
    14 #pragma link C++ class MRawCrateData;
     13#pragma link C++ class MRawCrateArray+;
     14#pragma link C++ class MRawCrateData+;
    1515
    16 #pragma link C++ class MRawFileRead;
    17 #pragma link C++ class MRawFileWrite;
     16#pragma link C++ class MRawFileRead+;
     17#pragma link C++ class MRawFileWrite+;
    1818
    1919#endif
Note: See TracChangeset for help on using the changeset viewer.