Ignore:
Timestamp:
09/01/04 18:06:06 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mfileio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r4817 r4826  
    233233        name += branch->GetName();
    234234
    235         *fLog << " " << name.Strip(TString::kTrailing, '.') << ": \t" << branch->GetEntries() << " entries." << endl;
     235        *fLog << " " << name.Strip(TString::kTrailing, '.') << ": \t" << (ULong_t)branch->GetEntries() << " entries." << endl;
    236236    }
    237237
     
    240240    while ((t=(TTree*)NextTree()))
    241241        if (t->TestBit(kIsNewTree))
    242             *fLog << " " << t->GetName() << ": \t" << t->GetEntries() << " entries." << endl;
     242            *fLog << " " << t->GetName() << ": \t" << (ULong_t)t->GetEntries() << " entries." << endl;
    243243    *fLog << endl;
    244244}
     
    257257void MWriteRootFile::AddContainer(const char *cname, const char *tname, Bool_t must)
    258258{
     259    TIter Next(&fBranches);
     260    TObject *o=0;
     261    while ((o=Next()))
     262        if (TString(o->GetName())==TString(tname) && TString(o->GetTitle())==TString(cname))
     263        {
     264            *fLog << "WARNING - Container '" << cname << "' in Tree '" << tname << "' already scheduled... ignored." << endl;
     265            return;
     266        }
     267
    259268    //
    260269    // create a new entry in the list of branches to write and
     
    281290                                  Bool_t must)
    282291{
     292    TIter Next(&fBranches);
     293    TObject *o=0;
     294    while ((o=Next()))
     295        if (TString(o->GetName())==TString(tname) &&
     296            static_cast<MRootFileBranch*>(o)->GetContainer()==cont)
     297        {
     298            *fLog << "WARNING - Container " << cont << " in Tree '" << tname << "' already scheduled... ignored." << endl;
     299            return;
     300        }
     301
    283302    //
    284303    // create a new entry in the list of branches to write and
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h

    r4698 r4826  
    2323
    2424    MParContainer *fContainer;
    25     TString        fContName;
    2625
    2726    Bool_t         fMust;
     
    3736    {
    3837        Init(NULL, kFALSE);
    39         fContName = "";
     38        fTitle = "";
    4039    }
    4140
     
    4443    {
    4544        Init(tname, must);
    46         fContName = cname;
     45        fTitle = cname;
    4746    }
    4847
    4948    MRootFileBranch(MParContainer *cont, const char *tname=NULL, Bool_t must=kFALSE)
    50         : fTree(NULL), fBranch(NULL), fContName(""), fMust(0)
     49        : fTree(NULL), fBranch(NULL), fMust(0)
    5150    {
    5251        Init(tname, must);
     52        fTitle = "";
    5353        fContainer = cont;
    5454    }
     
    5858    void          *GetAddress()         { return &fContainer; }
    5959    TBranch       *GetBranch() const    { return fBranch; }
    60     const char    *GetContName() const  { return fContName; }
     60    const char    *GetContName() const  { return fTitle; }
    6161    Bool_t         MustHave() const     { return fMust; }
    6262
Note: See TracChangeset for help on using the changeset viewer.