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

THcHodoscopHit compiles

parent e514e996
No related branches found
No related tags found
No related merge requests found
......@@ -10,21 +10,22 @@
#include "THcHodoscopeHit.h"
ClassImp(ThcHodoscopeHit)
using namespace std;
void SetData(Int_t signal, Int_t data) {
void THcHodoscopeHit::SetData(Int_t signal, Int_t data) {
if(signal==1) {
fADC_pos = data;
} else if (signal==2) {
fADC_net = data;
fADC_neg = data;
} else if(signal==3) {
fADC_pos = data;
} else if (signal==4) {
fADC_net = data;
fADC_neg = data;
}
}
Int_t GetData(Int_t signal) {
Int_t THcHodoscopeHit::GetData(Int_t signal) {
if(signal==1) {
return(fADC_pos);
} else if (signal==2) {
......@@ -34,6 +35,9 @@ Int_t GetData(Int_t signal) {
} else if (signal==4) {
return(fADC_neg);
}
return(-1); // Actually should throw exception
}
//////////////////////////////////////////////////////////////////////////
ClassImp(THcHodoscopeHit)
#ifndef ROOT_THcHodoscopeHit
#define ROOT_THcHodoscopeHit
// Should we have a generic hit object that we inherit from? (A template,
// whatever that is?)
#include "TObject.h"
class THcHodoscopeHit : public TObject {
public:
THcHodoscopeHit(Int_t plane, Int_t counter) :
fPlane(plane), fCounter(counter), fADC_pos(-1), fADC_net(-1),
fTDC_pos(-1), fTDC_net(-1) {}
virtual ~THcHodosscopeHit() {}
THcHodoscopeHit(Int_t plane, Int_t counter) :
fPlane(plane), fCounter(counter), fADC_pos(-1), fADC_neg(-1),
fTDC_pos(-1), fTDC_neg(-1) {}
virtual ~THcHodoscopeHit() {}
void SetData(Int_t signal, Int_t data);
Int_t GetData(Int_t signal);
Int_t fPlane;
Int_t fCounter;
......@@ -24,7 +30,7 @@ class THcHodoscopeHit : public TObject {
private:
ClassDef(THaHodoscopeHit, 0);
ClassDef(THcHodoscopeHit, 0); // Hodoscope hit class
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment