diff --git a/src/THcHitList.cxx b/src/THcHitList.cxx index 9a1303b7c9e7a314f3612548d487d78502367db3..81464d6ec6aff6984bc571bb88a2ef3ef62674f4 100644 --- a/src/THcHitList.cxx +++ b/src/THcHitList.cxx @@ -11,6 +11,8 @@ ////////////////////////////////////////////////////////////////////////// #include "THcHitList.h" +#include "TError.h" +#include "TClass.h" using namespace std; @@ -35,7 +37,15 @@ void THcHitList::InitHitList(THaDetMap* detmap, fNMaxRawHits = maxhits; fNRawHits = 0; for(Int_t i=0;i<maxhits;i++) { +#if ROOT_VERSION_CODE >= ROOT_VERSION(5,32,0) fRawHitList->ConstructedAt(i); +#else + // The essence of the ConstructedAt code explictly + TObject* obj = (*fRawHitList)[i]; + R__ASSERT( obj ); // should never happen ... + if( !obj->TestBit(TObject::kNotDeleted) ) + fRawHitClass->New(obj); +#endif } fdMap = detmap;