Skip to content
Snippets Groups Projects
Commit 192d0d31 authored by Stephen A. Wood's avatar Stephen A. Wood
Browse files

Add default argument values to THcHodoscopeHit and THcRawHit

constructors so that they now work in TClonesArray.
parent fafa3449
Branches acts_beampipe
No related tags found
No related merge requests found
...@@ -166,7 +166,7 @@ install: all ...@@ -166,7 +166,7 @@ install: all
cp -p $(USERLIB) $(HOME)/cue/SRC/ana cp -p $(USERLIB) $(HOME)/cue/SRC/ana
clean: clean:
rm -f *.o *~ $(USERLIB) $(USERDICT).* rm -f src/*.o *~ $(USERLIB) $(USERDICT).*
realclean: clean realclean: clean
rm -f *.d rm -f *.d
......
...@@ -7,7 +7,7 @@ class THcHodoscopeHit : public THcRawHit { ...@@ -7,7 +7,7 @@ class THcHodoscopeHit : public THcRawHit {
public: public:
THcHodoscopeHit(Int_t plane, Int_t counter) : THcRawHit(plane, counter), THcHodoscopeHit(Int_t plane=0, Int_t counter=0) : THcRawHit(plane, counter),
fADC_pos(-1), fADC_neg(-1), fADC_pos(-1), fADC_neg(-1),
fTDC_pos(-1), fTDC_neg(-1) { fTDC_pos(-1), fTDC_neg(-1) {
} }
...@@ -15,7 +15,7 @@ class THcHodoscopeHit : public THcRawHit { ...@@ -15,7 +15,7 @@ class THcHodoscopeHit : public THcRawHit {
virtual ~THcHodoscopeHit() {} virtual ~THcHodoscopeHit() {}
virtual void Clear( Option_t* opt="" ) virtual void Clear( Option_t* opt="" )
{ fADC_pos = -1; fADC_neg = -1; fTDC_pos = -1; fTDC_neg = -1; } { fADC_pos = -1; fADC_neg = -1; fTDC_pos = -1; fTDC_neg = -1; }
void SetData(Int_t signal, Int_t data); void SetData(Int_t signal, Int_t data);
Int_t GetData(Int_t signal); Int_t GetData(Int_t signal);
...@@ -32,7 +32,7 @@ class THcHodoscopeHit : public THcRawHit { ...@@ -32,7 +32,7 @@ class THcHodoscopeHit : public THcRawHit {
private: private:
ClassDef(THcHodoscopeHit, 0) // Hodoscope hit class ClassDef(THcHodoscopeHit, 0); // Hodoscope hit class
}; };
#endif #endif
...@@ -10,18 +10,8 @@ ...@@ -10,18 +10,8 @@
#include "THcRawHit.h" #include "THcRawHit.h"
THcRawHit::THcRawHit() //THcRawHit::~THcRawHit()
{ //{}
// Constructor
}
THcRawHit::THcRawHit(Int_t plane, Int_t counter) :
fPlane(plane), fCounter(counter)
{
}
THcRawHit::~THcRawHit()
{}
ClassImp(THcRawHit) ClassImp(THcRawHit)
......
...@@ -10,19 +10,17 @@ ...@@ -10,19 +10,17 @@
class THcRawHit : public TObject { class THcRawHit : public TObject {
public: public:
THcRawHit(); THcRawHit(Int_t plane=0, Int_t counter=0) :
virtual ~THcRawHit(); fPlane(plane), fCounter(counter) {};
THcRawHit( const THcRawHit& rhs ) : TObject(rhs) {}
THcRawHit& operator=( const THcRawHit& rhs )
{ TObject::operator=(rhs); return *this; };
THcRawHit(Int_t plane, Int_t counter); virtual ~THcRawHit() {}
// THcRawHit( const THcRawHit& rhs ) : TObject(rhs) {}
// THcRawHit& operator=( const THcRawHit& rhs ) // This line causes problem
// { TObject::operator=(rhs); return *this; } // virtual void Clear( Option_t* opt="" )=0;
virtual void Clear( Option_t* opt="" )=0;
// virtual Bool_t operator==( const THcRawHit& ) = 0; // virtual Bool_t operator==( const THcRawHit& ) = 0;
// virtual Bool_t operator!=( const THcRawHit& ) = 0; // virtual Bool_t operator!=( const THcRawHit& ) = 0;
...@@ -37,9 +35,9 @@ class THcRawHit : public TObject { ...@@ -37,9 +35,9 @@ class THcRawHit : public TObject {
Int_t fPlane; Int_t fPlane;
Int_t fCounter; Int_t fCounter;
protected: private:
ClassDef(THcRawHit,0) ClassDef(THcRawHit,2) // Track ID abstract base class
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment