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