QwAnalysis
MQwF1TDC Class Reference

#include <MQwF1TDC.h>

Public Member Functions

 MQwF1TDC ()
 
 ~MQwF1TDC ()
 
void DecodeTDCWord (UInt_t &word, const UInt_t roc_id)
 
Bool_t IsValidDataword () const
 
const Bool_t & IsHeaderword () const
 
const UInt_t & GetTDCSlotNumber () const
 
const UInt_t & GetTDCChannelNumber () const
 
const UInt_t & GetTDCChipAddress () const
 
const UInt_t & GetTDCChannelAddress () const
 
const UInt_t & GetTDCData () const
 
const UInt_t & GetTDCMaxChannels () const
 
UInt_t GetTDCEventNumber () const
 
UInt_t GetTDCTriggerTime () const
 
void SetTDCMaxChannels (const UInt_t in)
 
void PrintTDCHeader (Bool_t flag)
 
void PrintTDCData (Bool_t flag)
 
void Print (Bool_t flag)
 
UInt_t GetTDCHeaderEventNumber () const
 
UInt_t GetTDCHeaderTriggerTime () const
 
Bool_t IsValidDataSlot () const
 
Bool_t IsHeaderXorSetup () const
 
Bool_t IsNotHeaderTrigFIFO () const
 
Bool_t IsOverFlowEntry () const
 
Bool_t IsHitFIFOOverFlow () const
 
Bool_t IsOutputFIFOOverFlow () const
 
Bool_t IsResolutionLock () const
 
Bool_t IsFakeData () const
 

Private Member Functions

void PrintHitFIFOStatus (const UInt_t roc_id)
 
void PrintOutputFIFOStatus (const UInt_t roc_id)
 
void PrintResolutionLockStatus (const UInt_t roc_id)
 

Private Attributes

UInt_t fF1ROCNumber
 
UInt_t fF1SlotNumber
 
Bool_t fF1HeaderFlag
 
Bool_t fF1HitFIFOFlag
 
Bool_t fF1OutputFIFOFlag
 
Bool_t fF1ResolutionLockFlag
 
Bool_t fF1FakeDataFlag
 
UInt_t fF1ChannelNumber
 
UInt_t fF1ChipAddress
 
UInt_t fF1ChannelAddress
 
UInt_t fF1Dataword
 
Bool_t fF1HeaderTrigFIFOFlag
 
UInt_t fF1HeaderEventNumber
 
UInt_t fF1HeaderTriggerTime
 
Bool_t fF1HeaderXorSetupFlag
 
UInt_t fF1MaxChannelsPerModule
 
Bool_t fF1OverFlowEntryFlag
 
Bool_t fF1ValidDataSlotFlag
 

Static Private Attributes

static const UInt_t kF1Mask_SlotNumber = 0xf8000000
 
static const UInt_t kF1Mask_ResolutionLockFlag = 0x04000000
 
static const UInt_t kF1Mask_OutputFIFOFlag = 0x02000000
 
static const UInt_t kF1Mask_HitFIFOFlag = 0x01000000
 
static const UInt_t kF1Mask_HeaderFlag = 0x00800000
 
static const UInt_t kF1Mask_FakeDataFlag = 0x00400000
 
static const UInt_t kF1Mask_ChannelNumber = 0x003f0000
 
static const UInt_t kF1Mask_ChipAddress = 0x00380000
 
static const UInt_t kF1Mask_ChannelAddress = 0x00070000
 
static const UInt_t kF1Mask_Dataword = 0x0000ffff
 
static const UInt_t kF1Mask_HeaderTrigFIFOFlag = 0x00400000
 
static const UInt_t kF1Mask_HeaderEventNumber = 0x003f0000
 
static const UInt_t kF1Mask_HeaderTriggerTime = 0x0000ff80
 
static const UInt_t kF1Mask_HeaderXorSetupFlag = 0x00000040
 
static const UInt_t kF1Mask_HeaderChannelNumber = 0x0000003f
 
static const UInt_t kF1Mask_HeaderChipAddress = 0x00000038
 
static const UInt_t kF1Mask_HeaderChannelAddress = 0x00000007
 

Friends

std::ostream & operator<< (std::ostream &os, const MQwF1TDC &f1tdc)
 

Detailed Description

Definition at line 22 of file MQwF1TDC.h.

