Changeset 9410 for trunk/MagicSoft/Mars/mfileio
- Timestamp:
- 03/23/09 13:14:46 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mfileio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r9343 r9410 458 458 // completely from one file to another one you can use this 459 459 // 460 void MWriteRootFile::AddCopySource(const char *tname, const char *bname) 461 { 462 fCopies.Add(new TNamed(tname, bname?bname:"*")); 460 void MWriteRootFile::AddCopySource(const char *tname, const char *bname, Bool_t force) 461 { 462 TObject *obj = new TNamed(tname, bname?bname:"*"); 463 if (force) 464 obj->SetBit(kForced); 465 466 fCopies.Add(obj); 463 467 fCopies.Sort(); 464 468 } … … 980 984 if (!gettree) 981 985 { 982 *fLog << err << "ERROR - MakeCopies: Tree " << o->GetName() << " not found in file " << fname << "... abort." << endl; 983 return kFALSE; 986 const Bool_t force = o->TestBit(kForced); 987 if (force) 988 *fLog << err << "ERROR - "; 989 else 990 *fLog << inf3; 991 992 *fLog << "MakeCopies: Tree " << o->GetName() << " not found in file " << fname << "."; 993 if (force) 994 *fLog << ".. abort."; 995 *fLog << endl; 996 997 if (force) 998 return kFALSE; 999 1000 continue; 984 1001 } 985 1002 -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
r9328 r9410 85 85 kIsNotOwner = BIT(14), // MWriteRootFile is not owner of fOut 86 86 kFillTree = BIT(14), 87 kForced = BIT(14), // Used for flag in fCopies 87 88 // Be carefull these bits are already in use! 88 89 // TBranch::kAutoDelete = BIT(15) … … 130 131 void AddContainer(const char *cname, const char *tname=NULL, Bool_t must=kTRUE); 131 132 void AddContainer(MParContainer *cont, const char *tname=NULL, Bool_t must=kTRUE); 132 void AddCopySource(const char *tname, const char *bname=NULL); 133 void AddCopySource(const char *tname, const char *bname=NULL, Bool_t force=kTRUE); 134 void AddCopySource(const char *tname, Bool_t force) 135 { 136 AddCopySource(tname, NULL, force); 137 } 133 138 134 139 void AddTree(const char *name, Bool_t force=kTRUE)
Note:
See TracChangeset
for help on using the changeset viewer.