FairRoot/PandaRoot
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
PndMvdTsEvent Class Reference

#include <PndMvdTsEvent.h>

Inheritance diagram for PndMvdTsEvent:

Public Member Functions

 PndMvdTsEvent ()
 
virtual ~PndMvdTsEvent ()
 
void Clear (const Option_t *=NULL)
 
void SetEventId (UInt_t eventId)
 
void FillSiHits (int adcChannel, DWORD *hits, WORD count)
 
void FillTdcValues (DWORD *tdcValues, WORD count)
 
void FillQdcValues (DWORD *qdcValues, WORD count)
 
void FillGiTdcValues (DWORD *tdcValues, WORD count)
 
void FillGiQdcValues (DWORD *qdcValues, WORD count)
 
void FillScalerValues (DWORD *qdcValues, WORD count)
 
void SetExtClockCount (QWORD value, DWORD resetCount)
 
UInt_t GetEventId ()
 
TClonesArray * GetSiHitList ()
 
TClonesArray * GetTdcValues ()
 
TClonesArray * GetQdcValues ()
 
Int_t GetScalerValueCount ()
 
UInt_t * GetScalerValues ()
 
ULong64_t GetExtClockTimeStamp (UInt_t &resetCount)
 

Protected Attributes

UInt_t fEventId
 
TClonesArray * fSiHitList
 
TClonesArray * fTdcValues
 
TClonesArray * fQdcValues
 
Int_t fNumScalerValues
 
UInt_t * fScalerValues
 
size_t fScalerValuesAllocSize
 
ULong64_t fExtClockCount
 allocated memory for fScalerValues More...
 
UInt_t fExtClockResetCount
 

Private Member Functions

 PndMvdTsEvent (const PndMvdTsEvent &)=delete
 
PndMvdTsEventoperator= (const PndMvdTsEvent &)=delete
 
 ClassDef (PndMvdTsEvent, 2)
 

Detailed Description

Definition at line 12 of file PndMvdTsEvent.h.

Constructor & Destructor Documentation

PndMvdTsEvent::PndMvdTsEvent ( )

Definition at line 10 of file PndMvdTsEvent.cxx.

10  :
11  fEventId(0),
12  fSiHitList(new TClonesArray("PndMvdSiHit")),
13  fTdcValues(new TClonesArray("PndMvdTdcData")),
14  fQdcValues(new TClonesArray("PndMvdQdcData")),
16  fScalerValues(NULL),
18  fExtClockCount(0),
20 {
21 }
size_t fScalerValuesAllocSize
Definition: PndMvdTsEvent.h:53
Int_t fNumScalerValues
Definition: PndMvdTsEvent.h:51
ULong64_t fExtClockCount
allocated memory for fScalerValues
Definition: PndMvdTsEvent.h:54
TClonesArray * fQdcValues
Definition: PndMvdTsEvent.h:48
UInt_t * fScalerValues
Definition: PndMvdTsEvent.h:52
TClonesArray * fTdcValues
Definition: PndMvdTsEvent.h:47
UInt_t fExtClockResetCount
Definition: PndMvdTsEvent.h:55
TClonesArray * fSiHitList
Definition: PndMvdTsEvent.h:46
PndMvdTsEvent::~PndMvdTsEvent ( )
virtual

Definition at line 23 of file PndMvdTsEvent.cxx.

References fQdcValues, fScalerValues, fSiHitList, and fTdcValues.

24 {
25  delete fSiHitList;
26  delete fTdcValues;
27  delete fQdcValues;
28  // delete fGiTdcValues;
29  // delete fGiQdcValues;
30  if (fScalerValues)
31  {
32  free(fScalerValues);
33  }
34 }
TClonesArray * fQdcValues
Definition: PndMvdTsEvent.h:48
UInt_t * fScalerValues
Definition: PndMvdTsEvent.h:52
TClonesArray * fTdcValues
Definition: PndMvdTsEvent.h:47
TClonesArray * fSiHitList
Definition: PndMvdTsEvent.h:46
PndMvdTsEvent::PndMvdTsEvent ( const PndMvdTsEvent )
privatedelete