Constructor & Destructor Documentation

MQwF1TDC::MQwF1TDC ( )

Definition at line 40 of file MQwF1TDC.cc.

References fF1ChannelNumber, fF1Dataword, fF1FakeDataFlag, fF1HeaderEventNumber, fF1HeaderFlag, fF1HeaderTrigFIFOFlag, fF1HeaderTriggerTime, fF1HeaderXorSetupFlag, fF1HitFIFOFlag, fF1MaxChannelsPerModule, fF1OutputFIFOFlag, fF1OverFlowEntryFlag, fF1ResolutionLockFlag, fF1ROCNumber, fF1SlotNumber, and fF1ValidDataSlotFlag.

41 {
42  fF1ROCNumber = 0;
43  fF1SlotNumber = 0;
44 
45  fF1HeaderFlag = kFALSE;
46 
47  fF1HitFIFOFlag = kFALSE;
48  fF1OutputFIFOFlag = kFALSE;
49  fF1ResolutionLockFlag = kFALSE;
50 
51  fF1FakeDataFlag = kFALSE;
52  fF1ChannelNumber = 0;
53  fF1Dataword = 0;
54 
55 
56  fF1HeaderTrigFIFOFlag = kFALSE;
59  fF1HeaderXorSetupFlag = kFALSE;
60 
62 
63  // This initial fF1MaxChannelsPerModule 64
64  // is used to "resize" a vector in RegisterSlotNumber() function
65  // in each Subsystem, before one can access the real F1TDC
66  // configuration from CODA buffer. And it is a constant value (64)
67  // and is totally independent upon the real F1TDC configuration.
68  // The real maximum channel number can be access via F1TDContainer
69  // class of each subsystem.
70 
71  // However, Qweak uses only the Normal Resolution configuration.
72  // Thus, it is always 64 channels we uses.
73  // If someone wants to use the High Resolution Mode of F1TDC,
74  // it would be better to change this number to 32 by hand.
75  // Friday, September 3 13:50:49 EDT 2010, jhlee
76 
77  fF1OverFlowEntryFlag = kFALSE;
78  fF1ValidDataSlotFlag = kFALSE;
79 }
Bool_t fF1HeaderFlag
Definition: MQwF1TDC.h:148
UInt_t fF1ChannelNumber
Definition: MQwF1TDC.h:156
Bool_t fF1ResolutionLockFlag
Definition: MQwF1TDC.h:152
Bool_t fF1ValidDataSlotFlag
Definition: MQwF1TDC.h:171
Bool_t fF1HeaderTrigFIFOFlag
Definition: MQwF1TDC.h:163
UInt_t fF1HeaderEventNumber
Definition: MQwF1TDC.h:164
Bool_t fF1HitFIFOFlag
Definition: MQwF1TDC.h:150
Bool_t fF1OverFlowEntryFlag
Definition: MQwF1TDC.h:170
Bool_t fF1FakeDataFlag
Definition: MQwF1TDC.h:155
UInt_t fF1MaxChannelsPerModule
Definition: MQwF1TDC.h:169
UInt_t fF1SlotNumber
Definition: MQwF1TDC.h:146
UInt_t fF1Dataword
Definition: MQwF1TDC.h:159
Bool_t fF1OutputFIFOFlag
Definition: MQwF1TDC.h:151
UInt_t fF1ROCNumber
Definition: MQwF1TDC.h:145
UInt_t fF1HeaderTriggerTime
Definition: MQwF1TDC.h:165
Bool_t fF1HeaderXorSetupFlag
Definition: MQwF1TDC.h:166
MQwF1TDC::~MQwF1TDC ( )

Definition at line 81 of file MQwF1TDC.cc.

81 { }

Member Function Documentation

void MQwF1TDC::DecodeTDCWord ( UInt_t &  word,
const UInt_t  roc_id 
)

Definition at line 84 of file MQwF1TDC.cc.

