QwAnalysis
MQwV775TDC Class Reference

#include <MQwV775TDC.h>

+ Inheritance diagram for MQwV775TDC:

Public Member Functions

 MQwV775TDC ()
 
 ~MQwV775TDC ()
 
void DecodeTDCWord (UInt_t &word, const UInt_t roc_id=0)
 
Bool_t IsValidDataword ()
 
Bool_t IsHeaderword ()
 
UInt_t GetTDCSlotNumber ()
 
UInt_t GetTDCChannelNumber ()
 
UInt_t GetTDCData ()
 
UInt_t GetTDCMaxChannels ()
 
UInt_t GetTDCEventNumber ()
 
UInt_t GetTDCTriggerTime ()
 
void SetReferenceParameters (Double_t mindiff, Double_t maxdiff, Double_t offset, Double_t shift)
 
Double_t SubtractReference (Double_t rawtime, Double_t reftime)
 
Bool_t CheckDataIntegrity (const UInt_t roc_id, UInt_t *buffer, UInt_t num_words)
 
void PrintTDCHeader (Bool_t flag)
 
void PrintTDCData (Bool_t flag)
 

Private Attributes

Bool_t fV775ValidFlag
 
Bool_t fV775HeaderFlag
 
UInt_t fV775SlotNumber
 
UInt_t fV775ChannelNumber
 
UInt_t fV775Dataword
 
UInt_t fV775MaxChannelsPerModule
 
UInt_t fV775EventNumber
 

Static Private Attributes

static const UInt_t kV775Mask_SlotNumber = 0xf8000000
 
static const UInt_t kV775Mask_WordType = 0x07000000
 
static const UInt_t kV775Mask_CrateNumber = 0x00ff0000
 
static const UInt_t kV775Mask_HitChannels = 0x00003f00
 
static const UInt_t kV775Mask_EventCounter = 0x00ffffff
 
static const UInt_t kV775Mask_ChannelNumber = 0x001f0000
 
static const UInt_t kV775Mask_DataValidBit = 0x00004000
 
static const UInt_t kV775Mask_UnderthresholdBit = 0x00002000
 
static const UInt_t kV775Mask_OverflowBit = 0x00001000
 
static const UInt_t kV775Mask_Dataword = 0x00000fff
 
static const UInt_t kV775WordType_NotValid = 6
 
static const UInt_t kV775WordType_Header = 2
 
static const UInt_t kV775WordType_Tail = 4
 
static const UInt_t kV775WordType_Datum = 0
 

Detailed Description

Definition at line 19 of file MQwV775TDC.h.

Constructor & Destructor Documentation

MQwV775TDC::MQwV775TDC ( )

Definition at line 36 of file MQwV775TDC.cc.

References fV775ChannelNumber, fV775Dataword, fV775EventNumber, fV775HeaderFlag, fV775MaxChannelsPerModule, fV775SlotNumber, and fV775ValidFlag.

37 {
38  fV775ValidFlag = kFALSE;
39  fV775HeaderFlag = kFALSE;
40 
41  fV775SlotNumber = 0;
43  fV775Dataword = 0;
44  fV775EventNumber = 0;
46 }
UInt_t fV775EventNumber
Definition: MQwV775TDC.h:88
UInt_t fV775Dataword
Definition: MQwV775TDC.h:86
UInt_t fV775MaxChannelsPerModule
Definition: MQwV775TDC.h:87
UInt_t fV775ChannelNumber
Definition: MQwV775TDC.h:85
UInt_t fV775SlotNumber
Definition: MQwV775TDC.h:84
Bool_t fV775HeaderFlag
Definition: MQwV775TDC.h:82
Bool_t fV775ValidFlag
Definition: MQwV775TDC.h:81
MQwV775TDC::~MQwV775TDC ( )

Definition at line 48 of file MQwV775TDC.cc.

48 { }

Member Function Documentation

Bool_t MQwV775TDC::CheckDataIntegrity ( const UInt_t  roc_id,
UInt_t *  buffer,
UInt_t  num_words 
)

Definition at line 107 of file MQwV775TDC.cc.

108 {
109  // will be investigated later.
110  return kFALSE;
111 }
void MQwV775TDC::DecodeTDCWord ( UInt_t &  word,
const UInt_t  roc_id = 0 
)

Definition at line 53 of file MQwV775TDC.cc.

