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/MWriteRootFile.cc

    r995 r1003  
    4646ClassImp(MWriteRootFile);
    4747
    48 #define kSaveNow BIT(1)
     48#define kFillTree BIT(1)
    4949
    5050// --------------------------------------------------------------------------
     
    6262                               const char *title)
    6363{
    64     *fName  = name  ? name  : "MWriteRootFile";
    65     *fTitle = title ? title : "Task which writes a root-output file";
     64    fName  = name  ? name  : "MWriteRootFile";
     65    fTitle = title ? title : "Task which writes a root-output file";
    6666
    6767    //
     
    113113
    114114    TTree *t;
    115     TObjArrayIter Next(&fTrees);
     115    TIter Next(&fTrees);
    116116    while ((t=(TTree*)Next()))
    117117        cout << t->GetName() << ": \t" << t->GetEntries() << " entries." << endl;
     
    177177    // loop over all branches which are 'marked' as branches to get written.
    178178    //
    179     TObjArrayIter Next(&fBranches);
     179    TIter Next(&fBranches);
    180180    while ((entry=(MRootFileBranch*)Next()))
    181181    {
     
    244244        //
    245245        TObject *obj;
    246         TObjArrayIter NextTree(&fTrees);
     246        TIter NextTree(&fTrees);
    247247        while ((obj=NextTree()))
    248248        {
     
    270270        // The containers should be written in Splitlevel=1
    271271        //
    272         branch = tree->Branch(cname, cont->ClassName(), entry->GetAddress(), 32000, 1);
     272        branch = tree->Branch(cname, cont->ClassName(), entry->GetAddress());
    273273
    274274        *fLog << "Created Branch " << cname << " of " << cont->ClassName() << "." << endl;
     
    302302    // Loop over all branch entries
    303303    //
    304     TObjArrayIter NextBranch(&fBranches);
     304    TIter NextBranch(&fBranches);
    305305    while ((obj=NextBranch()))
    306306    {
     
    317317        // the corresponding tree entry.
    318318        //
    319         b->GetTree()->SetBit(kSaveNow);
     319        b->GetTree()->SetBit(kFillTree);
    320320    }
    321321
     
    323323    // Loop over all tree entries
    324324    //
    325     TObjArrayIter NextTree(&fTrees);
     325    TIter NextTree(&fTrees);
    326326    while ((obj=NextTree()))
    327327    {
     
    331331        // Check the write flag of the tree
    332332        //
    333         if (!t->TestBit(kSaveNow))
     333        if (!t->TestBit(kFillTree))
    334334            continue;
    335335
     
    340340        //
    341341        t->Fill();
    342         t->ResetBit(kSaveNow);
     342        t->ResetBit(kFillTree);
    343343    }
    344344}
Note: See TracChangeset for help on using the changeset viewer.