References fF1ChannelAddress, fF1ChannelNumber, fF1ChipAddress, fF1Dataword, fF1FakeDataFlag, fF1HeaderEventNumber, fF1HeaderFlag, fF1HeaderTrigFIFOFlag, fF1HeaderTriggerTime, fF1HeaderXorSetupFlag, fF1HitFIFOFlag, fF1OutputFIFOFlag, fF1OverFlowEntryFlag, fF1ResolutionLockFlag, fF1ROCNumber, fF1SlotNumber, fF1ValidDataSlotFlag, kF1Mask_ChannelAddress, kF1Mask_ChannelNumber, kF1Mask_ChipAddress, kF1Mask_Dataword, kF1Mask_FakeDataFlag, kF1Mask_HeaderChannelAddress, kF1Mask_HeaderChannelNumber, kF1Mask_HeaderChipAddress, kF1Mask_HeaderEventNumber, kF1Mask_HeaderFlag, kF1Mask_HeaderTrigFIFOFlag, kF1Mask_HeaderTriggerTime, kF1Mask_HeaderXorSetupFlag, kF1Mask_HitFIFOFlag, kF1Mask_OutputFIFOFlag, kF1Mask_ResolutionLockFlag, and kF1Mask_SlotNumber.

Referenced by QwF1TDContainer::CheckDataIntegrity(), QwSciFiDetector::ProcessEvBuffer(), QwTriggerScintillator::ProcessEvBuffer(), QwDriftChamber::ProcessEvBuffer(), QwMainDetector::ProcessEvBuffer(), and QwScanner::ProcessEvBuffer().

85 {
86 
87  fF1ROCNumber = roc_id;
88  fF1SlotNumber = (word & kF1Mask_SlotNumber)>>27;
89 
90  if( fF1SlotNumber>=1 && fF1SlotNumber<=21 ) fF1ValidDataSlotFlag = kTRUE;
91  else fF1ValidDataSlotFlag = kFALSE;
92 
93 
94  fF1HeaderFlag = ((word & kF1Mask_HeaderFlag)==0);
95  // TRUE if the mask bit IS NOT set
96 
97  // These three flags should be TRUE if their mask bit IS set
98  fF1HitFIFOFlag = ((word & kF1Mask_HitFIFOFlag )!=0);
99  fF1OutputFIFOFlag = ((word & kF1Mask_OutputFIFOFlag )!=0);
101 
102  if (fF1HeaderFlag){
103  // This is a header word.
104  fF1Dataword = 0;
112  }
113  else {
114  // This is a data word.
115  fF1FakeDataFlag = ((word & kF1Mask_FakeDataFlag)!=0); // This flag should be TRUE if their mask bit IS set
116  fF1ChannelNumber = ( word & kF1Mask_ChannelNumber )>>16;
117  fF1ChipAddress = ( word & kF1Mask_ChipAddress )>>19;
118  fF1ChannelAddress = ( word & kF1Mask_ChannelAddress )>>16;
119  fF1Dataword = ( word & kF1Mask_Dataword );
120 
121  if(fF1Dataword == 65535) fF1OverFlowEntryFlag = kTRUE;
122  else fF1OverFlowEntryFlag = kFALSE;
123  // skip to record overflow dataword entry (65535, 0xFFFF)
126  // std::cout << "fake flag " << fF1FakeDataFlag
127  // << " channel: " << fF1ChannelNumber
128  // << " raw time: " << fF1Dataword
129  // << std::endl;
130  }
131  return;
132 }
static const UInt_t kF1Mask_HeaderChannelNumber
Definition: MQwF1TDC.h:139
UInt_t fF1ChannelAddress
Definition: MQwF1TDC.h:158
Bool_t fF1HeaderFlag
Definition: MQwF1TDC.h:148
static const UInt_t kF1Mask_HeaderTriggerTime
Definition: MQwF1TDC.h:132
static const UInt_t kF1Mask_ChannelNumber
Definition: MQwF1TDC.h:116
UInt_t fF1ChannelNumber
Definition: MQwF1TDC.h:156
Bool_t fF1ResolutionLockFlag
Definition: MQwF1TDC.h:152
Bool_t fF1ValidDataSlotFlag
Definition: MQwF1TDC.h:171
static const UInt_t kF1Mask_SlotNumber
Definition: MQwF1TDC.h:87
static const UInt_t kF1Mask_OutputFIFOFlag
Definition: MQwF1TDC.h:97
Bool_t fF1HeaderTrigFIFOFlag
Definition: MQwF1TDC.h:163
static const UInt_t kF1Mask_FakeDataFlag
Definition: MQwF1TDC.h:112
static const UInt_t kF1Mask_HeaderChipAddress
Definition: MQwF1TDC.h:140
static const UInt_t kF1Mask_ResolutionLockFlag
Definition: MQwF1TDC.h:96
static const UInt_t kF1Mask_HeaderEventNumber
Definition: MQwF1TDC.h:129
static const UInt_t kF1Mask_HitFIFOFlag
Definition: MQwF1TDC.h:98
UInt_t fF1HeaderEventNumber
Definition: MQwF1TDC.h:164
static const UInt_t kF1Mask_HeaderTrigFIFOFlag
Definition: MQwF1TDC.h:126
Bool_t fF1HitFIFOFlag
Definition: MQwF1TDC.h:150
static const UInt_t kF1Mask_ChipAddress
Definition: MQwF1TDC.h:117
Bool_t fF1OverFlowEntryFlag
Definition: MQwF1TDC.h:170
static const UInt_t kF1Mask_HeaderFlag
Definition: MQwF1TDC.h:101
UInt_t fF1ChipAddress
Definition: MQwF1TDC.h:157
Bool_t fF1FakeDataFlag
Definition: MQwF1TDC.h:155
static const UInt_t kF1Mask_ChannelAddress
Definition: MQwF1TDC.h:118
UInt_t fF1SlotNumber
Definition: MQwF1TDC.h:146
static const UInt_t kF1Mask_HeaderChannelAddress
Definition: MQwF1TDC.h:141
static const UInt_t kF1Mask_Dataword
Definition: MQwF1TDC.h:121
UInt_t fF1Dataword
Definition: MQwF1TDC.h:159
Bool_t fF1OutputFIFOFlag
Definition: MQwF1TDC.h:151
UInt_t fF1ROCNumber
Definition: MQwF1TDC.h:145
static const UInt_t kF1Mask_HeaderXorSetupFlag
Definition: MQwF1TDC.h:135
UInt_t fF1HeaderTriggerTime
Definition: MQwF1TDC.h:165
Bool_t fF1HeaderXorSetupFlag
Definition: MQwF1TDC.h:166

