Ignore:
Timestamp:
10/11/19 19:22:02 (5 years ago)
Author:
tbretz
Message:
They are added to the ListOfCleanups. This is implemented as a THashTable. According to the root documentation, it is required to rehash the table whenever the name of an object in the table changes. This is now guranteed if name change happens via SetName
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MEvtLoop.cc

    r19359 r19760  
    7979#include <TDatime.h>        // TDatime
    8080#include <TSystem.h>        // gSystem
     81#include <THashList.h>
    8182#include <TStopwatch.h>
    8283#include <TGProgressBar.h> 
     
    123124        fParList = 0;
    124125    }
     126}
     127
     128void MEvtLoop::SetName(const char *name)
     129{
     130    MParContainer::SetName(name);
     131
     132    // From the documentation of THashList::THashList
     133    //
     134    // WARNING !!!
     135    // If the name of an object in the HashList is modified, The hashlist
     136    // must be Rehashed
     137    //
     138    auto table = dynamic_cast<THashList*>(gROOT->GetListOfCleanups());
     139    if (table)
     140        table->Rehash(THashList::kInitHashTableCapacity);
    125141}
    126142
Note: See TracChangeset for help on using the changeset viewer.