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

Legend:

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

    r1085 r1108  
    149149Bool_t MReadTree::Notify()
    150150{
    151     fNotify->ForEach(TObject, Notify)();
     151    //
     152    // FIXME: This is correct!
     153    //
     154    //   fNotify->ForEach(TObject, Notify)();
     155
     156    fTaskList->ReInit();
     157
    152158    return kTRUE;
    153159}
     
    209215// --------------------------------------------------------------------------
    210216//
     217// Set branch status of branch name
     218//
     219void MReadTree::SetBranchStatus(const char *name, Bool_t status)
     220{
     221    fChain->SetBranchStatus(name, status);
     222
     223    *fLog << inf << (status ? "Enabled" : "Disabled");
     224    *fLog << " subbranch '" << name << "'." << endl;
     225}
     226
     227// --------------------------------------------------------------------------
     228//
    211229// Checks whether a branch with the given name exists in the chain
    212230// and sets the branch status of this branch corresponding to status.
     
    222240    // Check whether this branch really exists
    223241    //
    224     if (!fChain->GetBranch(name))
     242    if (fChain->GetBranch(name))
     243        SetBranchStatus(name, status);
     244
     245    //
     246    // Remove trailing '.' if one and try to enable the subbranch without
     247    // the master barnch name. This is to be compatible with older mars
     248    // and camera files.
     249    //
     250    const char *dot = strrchr(name, '.');
     251    if (!dot)
    225252        return;
    226253
    227     //
    228     // Set the branch status
    229     //
    230     fChain->SetBranchStatus(name, status);
    231     *fLog << inf << (status ? "Enabled" : "Disabled");
    232     *fLog << " subbranch '" << name << "'." << endl;
     254    if (fChain->GetBranch(dot+1))
     255        SetBranchStatus(dot+1, kTRUE);
    233256}
    234257
     
    265288    // check whether branch choosing must be switched on
    266289    //
    267     EnableBranchChoosing();
     290    //EnableBranchChoosing();
    268291
    269292    //
     
    324347Bool_t MReadTree::PreProcess(MParList *pList)
    325348{
     349    fTaskList = (MTaskList*)pList->FindObject("MTaskList");
     350
    326351    //
    327352    // get number of events in this tree
Note: See TracChangeset for help on using the changeset viewer.