+ Here is the caller graph for this function:

const UInt_t& MQwF1TDC::GetTDCChannelAddress ( ) const
inline

Definition at line 47 of file MQwF1TDC.h.

References fF1ChannelAddress.

Referenced by QwF1TDContainer::CheckDataIntegrity().

47 {return fF1ChannelAddress;};
UInt_t fF1ChannelAddress
Definition: MQwF1TDC.h:158

+ Here is the caller graph for this function:

const UInt_t& MQwF1TDC::GetTDCChipAddress ( ) const
inline

Definition at line 46 of file MQwF1TDC.h.

References fF1ChipAddress.

Referenced by QwF1TDContainer::CheckDataIntegrity().

46 {return fF1ChipAddress;};
UInt_t fF1ChipAddress
Definition: MQwF1TDC.h:157

+ Here is the caller graph for this function:

const UInt_t& MQwF1TDC::GetTDCData ( ) const
inline

Definition at line 49 of file MQwF1TDC.h.

References fF1Dataword.

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

49 {return fF1Dataword;};
UInt_t fF1Dataword
Definition: MQwF1TDC.h:159

+ Here is the caller graph for this function:

UInt_t MQwF1TDC::GetTDCEventNumber ( ) const
inline

Definition at line 53 of file MQwF1TDC.h.

References GetTDCHeaderEventNumber().

Referenced by QwF1TDContainer::CheckDataIntegrity().

53 {return GetTDCHeaderEventNumber();};
UInt_t GetTDCHeaderEventNumber() const
Definition: MQwF1TDC.h:73

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t MQwF1TDC::GetTDCHeaderEventNumber ( ) const
inline

Definition at line 73 of file MQwF1TDC.h.

References fF1HeaderEventNumber.

Referenced by QwF1TDContainer::CheckDataIntegrity(), and GetTDCEventNumber().

73 {return fF1HeaderEventNumber;};
UInt_t fF1HeaderEventNumber
Definition: MQwF1TDC.h:164

+ Here is the caller graph for this function:

UInt_t MQwF1TDC::GetTDCHeaderTriggerTime ( ) const
inline

Definition at line 74 of file MQwF1TDC.h.

References fF1HeaderTriggerTime.

Referenced by QwF1TDContainer::CheckDataIntegrity(), and GetTDCTriggerTime().

