Ignore:
Timestamp:
10/29/01 11:15:53 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r988 r1003  
    6767#include "MTask.h"
    6868
     69#include <TOrdCollection.h>
     70
    6971#include "MLog.h"
    7072#include "MLogManip.h"
     
    7577
    7678MTask::MTask(const char *name, const char *title)
    77     : fFilter(NULL), fIsPreprocessed(kFALSE), fNumExecutions()
    78 {
    79     *fName  = name  ? name  : "MTask";
    80     *fTitle = title ? title : "Base class for all tasks (dummy task).";
     79    : fFilter(NULL), fIsPreprocessed(kFALSE), fNumExecutions(0)
     80{
     81    fName  = name  ? name  : "MTask";
     82    fTitle = title ? title : "Base class for all tasks (dummy task).";
     83
     84    fListOfBranches = new TOrdCollection;
     85    fListOfBranches->SetOwner();
     86}
     87
     88MTask::~MTask()
     89{
     90    delete fListOfBranches;
     91}
     92
     93// --------------------------------------------------------------------------
     94//
     95// This adds a branch to the list for the auto enabeling schmeme.
     96// This makes it possible for MReadTree to decide which branches
     97// are really needed for the eventloop. Only the necessary branches
     98// are read from disk which speeds up the calculation enormously.
     99//
     100// You can use TRegExp expressions like "*.fEnergy", but the
     101// recommended method is to call this function for exactly all
     102// branches you want to have, eg:
     103//  AddToBranchList("MMcTrig;1.fNumFirstLevel");
     104//  AddToBranchList("MMcTrig;2.fNumFirstLevel");
     105//
     106// We agreed on the convetion, that all branches are stored with
     107// a trailing dot '.' so that always the Master Branch name
     108// (eg. MMcTrig) is part of the branch name.
     109//
     110// Remark: The common place to call AddToBranchList is the
     111//         constructor of the derived classes (tasks)
     112//
     113void MTask::AddToBranchList(const char *b)
     114{
     115    TNamed *name = new TNamed(b, "");
     116    fListOfBranches->Add(name);
     117}
     118
     119// --------------------------------------------------------------------------
     120//
     121// Copy constructor.
     122//
     123MTask::MTask(MTask &t)
     124{
     125    fFilter = t.fFilter;
     126    fListOfBranches->AddAll(t.fListOfBranches);
    81127}
    82128
Note: See TracChangeset for help on using the changeset viewer.