X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RAW%2FAliTagDB.cxx;h=797c13b5d25ac2bed0a71b0f3820adf7e4b33826;hb=61673d36749a7c1a3b79f2f806fd4fde70eaac96;hp=a2f64f8ed9b9061feec0ead7274ba94d058ae093;hpb=3db13e0d50cc629c8398d0ce43dde994735a051b;p=u%2Fmrichter%2FAliRoot.git diff --git a/RAW/AliTagDB.cxx b/RAW/AliTagDB.cxx index a2f64f8ed9b..797c13b5d25 100644 --- a/RAW/AliTagDB.cxx +++ b/RAW/AliTagDB.cxx @@ -26,6 +26,7 @@ #include #include +#include #include "AliESD.h" @@ -55,6 +56,18 @@ AliTagDB::AliTagDB(AliRawEventTag *eventTag, const char* fileName) : } } +static void BranchResetBit(TBranch *b) +{ + // Reset MapObject on this branch and all the sub-branches + + b->ResetBit( kBranchObject | kBranchAny ); // Or in newer ROOT: b->ResetBit( kMapObject ) + TIter next( b->GetListOfBranches() ); + TBranch *sub = 0; + while ( (sub = (TBranch*)next() ) ) { + BranchResetBit( sub ); + } +} + //______________________________________________________________________________ Bool_t AliTagDB::Create(const char* fileName) { @@ -83,7 +96,8 @@ Bool_t AliTagDB::Create(const char* fileName) Int_t bufsize = 32000; Int_t split = 1; const char *tagname = fEventTag->GetName(); - fTree->Branch("TAG", tagname, &fEventTag, bufsize, split); + TBranch * b = fTree->Branch("TAG", tagname, &fEventTag, bufsize, split); + BranchResetBit(b); return kTRUE; }