74 {return fF1HeaderTriggerTime;};
UInt_t fF1HeaderTriggerTime
Definition: MQwF1TDC.h:165

+ Here is the caller graph for this function:

const UInt_t& MQwF1TDC::GetTDCMaxChannels ( ) const
inline
UInt_t MQwF1TDC::GetTDCTriggerTime ( ) const
inline

Definition at line 54 of file MQwF1TDC.h.

References GetTDCHeaderTriggerTime().

Referenced by QwF1TDContainer::CheckDataIntegrity().

54 {return GetTDCHeaderTriggerTime();};
UInt_t GetTDCHeaderTriggerTime() const
Definition: MQwF1TDC.h:74

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsFakeData ( ) const
inline

Definition at line 87 of file MQwF1TDC.h.

Referenced by QwF1TDContainer::CheckDataIntegrity().

87 {return fF1FakeDataFlag;};
Bool_t fF1FakeDataFlag
Definition: MQwF1TDC.h:155

+ Here is the caller graph for this function:

const Bool_t& MQwF1TDC::IsHeaderword ( ) const
inline

Definition at line 42 of file MQwF1TDC.h.

References fF1HeaderFlag.

Referenced by QwF1TDContainer::CheckDataIntegrity().

42 {return fF1HeaderFlag;};
Bool_t fF1HeaderFlag
Definition: MQwF1TDC.h:148

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsHeaderXorSetup ( ) const
inline

Definition at line 79 of file MQwF1TDC.h.

References fF1HeaderXorSetupFlag.

Referenced by QwF1TDContainer::CheckDataIntegrity().

79 {return fF1HeaderXorSetupFlag;};
Bool_t fF1HeaderXorSetupFlag
Definition: MQwF1TDC.h:166

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsHitFIFOOverFlow ( ) const
inline

Definition at line 83 of file MQwF1TDC.h.

References fF1HitFIFOFlag.

Referenced by QwF1TDContainer::CheckDataIntegrity().

83 {return fF1HitFIFOFlag;};
Bool_t fF1HitFIFOFlag
Definition: MQwF1TDC.h:150

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsNotHeaderTrigFIFO ( ) const
inline

Definition at line 80 of file MQwF1TDC.h.

References fF1HeaderTrigFIFOFlag.

Referenced by QwF1TDContainer::CheckDataIntegrity().

80 {return !fF1HeaderTrigFIFOFlag;};
Bool_t fF1HeaderTrigFIFOFlag
Definition: MQwF1TDC.h:163

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsOutputFIFOOverFlow ( ) const
inline

Definition at line 84 of file MQwF1TDC.h.

References fF1OutputFIFOFlag.

Referenced by QwF1TDContainer::CheckDataIntegrity().

84 {return fF1OutputFIFOFlag;};
Bool_t fF1OutputFIFOFlag
Definition: MQwF1TDC.h:151

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsOverFlowEntry ( ) const
inline

Definition at line 81 of file MQwF1TDC.h.

References fF1OverFlowEntryFlag.

81 {return fF1OverFlowEntryFlag;};
Bool_t fF1OverFlowEntryFlag
Definition: MQwF1TDC.h:170
Bool_t MQwF1TDC::IsResolutionLock ( ) const
inline

Definition at line 85 of file MQwF1TDC.h.

References fF1ResolutionLockFlag.

Referenced by QwF1TDContainer::CheckDataIntegrity().

85 {return fF1ResolutionLockFlag;};
Bool_t fF1ResolutionLockFlag
Definition: MQwF1TDC.h:152

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsValidDataSlot ( ) const
inline

Definition at line 77 of file MQwF1TDC.h.

References fF1ValidDataSlotFlag.

Referenced by QwF1TDContainer::CheckDataIntegrity().

77 {return fF1ValidDataSlotFlag;};
Bool_t fF1ValidDataSlotFlag
Definition: MQwF1TDC.h:171

+ Here is the caller graph for this function:

Bool_t MQwF1TDC::IsValidDataword ( ) const

Definition at line 328 of file MQwF1TDC.cc.

References fF1FakeDataFlag, fF1HeaderFlag, fF1OverFlowEntryFlag, fF1ResolutionLockFlag, and fF1ValidDataSlotFlag.

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