Member Function Documentation

PndMvdTsEvent::ClassDef ( PndMvdTsEvent  ,
 
)
private
void PndMvdTsEvent::Clear ( const Option_t *  = NULL)

Definition at line 36 of file PndMvdTsEvent.cxx.

References fEventId, fNumScalerValues, fQdcValues, fSiHitList, and fTdcValues.

37 {
38  fEventId = 0;
39  fSiHitList->Clear();
40  fTdcValues->Clear();
41  fQdcValues->Clear();
42  // fGiTdcValues->Clear();
43  // fGiQdcValues->Clear();
44  fNumScalerValues = 0;
45  }
Int_t fNumScalerValues
Definition: PndMvdTsEvent.h:51
TClonesArray * fQdcValues
Definition: PndMvdTsEvent.h:48
TClonesArray * fTdcValues
Definition: PndMvdTsEvent.h:47
TClonesArray * fSiHitList
Definition: PndMvdTsEvent.h:46
void PndMvdTsEvent::FillGiQdcValues ( DWORD qdcValues,
WORD  count 
)

Definition at line 104 of file PndMvdTsEvent.cxx.

References count, fQdcValues, and i.

105 {
106  TClonesArray& qdcList = *fQdcValues;
107  for (int i=0; i<count; i++)
108  {
109  int channel = (qdcValues[i] & 0x001F0000) >> 16;
110  int value = (qdcValues[i] & 0x00000fff);
111  int underflow = (qdcValues[i] & 0x00002000);
112  int overflow = (qdcValues[i] & 0x00001000);
113  if (underflow || overflow)
114  {
115  value = -1;
116  }
117  new(qdcList[qdcList.GetEntriesFast()]) PndMvdQdcData(channel+32, value);
118  }
119 }
Int_t i
Definition: run_full.C:25
TClonesArray * fQdcValues
Definition: PndMvdTsEvent.h:48
int count
void PndMvdTsEvent::FillGiTdcValues ( DWORD tdcValues,
WORD  count 
)

Definition at line 89 of file PndMvdTsEvent.cxx.

References count, fTdcValues, and i.

90 {
91  TClonesArray& tdcList = *fTdcValues;
92  for (int i=0; i<count; i++)
93  {
94  if ( (tdcValues[i] & 0xf8000000) == 0)
95  {
96  int trailing = (tdcValues[i] & 0x04000000) >> 26;
97  int channel = (tdcValues[i] & 0x03E00000) >> 21;
98  int value = (tdcValues[i] & 0x001fffff);
99  new(tdcList[tdcList.GetEntriesFast()]) PndMvdTdcData(channel+32, value, trailing);
100  }
101  }
102 }
Int_t i
Definition: run_full.C:25
TClonesArray * fTdcValues
Definition: PndMvdTsEvent.h:47
int count
void PndMvdTsEvent::FillQdcValues ( DWORD qdcValues,
WORD  count 
)

Definition at line 78 of file PndMvdTsEvent.cxx.

References count, fQdcValues, and i.

79 {
80  TClonesArray& qdcList = *fQdcValues;
81  for (int i=0; i<count; i++)
82  {
83  int channel = (qdcValues[i] & 0xff000000) >> 24;
84  int value = (qdcValues[i] & 0x00ffffff);
85  new(qdcList[qdcList.GetEntriesFast()]) PndMvdQdcData(channel, value);
86  }
87 }
Int_t i
Definition: run_full.C:25
TClonesArray * fQdcValues
Definition: PndMvdTsEvent.h:48
int count
void PndMvdTsEvent::FillScalerValues ( DWORD qdcValues,
WORD  count 
)

Definition at line 121 of file PndMvdTsEvent.cxx.

References count, fNumScalerValues, fScalerValues, fScalerValuesAllocSize, and i.

