PandaRoot
PndMvdTsEvent.h
Go to the documentation of this file.
1 #ifndef TS_EVENT_CLASS
2 #define TS_EVENT_CLASS
3 
4 // #pragma once
5 #include <TObject.h>
6 #include <TClonesArray.h>
7 
8 typedef unsigned short WORD;
9 typedef unsigned int DWORD;
10 typedef unsigned long long QWORD;
11 
12 class PndMvdTsEvent : public TObject {
13  public:
14  PndMvdTsEvent();
15  virtual ~PndMvdTsEvent();
16 
17  public:
18  void Clear(const Option_t * = nullptr);
19  void SetEventId(UInt_t eventId) { fEventId = eventId; }
20  void FillSiHits(int adcChannel, DWORD *hits, WORD count);
21  void FillTdcValues(DWORD *tdcValues, WORD count);
22  void FillQdcValues(DWORD *qdcValues, WORD count);
23  void FillGiTdcValues(DWORD *tdcValues, WORD count);
24  void FillGiQdcValues(DWORD *qdcValues, WORD count);
25  void FillScalerValues(DWORD *qdcValues, WORD count);
26  void SetExtClockCount(QWORD value, DWORD resetCount)
27  {
28  fExtClockCount = value;
29  fExtClockResetCount = resetCount;
30  }
31 
32  UInt_t GetEventId() { return fEventId; }
33  TClonesArray *GetSiHitList() { return fSiHitList; }
34  TClonesArray *GetTdcValues() { return fTdcValues; }
35  TClonesArray *GetQdcValues() { return fQdcValues; }
36  // TClonesArray* GetGiTdcValues() {return fGiTdcValues;}
37  // TClonesArray* GetGiQdcValues() {return fGiQdcValues;}
39  UInt_t *GetScalerValues() { return fScalerValues; }
40 
41  ULong64_t GetExtClockTimeStamp(UInt_t &resetCount)
42  {
43  resetCount = fExtClockResetCount;
44  return fExtClockCount;
45  }
46 
47  protected:
48  // data:
49  public:
50  protected:
51  UInt_t fEventId; // unique ID for the Event
52  TClonesArray *fSiHitList; // list of hit channels on silicon strip detectors
53  TClonesArray *fTdcValues; // TDC raw values
54  TClonesArray *fQdcValues; // QDC raw values
55  // TClonesArray* fGiTdcValues; //TDC raw values (for Giessen TDC)
56  // TClonesArray* fGiQdcValues; //QDC raw values (for Giessen QDC)
58  UInt_t *fScalerValues; //[fNumScalerValues] Scaler values (usually 16 UInt_t values in array)
60  ULong64_t fExtClockCount; // counter value of ext. clock at time of trigger
61  UInt_t fExtClockResetCount; // number of times the ext. clock was reset (since loading of FPGA)
62 
63  private:
64  PndMvdTsEvent(const PndMvdTsEvent &) = delete;
65  PndMvdTsEvent &operator=(const PndMvdTsEvent &) = delete;
66  ClassDef(PndMvdTsEvent, 2);
67 };
68 
69 #endif
void FillGiQdcValues(DWORD *qdcValues, WORD count)
ULong64_t GetExtClockTimeStamp(UInt_t &resetCount)
Definition: PndMvdTsEvent.h:41
UInt_t GetEventId()
Definition: PndMvdTsEvent.h:32
void FillTdcValues(DWORD *tdcValues, WORD count)
void FillQdcValues(DWORD *qdcValues, WORD count)
void SetExtClockCount(QWORD value, DWORD resetCount)
Definition: PndMvdTsEvent.h:26
unsigned short WORD
Definition: PndMvdTsEvent.h:8
size_t fScalerValuesAllocSize
Definition: PndMvdTsEvent.h:59
virtual ~PndMvdTsEvent()
Int_t fNumScalerValues
Definition: PndMvdTsEvent.h:57
ULong64_t fExtClockCount
allocated memory for fScalerValues
Definition: PndMvdTsEvent.h:60
TClonesArray * fQdcValues
Definition: PndMvdTsEvent.h:54
UInt_t * GetScalerValues()
Definition: PndMvdTsEvent.h:39
void FillSiHits(int adcChannel, DWORD *hits, WORD count)
TClonesArray * GetQdcValues()
Definition: PndMvdTsEvent.h:35
UInt_t * fScalerValues
Definition: PndMvdTsEvent.h:58
TClonesArray * fTdcValues
Definition: PndMvdTsEvent.h:53
unsigned int DWORD
Definition: PndMvdTsEvent.h:9
void SetEventId(UInt_t eventId)
Definition: PndMvdTsEvent.h:19
void FillScalerValues(DWORD *qdcValues, WORD count)
Int_t GetScalerValueCount()
Definition: PndMvdTsEvent.h:38
UInt_t fExtClockResetCount
Definition: PndMvdTsEvent.h:61
TClonesArray * fSiHitList
Definition: PndMvdTsEvent.h:52
TClonesArray * GetSiHitList()
Definition: PndMvdTsEvent.h:33
unsigned long long QWORD
Definition: PndMvdTsEvent.h:10
void FillGiTdcValues(DWORD *tdcValues, WORD count)
void Clear(const Option_t *=nullptr)
TClonesArray * GetTdcValues()
Definition: PndMvdTsEvent.h:34