329 {
330  // fF1ValidDataSlotFlag = TRUE,
331  // fF1ResolutionFlag = TRUE,
332  // fF1HeaderFlag = FALSE,
333  // fF1OverFlowEntry = FALSE,
334  // fF1FakeDataWord = FALSE, then it is a valid data word.
336  // if( fF1ValidDataSlotFlag && fF1ResolutionLockFlag && !fF1HeaderFlag)
337  return kTRUE;
338  else
339  return kFALSE;
340 }
Bool_t fF1HeaderFlag
Definition: MQwF1TDC.h:148
Bool_t fF1ResolutionLockFlag
Definition: MQwF1TDC.h:152
Bool_t fF1ValidDataSlotFlag
Definition: MQwF1TDC.h:171
Bool_t fF1OverFlowEntryFlag
Definition: MQwF1TDC.h:170
Bool_t fF1FakeDataFlag
Definition: MQwF1TDC.h:155

+ Here is the caller graph for this function:

void MQwF1TDC::Print ( Bool_t  flag)

Definition at line 191 of file MQwF1TDC.cc.

192 {
193  if (! this) return; // do nothing if this is a null object
194 
195  if(flag) {
196  std::cout << *this << std::endl;
197  }
198  return;
199 }
void MQwF1TDC::PrintHitFIFOStatus ( const UInt_t  roc_id)
private

Definition at line 305 of file MQwF1TDC.cc.

References QwLog::endl(), fF1HitFIFOFlag, GetTDCChannelNumber(), GetTDCSlotNumber(), and QwWarning.

306 {
307  if (fF1HitFIFOFlag) {
308  QwWarning << "F1TDC board HIT FIFO FULL at Ch "
309  << GetTDCChannelNumber() << " ROC " << roc_id
310  << " Slot " << GetTDCSlotNumber() << QwLog::endl;
311  }
312  return;
313 }
Bool_t fF1HitFIFOFlag
Definition: MQwF1TDC.h:150
const UInt_t & GetTDCSlotNumber() const
Definition: MQwF1TDC.h:44
const UInt_t & GetTDCChannelNumber() const
Definition: MQwF1TDC.h:45
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
#define QwWarning
Predefined log drain for warnings.
Definition: QwLog.h:45

+ Here is the call graph for this function:

void MQwF1TDC::PrintOutputFIFOStatus ( const UInt_t  roc_id)
private

Definition at line 317 of file MQwF1TDC.cc.

References QwLog::endl(), fF1OutputFIFOFlag, GetTDCChannelNumber(), GetTDCSlotNumber(), and QwWarning.

318 {
319  if (fF1OutputFIFOFlag) {
320  QwWarning << "F1TDC board OUTPUT FIFO FULL at Ch "
321  << GetTDCChannelNumber() << " ROC " << roc_id
322  << " Slot " << GetTDCSlotNumber() << QwLog::endl;
323  }
324  return;
325 }
const UInt_t & GetTDCSlotNumber() const
Definition: MQwF1TDC.h:44
const UInt_t & GetTDCChannelNumber() const
Definition: MQwF1TDC.h:45
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
Bool_t fF1OutputFIFOFlag
Definition: MQwF1TDC.h:151
#define QwWarning
Predefined log drain for warnings.
Definition: QwLog.h:45

+ Here is the call graph for this function:

void MQwF1TDC::PrintResolutionLockStatus ( const UInt_t  roc_id)
private

Definition at line 293 of file MQwF1TDC.cc.

References QwLog::endl(), fF1ResolutionLockFlag, GetTDCChannelNumber(), GetTDCSlotNumber(), and QwWarning.

294 {
295  if (not fF1ResolutionLockFlag) {
296  QwWarning << "F1TDC board RESOULTION LOCK FAIL at Ch "
297  << GetTDCChannelNumber() << " ROC " << roc_id
298  << " Slot " << GetTDCSlotNumber() << QwLog::endl;
299  }
300  return;
301 }
Bool_t fF1ResolutionLockFlag
Definition: MQwF1TDC.h:152
const UInt_t & GetTDCSlotNumber() const
Definition: MQwF1TDC.h:44
const UInt_t & GetTDCChannelNumber() const
Definition: MQwF1TDC.h:45
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
#define QwWarning
Predefined log drain for warnings.
Definition: QwLog.h:45

+ Here is the call graph for this function:

void MQwF1TDC::PrintTDCData ( Bool_t  flag)

Definition at line 213 of file MQwF1TDC.cc.

