From 6797e7e766df4c4e841c74fbf41bc8d80bf09e4a Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Wed, 22 Aug 2012 23:20:15 -0400 Subject: [PATCH] Attempt to fix TClonesArray issues with root <5.32 and podd fix for root>=5.34 --- podd | 2 +- src/THcDriftChamber.cxx | 1 + src/THcDriftChamberPlane.cxx | 2 +- src/THcHitList.cxx | 3 ++- src/THcHodoscope.cxx | 3 ++- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/podd b/podd index fe3e746..8c65357 160000 --- a/podd +++ b/podd @@ -1 +1 @@ -Subproject commit fe3e7463fe6e531dd790cf5ea103a368e4b17b7a +Subproject commit 8c65357a0b8bf6f25064fe1ffda5241085b5a332 diff --git a/src/THcDriftChamber.cxx b/src/THcDriftChamber.cxx index b69d212..48fb541 100644 --- a/src/THcDriftChamber.cxx +++ b/src/THcDriftChamber.cxx @@ -39,6 +39,7 @@ THcDriftChamber::THcDriftChamber( // Constructor // fTrackProj = new TClonesArray( "THaTrackProj", 5 ); + fNPlanes = 0; // No planes until we make them } diff --git a/src/THcDriftChamberPlane.cxx b/src/THcDriftChamberPlane.cxx index 0ded850..d57327a 100644 --- a/src/THcDriftChamberPlane.cxx +++ b/src/THcDriftChamberPlane.cxx @@ -162,7 +162,7 @@ Int_t THcDriftChamberPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) if(!obj->TestBit (TObject::kNotDeleted)) fTDCHitsClass->New(obj); THcSignalHit *sighit = (THcSignalHit*)obj; -#endif +#endif sighit->Set(hit->fCounter, hit->fTDC[0]); } ihit++; diff --git a/src/THcHitList.cxx b/src/THcHitList.cxx index 81464d6..d1bd947 100644 --- a/src/THcHitList.cxx +++ b/src/THcHitList.cxx @@ -54,7 +54,7 @@ void THcHitList::InitHitList(THaDetMap* detmap, Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) { THcRawHit* rawhit; // cout << " Clearing TClonesArray " << endl; - fRawHitList->Clear("C"); + fRawHitList->Clear( ); fNRawHits = 0; for ( Int_t i=0; i < fdMap->GetSize(); i++ ) { @@ -89,6 +89,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) { if(thishit == fNRawHits) { rawhit = (THcRawHit*) (*fRawHitList)[thishit]; + rawhit->Clear(); // Blank out hit contents fNRawHits++; rawhit->fPlane = plane; rawhit->fCounter = counter; diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index 4ff2611..769d92d 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -39,6 +39,7 @@ THcHodoscope::THcHodoscope( const char* name, const char* description, //fTrackProj = new TClonesArray( "THaTrackProj", 5 ); // Construct the planes + fNPlanes = 0; // No planes until we make them } @@ -57,7 +58,7 @@ void THcHodoscope::Setup(const char* name, const char* description) static const char* const message = "Must construct %s detector with valid name! Object construction failed."; - cout << "In THcHodoscope::Init()" << endl; + cout << "In THcHodoscope::Setup()" << endl; // Base class constructor failed? if( IsZombie()) return; -- GitLab