References fV775ChannelNumber, fV775Dataword, fV775EventNumber, fV775SlotNumber, fV775ValidFlag, kV775Mask_ChannelNumber, kV775Mask_Dataword, kV775Mask_SlotNumber, kV775Mask_WordType, and kV775WordType_Datum.

Referenced by QwRaster::ProcessEvBuffer(), QwTriggerScintillator::ProcessEvBuffer(), QwComptonPhotonDetector::ProcessEvBuffer(), QwMainDetector::ProcessEvBuffer(), and QwScanner::ProcessEvBuffer().

54 {
55 
56 
58  UInt_t wordtype = (word & kV775Mask_WordType)>>24;
59  if (wordtype == kV775WordType_Datum){
60  fV775ValidFlag = kTRUE;
62  /* datavalid = ((word & kV775Mask_DataValidBit)!=0); */
63  /* underthreshold = ((word & kV775Mask_UnderthresholdBit)!=0); */
64  /* overflow = ((word & kV775Mask_OverflowBit)!=0); */
66  fV775EventNumber = 0;
67  } else {
68  // For now, don't distinguish between the header, tail word,
69  // or invalid data.
70  // Treat them all as invalid data.
71  fV775ValidFlag = kFALSE;
73  fV775Dataword = 0;
74  fV775EventNumber = 0;
75  }
76 
77 
78  return;
79 }
UInt_t fV775EventNumber
Definition: MQwV775TDC.h:88
static const UInt_t kV775Mask_ChannelNumber
Definition: MQwV775TDC.h:70
static const UInt_t kV775Mask_Dataword
Definition: MQwV775TDC.h:74
static const UInt_t kV775Mask_WordType
Definition: MQwV775TDC.h:63
UInt_t fV775Dataword
Definition: MQwV775TDC.h:86
UInt_t fV775ChannelNumber
Definition: MQwV775TDC.h:85
UInt_t fV775SlotNumber
Definition: MQwV775TDC.h:84
Bool_t fV775ValidFlag
Definition: MQwV775TDC.h:81
static const UInt_t kV775WordType_Datum
Definition: MQwV775TDC.h:79
static const UInt_t kV775Mask_SlotNumber
Definition: MQwV775TDC.h:62

+ Here is the caller graph for this function:

UInt_t MQwV775TDC::GetTDCChannelNumber ( )
inline
UInt_t MQwV775TDC::GetTDCData ( )
inline
UInt_t MQwV775TDC::GetTDCEventNumber ( )
inline

Definition at line 47 of file MQwV775TDC.h.

References fV775EventNumber.

47 {return fV775EventNumber;};
UInt_t fV775EventNumber
Definition: MQwV775TDC.h:88
UInt_t MQwV775TDC::GetTDCMaxChannels ( )
inline

Definition at line 45 of file MQwV775TDC.h.

References fV775MaxChannelsPerModule.

UInt_t fV775MaxChannelsPerModule
Definition: MQwV775TDC.h:87
UInt_t MQwV775TDC::GetTDCSlotNumber ( )
inline

Definition at line 42 of file MQwV775TDC.h.

References fV775SlotNumber.

Referenced by QwRaster::ProcessEvBuffer(), QwTriggerScintillator::ProcessEvBuffer(), QwMainDetector::ProcessEvBuffer(), and QwScanner::ProcessEvBuffer().

42 {return fV775SlotNumber;};
UInt_t fV775SlotNumber
Definition: MQwV775TDC.h:84

+ Here is the caller graph for this function:

UInt_t MQwV775TDC::GetTDCTriggerTime ( )

Definition at line 94 of file MQwV775TDC.cc.

95 {
96  UInt_t trigger_time = 512;
97  // V775TDC has no trigger time information into its data stream.
98  // To keep the same function name between V775TDC and F1TDC,
99  // I use this function in order to return "trigger_time" as 512.
100  // The valid trigger time of F1TDC is in the range of 0 - 511,
101  // thus we can distinguish whether F1TDC or V775TDC.
102 
103  return trigger_time;
104 }
Bool_t MQwV775TDC::IsHeaderword ( )
inline

Definition at line 40 of file MQwV775TDC.h.

References fV775HeaderFlag.

40 {return fV775HeaderFlag;};
Bool_t fV775HeaderFlag
Definition: MQwV775TDC.h:82
Bool_t MQwV775TDC::IsValidDataword ( )
inline
void MQwV775TDC::PrintTDCData ( Bool_t  flag)

Definition at line 121 of file MQwV775TDC.cc.

References fV775ChannelNumber, fV775Dataword, and fV775SlotNumber.

122 {
123  if(flag)
124  {
125  std::cout << ">>>>>>>>> DATA : "
126  << "Slot " << fV775SlotNumber << " "
127  << "Ch "
128  << std::setw(2) << fV775ChannelNumber
129  << ", Raw dataword "
130  << std::setw(12) << fV775Dataword
131  << std::endl;
132  }
133  return;
134 }
UInt_t fV775Dataword
Definition: MQwV775TDC.h:86
UInt_t fV775ChannelNumber
Definition: MQwV775TDC.h:85
UInt_t fV775SlotNumber
Definition: MQwV775TDC.h:84
void MQwV775TDC::PrintTDCHeader ( Bool_t  flag)

Definition at line 115 of file MQwV775TDC.cc.

116 {
117  return;
118 }
void MQwV775TDC::SetReferenceParameters ( Double_t  mindiff,
Double_t  maxdiff,
Double_t  offset,
Double_t  shift 
)
inline

Definition at line 50 of file MQwV775TDC.h.

51  {
52  // Do nothing, but keep this function to behave like
53  // the MQwF1TDC class.
54  };
Double_t MQwV775TDC::SubtractReference ( Double_t  rawtime,
Double_t  reftime 
)

Definition at line 86 of file MQwV775TDC.cc.

87 {
88  Double_t real_time = rawtime - reftime;
89  return real_time;
90 }

Field Documentation

UInt_t MQwV775TDC::fV775ChannelNumber
private

Definition at line 85 of file MQwV775TDC.h.

Referenced by DecodeTDCWord(), GetTDCChannelNumber(), MQwV775TDC(), and PrintTDCData().

UInt_t MQwV775TDC::fV775Dataword
private

Definition at line 86 of file MQwV775TDC.h.

Referenced by DecodeTDCWord(), GetTDCData(), MQwV775TDC(), and PrintTDCData().

UInt_t MQwV775TDC::fV775EventNumber
private

Definition at line 88 of file MQwV775TDC.h.

Referenced by DecodeTDCWord(), GetTDCEventNumber(), and MQwV775TDC().

Bool_t MQwV775TDC::fV775HeaderFlag
private

Definition at line 82 of file MQwV775TDC.h.

Referenced by IsHeaderword(), and MQwV775TDC().

UInt_t MQwV775TDC::fV775MaxChannelsPerModule
private

Definition at line 87 of file MQwV775TDC.h.

Referenced by GetTDCMaxChannels(), and MQwV775TDC().

UInt_t MQwV775TDC::fV775SlotNumber
private

Definition at line 84 of file MQwV775TDC.h.

Referenced by DecodeTDCWord(), GetTDCSlotNumber(), MQwV775TDC(), and PrintTDCData().

Bool_t MQwV775TDC::fV775ValidFlag
private

Definition at line 81 of file MQwV775TDC.h.

Referenced by DecodeTDCWord(), IsValidDataword(), and MQwV775TDC().

const UInt_t MQwV775TDC::kV775Mask_ChannelNumber = 0x001f0000
staticprivate

Definition at line 70 of file MQwV775TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwV775TDC::kV775Mask_CrateNumber = 0x00ff0000
staticprivate

Definition at line 65 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775Mask_DataValidBit = 0x00004000
staticprivate

Definition at line 71 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775Mask_Dataword = 0x00000fff
staticprivate

Definition at line 74 of file MQwV775TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwV775TDC::kV775Mask_EventCounter = 0x00ffffff
staticprivate

Definition at line 68 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775Mask_HitChannels = 0x00003f00
staticprivate

Definition at line 66 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775Mask_OverflowBit = 0x00001000
staticprivate

Definition at line 73 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775Mask_SlotNumber = 0xf8000000
staticprivate

Definition at line 62 of file MQwV775TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwV775TDC::kV775Mask_UnderthresholdBit = 0x00002000
staticprivate

Definition at line 72 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775Mask_WordType = 0x07000000
staticprivate

Definition at line 63 of file MQwV775TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwV775TDC::kV775WordType_Datum = 0
staticprivate

Definition at line 79 of file MQwV775TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwV775TDC::kV775WordType_Header = 2
staticprivate

Definition at line 77 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775WordType_NotValid = 6
staticprivate

Definition at line 76 of file MQwV775TDC.h.

const UInt_t MQwV775TDC::kV775WordType_Tail = 4
staticprivate

Definition at line 78 of file MQwV775TDC.h.


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