122 {
124  {
125  fScalerValues = (UInt_t*)realloc(fScalerValues, sizeof(UInt_t)*count);
127  }
129  for (int i=0; i<count; i++)
130  {
131  fScalerValues[i] = scalerValues[i];
132  }
133 }
Int_t i
Definition: run_full.C:25
size_t fScalerValuesAllocSize
Definition: PndMvdTsEvent.h:53
Int_t fNumScalerValues
Definition: PndMvdTsEvent.h:51
UInt_t * fScalerValues
Definition: PndMvdTsEvent.h:52
int count
void PndMvdTsEvent::FillSiHits ( int  adcChannel,
DWORD hits,
WORD  count 
)

Definition at line 47 of file PndMvdTsEvent.cxx.

References count, fSiHitList, hitList, and i.

48 {
49  TClonesArray& hitList = *fSiHitList;
50  for (int i=0; i<count; i++)
51  {
52  //DWORD triggerNo = (hits[i]&0x1f000000) >> 24; // bit 28 to 24 //[R.K.03/2017] FIXME unused variable
53  WORD numFrames = (hits[i]&0x00f80000) >> 19; // bit 19 to 23
54  WORD channel = (hits[i]&0x0007f000) >> 12; // bit 12 to 18
55  WORD height = (hits[i]&0x00000fff); // bit 0 to 11
56  WORD box = adcChannel/6;
57  channel += (adcChannel%6)*128;
58 
59  new(hitList[hitList.GetEntriesFast()]) PndMvdSiHit(box, channel, height, numFrames);
60  }
61 }
Int_t i
Definition: run_full.C:25
unsigned short WORD
Definition: PndMvdTsEvent.h:8
std::vector< CbmEmcHit * > hitList
Definition: digi_analys.C:26
TClonesArray * fSiHitList
Definition: PndMvdTsEvent.h:46
int count
CbmHit * hits[nHits]
Definition: RiemannTest.C:19
void PndMvdTsEvent::FillTdcValues ( DWORD tdcValues,
WORD  count 
)

Definition at line 63 of file PndMvdTsEvent.cxx.

References count, fTdcValues, and i.

64 {
65  TClonesArray& tdcList = *fTdcValues;
66  for (int i=0; i<count; i++)
67  {
68  if ( (tdcValues[i] & 0xf8000000) == 0)
69  {
70  int trailing = (tdcValues[i] & 0x04000000) >> 26;
71  int channel = (tdcValues[i] & 0x03E00000) >> 21;
72  int value = (tdcValues[i] & 0x001fffff);
73  new(tdcList[tdcList.GetEntriesFast()]) PndMvdTdcData(channel, value, trailing);
74  }
75  }
76 }
Int_t i
Definition: run_full.C:25
TClonesArray * fTdcValues
Definition: PndMvdTsEvent.h:47
int count
UInt_t PndMvdTsEvent::GetEventId ( )
inline

Definition at line 29 of file PndMvdTsEvent.h.

References fEventId.

Referenced by PndMvdConvertApv::ReadNext().

29 {return fEventId;}
ULong64_t PndMvdTsEvent::GetExtClockTimeStamp ( UInt_t &  resetCount)
inline

Definition at line 38 of file PndMvdTsEvent.h.

References fExtClockCount, and fExtClockResetCount.

Referenced by PndMvdConvertApv::ReadNext().

38 {resetCount=fExtClockResetCount; return fExtClockCount;}
ULong64_t fExtClockCount
allocated memory for fScalerValues
Definition: PndMvdTsEvent.h:54
UInt_t fExtClockResetCount
Definition: PndMvdTsEvent.h:55
TClonesArray* PndMvdTsEvent::GetQdcValues ( )
inline

Definition at line 32 of file PndMvdTsEvent.h.

References fQdcValues.

32 {return fQdcValues;}
TClonesArray * fQdcValues
Definition: PndMvdTsEvent.h:48
Int_t PndMvdTsEvent::GetScalerValueCount ( )
inline

