From 7fbcb870b9f9852cca691264a4b3548a3a47970a Mon Sep 17 00:00:00 2001
From: "Stephen A. Wood" <zviwood@gmail.com>
Date: Wed, 11 Apr 2012 22:23:34 -0400
Subject: [PATCH] Checkin.

---
 podd                 |  2 +-
 src/THcHitList.cxx   | 25 ++++++++++---------------
 src/THcHitList.h     | 26 +++++++++++++++-----------
 src/THcHodoscope.cxx |  2 +-
 src/THcHodoscope.h   |  5 +++--
 5 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/podd b/podd
index 0397e92..3f08eae 160000
--- a/podd
+++ b/podd
@@ -1 +1 @@
-Subproject commit 0397e92a6812595dcb4ff6a13ec665987e26ca1d
+Subproject commit 3f08eaebe0d0997888a9bf34ba90a211dd608a2d
diff --git a/src/THcHitList.cxx b/src/THcHitList.cxx
index 44c7923..e9527ac 100644
--- a/src/THcHitList.cxx
+++ b/src/THcHitList.cxx
@@ -2,7 +2,7 @@
 
 //////////////////////////////////////////////////////////////////////////
 //
-// THcDetectorBase
+// THcHitList
 //
 // Add hitlist to the Hall A detector base
 // May not need to inherit from THaDetectorBase since we may end up
@@ -10,16 +10,12 @@
 //
 //////////////////////////////////////////////////////////////////////////
 
-#include "THcDetectorBase.h"
-#include "THaEvData.h"
-#include "THaDetMap.h"
+#include "THcHitList.h"
 #include "TClonesArray.h"
 
 using namespace std;
 
-THcDetectorBase::THcDetectorBase( const char* name,
-				  const char* description ) :
-  THaDetectorBase(name, description)
+THcHitList::THcHitList()
 {
   // Normal constructor.
 
@@ -27,14 +23,12 @@ THcDetectorBase::THcDetectorBase( const char* name,
 
 }
 
-THcDetectorBase::THcDetectorBase() : THaDetectorBase() {
-}
-
-THcDetectorBase::~THcDetectorBase() {
+THcHitList::~THcHitList() {
   // Destructor
 }
 
-void THcDetectorBase::InitHitlist(const char *hitclass, Int_t maxhits) {
+void THcHitList::InitHitList(THaDetMap* detmap,
+				  const char *hitclass, Int_t maxhits) {
   // Probably called by ReadDatabase
   fRawHitList = new TClonesArray(hitclass, maxhits);
   fRawHitClass = fRawHitList->GetClass();
@@ -43,10 +37,11 @@ void THcDetectorBase::InitHitlist(const char *hitclass, Int_t maxhits) {
   for(Int_t i=0;i<maxhits;i++) {
     fRawHitList->New(i);
   }
+  
+  fDetMap = detmap;
 }
-   
 
-Int_t THcDetectorBase::Decode( const THaEvData& evdata ) {
+Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) {
   THcRawHit* rawhit;
   fRawHitList->Clear("C");
   fNRawHits = 0;
@@ -98,4 +93,4 @@ Int_t THcDetectorBase::Decode( const THaEvData& evdata ) {
   return fNRawHits;		// Does anything care what is returned
 }
 
-ClassImp(THcDetectorBase)
+ClassImp(THcHitList)
diff --git a/src/THcHitList.h b/src/THcHitList.h
index 740f7c1..5e03b0c 100644
--- a/src/THcHitList.h
+++ b/src/THcHitList.h
@@ -1,8 +1,9 @@
-#ifndef ROOT_THcDetectorBase
-#define ROOT_THcDetectorBase
+#ifndef ROOT_THcHitList
+#define ROOT_THcHitList
 
-#include "THaDetectorBase.h"
 #include "THcRawHit.h"
+#include "THaDetMap.h"
+#include "THaEvData.h"
 #include "TClonesArray.h"
 
 
@@ -10,24 +11,25 @@ using namespace std;
 
 //////////////////////////////////////////////////////////////////////////
 //
-// THcDetectorBase
+// THcHitList
 //
 //////////////////////////////////////////////////////////////////////////
 
 //class THaDetMap;
 
-class THcDetectorBase : public THaDetectorBase {
+class THcHitList {
 
  public:
 
-  virtual ~THcDetectorBase();
+  virtual ~THcHitList();
 
-  THcDetectorBase(); // only for ROOT I/O
-  THcDetectorBase( const char* name, const char* description );
+  THcHitList(); // only for ROOT I/O
+  THcHitList( const char* name, const char* description );
 
 
-  virtual Int_t Decode( const THaEvData& );
-  void          InitHitlist(const char *hitclass, Int_t maxhits);
+  virtual Int_t DecodeToHitList( const THaEvData& );
+  void          InitHitList(THaDetMap* detmap,
+			    const char *hitclass, Int_t maxhits);
 
   // This is a list of pointers to hit objects
   // Instead should we have a list of the actual objects so that we are
@@ -38,8 +40,10 @@ class THcDetectorBase : public THaDetectorBase {
   TClonesArray* fRawHitList; // List of raw hits
   TClass* fRawHitClass;		  // Class of raw hit object to use
 
+  THaDetMap*    fDetMap;
+
  protected:
 
-  ClassDef(THcDetectorBase,0)
+  ClassDef(THcHitList,0)
 };
 #endif
diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx
index ad352c6..336557f 100644
--- a/src/THcHodoscope.cxx
+++ b/src/THcHodoscope.cxx
@@ -479,7 +479,7 @@ Int_t THcHodoscope::Decode( const THaEvData& evdata )
 {
 
   // Get the hitlist (fRawHitList) for this event
-  Int_t nhits = THcDetectorBase::Decode(evdata);
+  Int_t nhits = THcHitList::DecodeToHitList(evdata);
 
   return nhits;
 }
diff --git a/src/THcHodoscope.h b/src/THcHodoscope.h
index 5f23006..ee992ba 100644
--- a/src/THcHodoscope.h
+++ b/src/THcHodoscope.h
@@ -8,11 +8,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "TClonesArray.h"
-#include "THcNonTrackingDetector.h"
+#include "THaNonTrackingDetector.h"
+#include "THcHitList.h"
 
 class THaScCalib;
 
-class THcHodoscope : public THcNonTrackingDetector {
+class THcHodoscope : public THaNonTrackingDetector, public THcHitList {
 
 public:
   THcHodoscope( const char* name, const char* description = "",
-- 
GitLab