214 {
215  if (! this) return; // do nothing if this is a null object
216 
217  if(flag) {
218  std::cout << *this << std::endl;
219  }
220  return;
221 }
void MQwF1TDC::PrintTDCHeader ( Bool_t  flag)

Definition at line 202 of file MQwF1TDC.cc.

203 {
204  if (! this) return; // do nothing if this is a null object
205 
206  if(flag) {
207  std::cout << *this << std::endl;
208  }
209  return;
210 }
void MQwF1TDC::SetTDCMaxChannels ( const UInt_t  in)
inline

Definition at line 57 of file MQwF1TDC.h.

References fF1MaxChannelsPerModule, and Qw::in.

static const double in
Definition: QwUnits.h:66
UInt_t fF1MaxChannelsPerModule
Definition: MQwF1TDC.h:169

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const MQwF1TDC f1tdc 
)
friend

Definition at line 134 of file MQwF1TDC.cc.

135 {
136  if(f1tdc.fF1HeaderFlag) {
137  os << "<<<< Header:";
138  }
139  else {
140  os << ">>>> DATA :";
141  }
142 
143  os << " Ch" << std::setw(3) << f1tdc.fF1ChannelNumber;
144  os << "[" << f1tdc.fF1ChipAddress;
145  os << "," << f1tdc.fF1ChannelAddress;
146  os << "]";
147 
148  if(f1tdc.fF1HeaderFlag) {
149  os << " Xor " << f1tdc.fF1HeaderXorSetupFlag
150  << " tOF " << f1tdc.fF1HeaderTrigFIFOFlag;
151  }
152  else {
153  os << " - DATA "
154  << f1tdc.fF1FakeDataFlag
155  << " - ";
156  }
157 
158  os << "(hitOF,outOF,resLK)("
159  << f1tdc.fF1HitFIFOFlag
160  << f1tdc.fF1OutputFIFOFlag
161  << f1tdc.fF1ResolutionLockFlag
162  << ")";
163  os << " ROC" << std::setw(2) << f1tdc.fF1ROCNumber;
164 
165  Int_t slot = 0;
166  slot = f1tdc.fF1SlotNumber;
167 
168  os << " Slot" << std::setw(2) << slot;
169 
170  if(f1tdc.fF1HeaderFlag) {
171  os << " EvtN" << std::setw(2) << f1tdc.fF1HeaderEventNumber;
172  os << " TriT" << std::setw(4) << f1tdc.fF1HeaderTriggerTime;
173  }
174  else {
175  os << " RawT " << std::setw(10) << f1tdc.fF1Dataword;
176  }
177 
178  if(slot == 0) {
179  os << ": a filler word";
180  }
181  if( (not f1tdc.fF1HeaderFlag) and (f1tdc.fF1FakeDataFlag) ){
182  os << ": --> fake data";
183  }
184 
185  // os << std::endl;
186  return os;
187 }
UInt_t fF1ChannelAddress
Definition: MQwF1TDC.h:158
Bool_t fF1HeaderFlag
Definition: MQwF1TDC.h:148
UInt_t fF1ChannelNumber
Definition: MQwF1TDC.h:156
Bool_t fF1ResolutionLockFlag
Definition: MQwF1TDC.h:152
Bool_t fF1HeaderTrigFIFOFlag
Definition: MQwF1TDC.h:163
UInt_t fF1HeaderEventNumber
Definition: MQwF1TDC.h:164
Bool_t fF1HitFIFOFlag
Definition: MQwF1TDC.h:150
UInt_t fF1ChipAddress
Definition: MQwF1TDC.h:157
Bool_t fF1FakeDataFlag
Definition: MQwF1TDC.h:155
UInt_t fF1SlotNumber
Definition: MQwF1TDC.h:146
UInt_t fF1Dataword
Definition: MQwF1TDC.h:159
Bool_t fF1OutputFIFOFlag
Definition: MQwF1TDC.h:151
UInt_t fF1ROCNumber
Definition: MQwF1TDC.h:145
UInt_t fF1HeaderTriggerTime
Definition: MQwF1TDC.h:165
Bool_t fF1HeaderXorSetupFlag
Definition: MQwF1TDC.h:166

Field Documentation

UInt_t MQwF1TDC::fF1ChannelAddress
private