Definition at line 35 of file PndMvdTsEvent.h.

References fNumScalerValues.

35 {return fNumScalerValues;}
Int_t fNumScalerValues
Definition: PndMvdTsEvent.h:51
UInt_t* PndMvdTsEvent::GetScalerValues ( )
inline

Definition at line 36 of file PndMvdTsEvent.h.

References fScalerValues.

36 {return fScalerValues;}
UInt_t * fScalerValues
Definition: PndMvdTsEvent.h:52
TClonesArray* PndMvdTsEvent::GetSiHitList ( )
inline

Definition at line 30 of file PndMvdTsEvent.h.

References fSiHitList.

Referenced by PndMvdConvertApv::ReadNext().

30 {return fSiHitList;}
TClonesArray * fSiHitList
Definition: PndMvdTsEvent.h:46
TClonesArray* PndMvdTsEvent::GetTdcValues ( )
inline

Definition at line 31 of file PndMvdTsEvent.h.

References fTdcValues.

31 {return fTdcValues;}
TClonesArray * fTdcValues
Definition: PndMvdTsEvent.h:47
PndMvdTsEvent& PndMvdTsEvent::operator= ( const PndMvdTsEvent )
privatedelete
void PndMvdTsEvent::SetEventId ( UInt_t  eventId)
inline

Definition at line 20 of file PndMvdTsEvent.h.

References fEventId.

20 {fEventId=eventId;}
void PndMvdTsEvent::SetExtClockCount ( QWORD  value,
DWORD  resetCount 
)
inline

Definition at line 27 of file PndMvdTsEvent.h.

References fExtClockCount, and fExtClockResetCount.

27 {fExtClockCount=value; fExtClockResetCount=resetCount;}
ULong64_t fExtClockCount
allocated memory for fScalerValues
Definition: PndMvdTsEvent.h:54
UInt_t fExtClockResetCount
Definition: PndMvdTsEvent.h:55

Member Data Documentation

UInt_t PndMvdTsEvent::fEventId
protected

Definition at line 45 of file PndMvdTsEvent.h.

Referenced by Clear(), GetEventId(), and SetEventId().

ULong64_t PndMvdTsEvent::fExtClockCount
protected

allocated memory for fScalerValues

Definition at line 54 of file PndMvdTsEvent.h.

Referenced by GetExtClockTimeStamp(), and SetExtClockCount().

UInt_t PndMvdTsEvent::fExtClockResetCount
protected

Definition at line 55 of file PndMvdTsEvent.h.

Referenced by GetExtClockTimeStamp(), and SetExtClockCount().

Int_t PndMvdTsEvent::fNumScalerValues
protected

Definition at line 51 of file PndMvdTsEvent.h.

Referenced by Clear(), FillScalerValues(), and GetScalerValueCount().

TClonesArray* PndMvdTsEvent::fQdcValues
protected

Definition at line 48 of file PndMvdTsEvent.h.

Referenced by Clear(), FillGiQdcValues(), FillQdcValues(), GetQdcValues(), and ~PndMvdTsEvent().

UInt_t* PndMvdTsEvent::fScalerValues
protected

Definition at line 52 of file PndMvdTsEvent.h.

Referenced by FillScalerValues(), GetScalerValues(), and ~PndMvdTsEvent().

size_t PndMvdTsEvent::fScalerValuesAllocSize
protected

Definition at line 53 of file PndMvdTsEvent.h.

Referenced by FillScalerValues().

TClonesArray* PndMvdTsEvent::fSiHitList
protected

Definition at line 46 of file PndMvdTsEvent.h.

Referenced by Clear(), FillSiHits(), GetSiHitList(), and ~PndMvdTsEvent().

TClonesArray* PndMvdTsEvent::fTdcValues
protected

Definition at line 47 of file PndMvdTsEvent.h.

Referenced by Clear(), FillGiTdcValues(), FillTdcValues(), GetTdcValues(), and ~PndMvdTsEvent().


The documentation for this class was generated from the following files: