GRUTinizer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TSegaHit.h
Go to the documentation of this file.
1 #ifndef _TSEGAHIT_H_
2 #define _TSEGAHIT_H_
3 
4 #include "TDetectorHit.h"
5 
6 #define MAX_TRACE_LENGTH 100
7 
8 class TSegaHit : public TDetectorHit {
9 public:
10  TSegaHit() { }
11 
12  virtual void Copy(TObject&) const;
13  virtual void Clear(Option_t *opt = "");
14  virtual void Print(Option_t *opt = "") const;
15 
16  int GetChannel() const { return fChannel; }
17  int GetSlot() const { return fSlot; }
18  int GetCrate() const { return fCrate; }
19  virtual int Charge() const { return fCharge;}
20 
21  void SetChannel(int chan) { fChannel = chan; }
22  void SetSlot(int slot) { fSlot = slot; }
23  void SetCrate(int crate) { fCrate = crate; }
24  void SetCharge(int chg) { fCharge = chg; }
25 
26  unsigned int GetTraceLength() const { return fTraceLength; }
27  const unsigned short* GetTrace() const { return fTrace; }
28 
29  void SetTrace(unsigned int trace_length, const unsigned short* trace);
30 
31  long GetTimestamp() const { return fTimestamp; }
32  void SetTimestamp(long ts) { fTimestamp = ts; }
33 
34 private:
35  long fTimestamp;
36  int fChannel;
37  int fCharge;
38  int fSlot;
39  int fCrate;
40 
41  unsigned int fTraceLength;
42  unsigned short fTrace[MAX_TRACE_LENGTH];
43 
44  ClassDef(TSegaHit,2);
45 };
46 
47 #endif /* _TSEGAHIT_H_ */