Definition at line 158 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), GetTDCChannelAddress(), and operator<<().

UInt_t MQwF1TDC::fF1ChannelNumber
private

Definition at line 156 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), GetTDCChannelNumber(), MQwF1TDC(), and operator<<().

UInt_t MQwF1TDC::fF1ChipAddress
private

Definition at line 157 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), GetTDCChipAddress(), and operator<<().

UInt_t MQwF1TDC::fF1Dataword
private

Definition at line 159 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), GetTDCData(), MQwF1TDC(), and operator<<().

Bool_t MQwF1TDC::fF1FakeDataFlag
private

Definition at line 155 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), IsValidDataword(), MQwF1TDC(), and operator<<().

UInt_t MQwF1TDC::fF1HeaderEventNumber
private

Definition at line 164 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), GetTDCHeaderEventNumber(), MQwF1TDC(), and operator<<().

Bool_t MQwF1TDC::fF1HeaderFlag
private

Definition at line 148 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), IsHeaderword(), IsValidDataword(), MQwF1TDC(), and operator<<().

Bool_t MQwF1TDC::fF1HeaderTrigFIFOFlag
private

Definition at line 163 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), IsNotHeaderTrigFIFO(), MQwF1TDC(), and operator<<().

UInt_t MQwF1TDC::fF1HeaderTriggerTime
private

Definition at line 165 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), GetTDCHeaderTriggerTime(), MQwF1TDC(), and operator<<().

Bool_t MQwF1TDC::fF1HeaderXorSetupFlag
private

Definition at line 166 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), IsHeaderXorSetup(), MQwF1TDC(), and operator<<().

Bool_t MQwF1TDC::fF1HitFIFOFlag
private
UInt_t MQwF1TDC::fF1MaxChannelsPerModule
private

Definition at line 169 of file MQwF1TDC.h.

Referenced by GetTDCMaxChannels(), MQwF1TDC(), and SetTDCMaxChannels().

Bool_t MQwF1TDC::fF1OutputFIFOFlag
private
Bool_t MQwF1TDC::fF1OverFlowEntryFlag
private

Definition at line 170 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), IsOverFlowEntry(), IsValidDataword(), and MQwF1TDC().

Bool_t MQwF1TDC::fF1ResolutionLockFlag
private
UInt_t MQwF1TDC::fF1ROCNumber
private

Definition at line 145 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), MQwF1TDC(), and operator<<().

UInt_t MQwF1TDC::fF1SlotNumber
private

Definition at line 146 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), GetTDCSlotNumber(), MQwF1TDC(), and operator<<().

Bool_t MQwF1TDC::fF1ValidDataSlotFlag
private

Definition at line 171 of file MQwF1TDC.h.

Referenced by DecodeTDCWord(), IsValidDataSlot(), IsValidDataword(), and MQwF1TDC().

const UInt_t MQwF1TDC::kF1Mask_ChannelAddress = 0x00070000
staticprivate

Definition at line 118 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_ChannelNumber = 0x003f0000
staticprivate

Definition at line 116 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_ChipAddress = 0x00380000
staticprivate

Definition at line 117 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_Dataword = 0x0000ffff
staticprivate

Definition at line 121 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_FakeDataFlag = 0x00400000
staticprivate

Definition at line 112 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderChannelAddress = 0x00000007
staticprivate

Definition at line 141 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderChannelNumber = 0x0000003f
staticprivate

Definition at line 139 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderChipAddress = 0x00000038
staticprivate

Definition at line 140 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderEventNumber = 0x003f0000
staticprivate

Definition at line 129 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderFlag = 0x00800000
staticprivate

Definition at line 101 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderTrigFIFOFlag = 0x00400000
staticprivate

Definition at line 126 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderTriggerTime = 0x0000ff80
staticprivate

Definition at line 132 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HeaderXorSetupFlag = 0x00000040
staticprivate

Definition at line 135 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_HitFIFOFlag = 0x01000000
staticprivate

Definition at line 98 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_OutputFIFOFlag = 0x02000000
staticprivate

Definition at line 97 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_ResolutionLockFlag = 0x04000000
staticprivate

Definition at line 96 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().

const UInt_t MQwF1TDC::kF1Mask_SlotNumber = 0xf8000000
staticprivate

Definition at line 87 of file MQwF1TDC.h.

Referenced by DecodeTDCWord().


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