QwAnalysis
QwF1TDC Class Reference

one F1TDC configuration and reference signal(s) holder More...

#include <QwF1TDContainer.h>

Inherits TObject.

Public Member Functions

 QwF1TDC ()
 
 QwF1TDC (const Int_t roc, const Int_t slot)
 
virtual ~QwF1TDC ()
 
Int_t GetROCNumber () const
 
Int_t GetSlotNumber () const
 
Int_t GetChannelNumber () const
 
Bool_t IsReferenceSlot () const
 
Bool_t IsNormResolution () const
 
Bool_t IsSyncMode () const
 
UInt_t GetF1TDC_refcnt () const
 
UInt_t GetF1TDC_hsdiv () const
 
UInt_t GetF1TDC_refclkdiv () const
 
UInt_t GetF1TDC_trigwin () const
 
UInt_t GetF1TDC_triglat () const
 
Double_t GetF1TDC_tframe () const
 
Double_t GetF1TDC_full_range () const
 
Double_t GetF1TDC_window () const
 
Double_t GetF1TDC_latency () const
 
Double_t GetF1TDC_resolution () const
 
Double_t GetF1TDC_bin_size () const
 
Double_t GetF1TDC_t_offset () const
 
Double_t GetF1TDC_trig_t_offset () const
 
Double_t GetF1TDC_trig_resolution () const
 
Int_t GetF1TDCIndex () const
 
Int_t GetF1BankIndex () const
 
const TString GetF1SystemName () const
 
void SetROCNumber (const Int_t roc)
 
void SetSlotNumber (const Int_t slot)
 
void SetReferenceSlot (const Bool_t reflag)
 
void SetF1TDCIndex (const Int_t tdc_index)
 
void SetF1BankIndex (const Int_t bank_index)
 
void SetF1SystemName (const TString name)
 
void SetF1TDCBuffer (UInt_t *buffer, UInt_t num_words)
 
const UInt_t * GetF1TDCBuffer () const
 
void PrintF1TDCBuffer ()
 
void PrintF1TDCConfigure ()
 
void PrintChannelErrorCounter (Int_t channel)
 
void PrintErrorCounter ()
 
void PrintTotalErrorCounter ()
 
void PrintContact ()
 
TString GetChannelErrorCounter (Int_t channel)
 
TString GetErrorCounter ()
 
TString GetTotalErrorCounter ()
 
void AddSEU (Int_t channel)
 
void AddSYN (Int_t channel)
 
void AddEMM (Int_t channel)
 
void AddTFO (Int_t channel)
 
void AddRLF (Int_t channel)
 
void AddHFO (Int_t channel)
 
void AddOFO (Int_t channel)
 
void AddFDF (Int_t channel)
 
void AddS30 (Int_t channel)
 
UInt_t GetSEU (Int_t channel) const
 
UInt_t GetSYN (Int_t channel) const
 
UInt_t GetEMM (Int_t channel) const
 
UInt_t GetTFO (Int_t channel) const
 
UInt_t GetRLF (Int_t channel) const
 
UInt_t GetHFO (Int_t channel) const
 
UInt_t GetOFO (Int_t channel) const
 
UInt_t GetFDF (Int_t channel) const
 
UInt_t GetS30 (Int_t channel) const
 
UInt_t GetTotalSEU ()
 
UInt_t GetTotalSYN ()
 
UInt_t GetTotalEMM ()
 
UInt_t GetTotalTFO ()
 
UInt_t GetTotalRLF ()
 
UInt_t GetTotalHFO ()
 
UInt_t GetTotalOFO ()
 
UInt_t GetTotalFDF ()
 
UInt_t GetTotalS30 ()
 
UInt_t GetTotalRFM ()
 
void ResetCounters ()
 
Double_t ReferenceSignalCorrection (Double_t raw_time, Double_t ref_time)
 

Data Fields

Int_t fROC
 
Int_t fSlot
 
Int_t fChannelNumber
 
UInt_t * fBuffer
 
UInt_t fF1TDC_refcnt
 
UInt_t fF1TDC_hsdiv
 
UInt_t fF1TDC_refclkdiv
 
UInt_t fF1TDC_trigwin
 
UInt_t fF1TDC_triglat
 
Double_t fF1TDC_tframe_ns
 
Double_t fF1TDC_full_range_ns
 
Double_t fF1TDC_window_ns
 
Double_t fF1TDC_latency_ns
 
Double_t fF1TDC_resolution_ns
 
Double_t fF1TDC_t_offset
 
Double_t fF1TDC_trig_resolution_ns
 
Double_t fF1TDC_trig_t_offset
 
Double_t fF1TDCFactor
 
UInt_t * fF1TDC_SEU_counter
 
UInt_t * fF1TDC_EMM_counter
 
UInt_t * fF1TDC_SYN_counter
 
UInt_t * fF1TDC_TFO_counter
 
UInt_t * fF1TDC_RLF_counter
 
UInt_t * fF1TDC_HFO_counter
 
UInt_t * fF1TDC_OFO_counter
 
UInt_t * fF1TDC_FDF_counter
 
UInt_t * fF1TDC_S30_counter
 
Bool_t fReferenceSlotFlag
 
TArrayD * fReferenceSignals
 
Bool_t fF1TDCNormResFlag
 
Bool_t fF1TDCSyncFlag
 
Int_t fF1TDCIndex
 
Int_t fF1BankIndex
 

Private Member Functions

UInt_t GetTotal (UInt_t *error_counter)
 
 ClassDef (QwF1TDC, 1)
 

Private Attributes

TString fSystemName
 
UInt_t fF1TDC_RFM_counter
 

Static Private Attributes

static const Int_t fWordsPerBuffer = 16
 
static const Int_t fMaxF1TDCChannelNumber = 64
 

Friends

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

Detailed Description

one F1TDC configuration and reference signal(s) holder

Definition at line 47 of file QwF1TDContainer.h.

Constructor & Destructor Documentation

QwF1TDC::QwF1TDC ( )

Definition at line 87 of file QwF1TDContainer.cc.

References fBuffer, fChannelNumber, fF1BankIndex, fF1TDC_EMM_counter, fF1TDC_FDF_counter, fF1TDC_full_range_ns, fF1TDC_HFO_counter, fF1TDC_hsdiv, fF1TDC_latency_ns, fF1TDC_OFO_counter, fF1TDC_refclkdiv, fF1TDC_refcnt, fF1TDC_resolution_ns, fF1TDC_RFM_counter, fF1TDC_RLF_counter, fF1TDC_S30_counter, fF1TDC_SEU_counter, fF1TDC_SYN_counter, fF1TDC_t_offset, fF1TDC_TFO_counter, fF1TDC_tframe_ns, fF1TDC_triglat, fF1TDC_trigwin, fF1TDC_window_ns, fF1TDCFactor, fF1TDCIndex, fF1TDCNormResFlag, fF1TDCSyncFlag, fMaxF1TDCChannelNumber, fReferenceSignals, fReferenceSlotFlag, fROC, fSlot, fWordsPerBuffer, and ResetCounters().

88 {
89  fROC = -1;
90  fSlot = -1;
91 
92  fChannelNumber = 0;
93 
94  fF1TDC_refcnt = 0;
95  fF1TDC_hsdiv = 0;
96  fF1TDC_refclkdiv = 0;
97  fF1TDC_trigwin = 0;
98  fF1TDC_triglat = 0;
99 
100  fF1TDC_tframe_ns = 0.0;
101  fF1TDC_full_range_ns = 0.0;
102  fF1TDC_window_ns = 0.0;
103  fF1TDC_latency_ns = 0.0;
104  fF1TDC_resolution_ns = 0.0;
105 
106  fF1TDC_t_offset = 0.0;
107 
112 
116 
119 
120  fF1TDC_RFM_counter = 0;
121 
122  fReferenceSignals = NULL;
123 
124  fReferenceSlotFlag = false;
125  fF1TDCNormResFlag = true;
126  fF1TDCSyncFlag = true;
127 
128  fF1TDCFactor = 0.0;
129 
130  fF1TDCIndex = -1;
131  fF1BankIndex = -1;
132 
133  fBuffer = new UInt_t[fWordsPerBuffer];
134 
135  ResetCounters();
136 }
Double_t fF1TDC_resolution_ns
UInt_t * fF1TDC_SYN_counter
Double_t fF1TDC_full_range_ns
Double_t fF1TDC_t_offset
TArrayD * fReferenceSignals
Bool_t fReferenceSlotFlag
UInt_t fF1TDC_RFM_counter
static const Int_t fMaxF1TDCChannelNumber
UInt_t fF1TDC_refcnt
Double_t fF1TDC_latency_ns
Bool_t fF1TDCSyncFlag
UInt_t * fF1TDC_FDF_counter
UInt_t fF1TDC_trigwin
UInt_t * fF1TDC_SEU_counter
UInt_t * fF1TDC_TFO_counter
UInt_t fF1TDC_refclkdiv
UInt_t fF1TDC_triglat
UInt_t * fBuffer
UInt_t fF1TDC_hsdiv
Bool_t fF1TDCNormResFlag
UInt_t * fF1TDC_OFO_counter
Int_t fChannelNumber
Int_t fF1BankIndex
UInt_t * fF1TDC_HFO_counter
UInt_t * fF1TDC_S30_counter
static const Int_t fWordsPerBuffer
Double_t fF1TDCFactor
Double_t fF1TDC_tframe_ns
Int_t fF1TDCIndex
Double_t fF1TDC_window_ns
UInt_t * fF1TDC_RLF_counter
UInt_t * fF1TDC_EMM_counter
void ResetCounters()

+ Here is the call graph for this function:

QwF1TDC::QwF1TDC ( const Int_t  roc,
const Int_t  slot 
)

Definition at line 140 of file QwF1TDContainer.cc.

References fBuffer, fChannelNumber, fF1BankIndex, fF1TDC_EMM_counter, fF1TDC_FDF_counter, fF1TDC_full_range_ns, fF1TDC_HFO_counter, fF1TDC_hsdiv, fF1TDC_latency_ns, fF1TDC_OFO_counter, fF1TDC_refclkdiv, fF1TDC_refcnt, fF1TDC_resolution_ns, fF1TDC_RFM_counter, fF1TDC_RLF_counter, fF1TDC_S30_counter, fF1TDC_SEU_counter, fF1TDC_SYN_counter, fF1TDC_t_offset, fF1TDC_TFO_counter, fF1TDC_tframe_ns, fF1TDC_triglat, fF1TDC_trigwin, fF1TDC_window_ns, fF1TDCFactor, fF1TDCIndex, fF1TDCNormResFlag, fF1TDCSyncFlag, fMaxF1TDCChannelNumber, fReferenceSignals, fReferenceSlotFlag, fROC, fSlot, fWordsPerBuffer, and ResetCounters().

141 {
142  fROC = roc;
143  // fROCIndex = -1;
144  fSlot = slot;
145 
146  fChannelNumber = 0;
147 
148  fF1TDC_refcnt = 0;
149  fF1TDC_hsdiv = 0;
150  fF1TDC_refclkdiv = 0;
151  fF1TDC_trigwin = 0;
152  fF1TDC_triglat = 0;
153 
154  fF1TDC_tframe_ns = 0.0;
155  fF1TDC_full_range_ns = 0.0;
156  fF1TDC_window_ns = 0.0;
157  fF1TDC_latency_ns = 0.0;
158  fF1TDC_resolution_ns = 0.0;
159 
160  fF1TDC_t_offset = 0.0;
161 
166 
170 
173 
174  fF1TDC_RFM_counter = 0;
175 
176  fReferenceSignals = NULL;
177 
178  fReferenceSlotFlag = false;
179  fF1TDCNormResFlag = true;
180  fF1TDCSyncFlag = true;
181 
182  fF1TDCFactor = 0.0;
183 
184  fF1TDCIndex = -1;
185  fF1BankIndex = -1;
186 
187  fBuffer = new UInt_t[fWordsPerBuffer];
188 
189  ResetCounters();
190 }
Double_t fF1TDC_resolution_ns
UInt_t * fF1TDC_SYN_counter
Double_t fF1TDC_full_range_ns
Double_t fF1TDC_t_offset
TArrayD * fReferenceSignals
Bool_t fReferenceSlotFlag
UInt_t fF1TDC_RFM_counter
static const Int_t fMaxF1TDCChannelNumber
UInt_t fF1TDC_refcnt
Double_t fF1TDC_latency_ns
Bool_t fF1TDCSyncFlag
UInt_t * fF1TDC_FDF_counter
UInt_t fF1TDC_trigwin
UInt_t * fF1TDC_SEU_counter
UInt_t * fF1TDC_TFO_counter
UInt_t fF1TDC_refclkdiv
UInt_t fF1TDC_triglat
UInt_t * fBuffer
UInt_t fF1TDC_hsdiv
Bool_t fF1TDCNormResFlag
UInt_t * fF1TDC_OFO_counter
Int_t fChannelNumber
Int_t fF1BankIndex
UInt_t * fF1TDC_HFO_counter
UInt_t * fF1TDC_S30_counter
static const Int_t fWordsPerBuffer
Double_t fF1TDCFactor
Double_t fF1TDC_tframe_ns
Int_t fF1TDCIndex
Double_t fF1TDC_window_ns
UInt_t * fF1TDC_RLF_counter
UInt_t * fF1TDC_EMM_counter
void ResetCounters()

+ Here is the call graph for this function:

QwF1TDC::~QwF1TDC ( )
virtual

Definition at line 193 of file QwF1TDContainer.cc.

References fBuffer, fF1TDC_EMM_counter, fF1TDC_FDF_counter, fF1TDC_HFO_counter, fF1TDC_OFO_counter, fF1TDC_RLF_counter, fF1TDC_S30_counter, fF1TDC_SEU_counter, fF1TDC_SYN_counter, fF1TDC_TFO_counter, and fReferenceSignals.

194 {
195  delete [] fBuffer;
196  delete [] fReferenceSignals;
197  //delete [] fF1TDCReferenceChannels;
198  delete [] fF1TDC_SEU_counter;
199  delete [] fF1TDC_EMM_counter;
200  delete [] fF1TDC_SYN_counter;
201  delete [] fF1TDC_TFO_counter;
202 
203  delete [] fF1TDC_RLF_counter;
204  delete [] fF1TDC_HFO_counter;
205  delete [] fF1TDC_OFO_counter;
206 
207  delete [] fF1TDC_FDF_counter;
208  delete [] fF1TDC_S30_counter;
209 
210 }
UInt_t * fF1TDC_SYN_counter
TArrayD * fReferenceSignals
UInt_t * fF1TDC_FDF_counter
UInt_t * fF1TDC_SEU_counter
UInt_t * fF1TDC_TFO_counter
UInt_t * fBuffer
UInt_t * fF1TDC_OFO_counter
UInt_t * fF1TDC_HFO_counter
UInt_t * fF1TDC_S30_counter
UInt_t * fF1TDC_RLF_counter
UInt_t * fF1TDC_EMM_counter

Member Function Documentation

void QwF1TDC::AddEMM ( Int_t  channel)
inline

Definition at line 113 of file QwF1TDContainer.h.

References fF1TDC_EMM_counter.

Referenced by QwF1TDContainer::AddEMM().

113 {fF1TDC_EMM_counter[channel]++;};
UInt_t * fF1TDC_EMM_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddFDF ( Int_t  channel)
inline

Definition at line 118 of file QwF1TDContainer.h.

References fF1TDC_FDF_counter.

Referenced by QwF1TDContainer::AddFDF().

118 {fF1TDC_FDF_counter[channel]++;};
UInt_t * fF1TDC_FDF_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddHFO ( Int_t  channel)
inline

Definition at line 116 of file QwF1TDContainer.h.

References fF1TDC_HFO_counter.

Referenced by QwF1TDContainer::AddHFO().

116 {fF1TDC_HFO_counter[channel]++;};
UInt_t * fF1TDC_HFO_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddOFO ( Int_t  channel)
inline

Definition at line 117 of file QwF1TDContainer.h.

References fF1TDC_OFO_counter.

Referenced by QwF1TDContainer::AddOFO().

117 {fF1TDC_OFO_counter[channel]++;};
UInt_t * fF1TDC_OFO_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddRLF ( Int_t  channel)
inline

Definition at line 115 of file QwF1TDContainer.h.

References fF1TDC_RLF_counter.

Referenced by QwF1TDContainer::AddRLF().

115 {fF1TDC_RLF_counter[channel]++;};
UInt_t * fF1TDC_RLF_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddS30 ( Int_t  channel)
inline

Definition at line 119 of file QwF1TDContainer.h.

References fF1TDC_S30_counter.

Referenced by QwF1TDContainer::AddS30().

119 {fF1TDC_S30_counter[channel]++;};
UInt_t * fF1TDC_S30_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddSEU ( Int_t  channel)
inline

Definition at line 111 of file QwF1TDContainer.h.

References fF1TDC_SEU_counter.

Referenced by QwF1TDContainer::AddSEU().

111 {fF1TDC_SEU_counter[channel]++;};
UInt_t * fF1TDC_SEU_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddSYN ( Int_t  channel)
inline

Definition at line 112 of file QwF1TDContainer.h.

References fF1TDC_SYN_counter.

Referenced by QwF1TDContainer::AddSYN().

112 {fF1TDC_SYN_counter[channel]++;};
UInt_t * fF1TDC_SYN_counter

+ Here is the caller graph for this function:

void QwF1TDC::AddTFO ( Int_t  channel)
inline

Definition at line 114 of file QwF1TDContainer.h.

References fF1TDC_TFO_counter.

Referenced by QwF1TDContainer::AddTFO().

114 {fF1TDC_TFO_counter[channel]++;};
UInt_t * fF1TDC_TFO_counter

+ Here is the caller graph for this function:

QwF1TDC::ClassDef ( QwF1TDC  ,
 
)
private
TString QwF1TDC::GetChannelErrorCounter ( Int_t  channel)

Definition at line 617 of file QwF1TDContainer.cc.

References fF1TDCIndex, fROC, fSlot, GetEMM(), GetFDF(), GetHFO(), GetOFO(), GetRLF(), GetSEU(), GetSYN(), GetTFO(), and GetTotalRFM().

Referenced by GetErrorCounter().

618 {
619  TString error_counter;
620  error_counter = Form("Error Counter F1TDC ROC%2d", fROC);
621  error_counter += Form(" Slot%2d", fSlot);
622  error_counter += Form(" Index%2d", fF1TDCIndex);
623  error_counter += " OFO : ";
624  error_counter += this->GetOFO(channel);
625  error_counter += " RLF : ";
626  error_counter += this->GetRLF(channel);
627  error_counter += " TFO : ";
628  error_counter += this->GetTFO(channel);
629  error_counter += " EMM : ";
630  error_counter += this->GetEMM(channel);
631  error_counter += " SEU : ";
632  error_counter += this->GetSEU(channel);
633  error_counter += " FDC : " ;
634  error_counter += this->GetFDF(channel);
635  error_counter += " SYN : ";
636  error_counter += this->GetSYN(channel);
637  error_counter += " RFM : ";
638  error_counter += this->GetTotalRFM();
639  error_counter += " HFO : ";
640  error_counter += this->GetHFO(channel);
641  // error_counter += " S30 : ";
642  // error_counter += this->GetS30(channel);
643 
644  return error_counter;
645 }
UInt_t GetFDF(Int_t channel) const
UInt_t GetHFO(Int_t channel) const
UInt_t GetTFO(Int_t channel) const
UInt_t GetSEU(Int_t channel) const
UInt_t GetRLF(Int_t channel) const
UInt_t GetSYN(Int_t channel) const
UInt_t GetEMM(Int_t channel) const
UInt_t GetOFO(Int_t channel) const
Int_t fF1TDCIndex
UInt_t GetTotalRFM()

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t QwF1TDC::GetChannelNumber ( ) const
inline

Definition at line 58 of file QwF1TDContainer.h.

References fChannelNumber.

Referenced by QwF1TDContainer::GetF1TDCChannelNumber().

58 {return fChannelNumber;};
Int_t fChannelNumber

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetEMM ( Int_t  channel) const
inline

Definition at line 124 of file QwF1TDContainer.h.

References fF1TDC_EMM_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

124 {return fF1TDC_EMM_counter[channel];};
UInt_t * fF1TDC_EMM_counter

+ Here is the caller graph for this function:

TString QwF1TDC::GetErrorCounter ( )

Definition at line 650 of file QwF1TDContainer.cc.

References fF1TDCIndex, fMaxF1TDCChannelNumber, fROC, fSlot, and GetChannelErrorCounter().

Referenced by QwF1TDContainer::GetErrorSummary().

651 {
652  TString error_counter;
653 
654  error_counter = Form("Error Counter F1TDC ROC%2d", fROC);
655  error_counter += Form(" Slot%2d", fSlot);
656  error_counter += Form(" Index%2d", fF1TDCIndex);
657  Int_t i = 0;
658 
659  for(i=0; i<fMaxF1TDCChannelNumber; i++)
660  {
661  error_counter += GetChannelErrorCounter(i);
662  }
663  return error_counter;
664 }
static const Int_t fMaxF1TDCChannelNumber
TString GetChannelErrorCounter(Int_t channel)
Int_t fF1TDCIndex

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t QwF1TDC::GetF1BankIndex ( ) const
inline

Definition at line 83 of file QwF1TDContainer.h.

References fF1BankIndex.

Referenced by QwF1TDContainer::GetF1TDCwithBankIndexSLOT().

83 {return fF1BankIndex;};
Int_t fF1BankIndex

+ Here is the caller graph for this function:

const TString QwF1TDC::GetF1SystemName ( ) const
inline

Definition at line 84 of file QwF1TDContainer.h.

References fSystemName.

Referenced by PrintChannelErrorCounter(), PrintContact(), PrintErrorCounter(), PrintF1TDCConfigure(), and PrintTotalErrorCounter().

84 {return fSystemName;};
TString fSystemName

+ Here is the caller graph for this function:

Double_t QwF1TDC::GetF1TDC_bin_size ( ) const
inline

Definition at line 75 of file QwF1TDContainer.h.

References fF1TDC_resolution_ns.

75 {return fF1TDC_resolution_ns;};
Double_t fF1TDC_resolution_ns
Double_t QwF1TDC::GetF1TDC_full_range ( ) const
inline

Definition at line 71 of file QwF1TDContainer.h.

References fF1TDC_full_range_ns.

71 {return fF1TDC_full_range_ns;};
Double_t fF1TDC_full_range_ns
UInt_t QwF1TDC::GetF1TDC_hsdiv ( ) const
inline

Definition at line 65 of file QwF1TDContainer.h.

References fF1TDC_hsdiv.

65 {return fF1TDC_hsdiv;};
UInt_t fF1TDC_hsdiv
Double_t QwF1TDC::GetF1TDC_latency ( ) const
inline

Definition at line 73 of file QwF1TDContainer.h.

References fF1TDC_latency_ns.

73 {return fF1TDC_latency_ns;};
Double_t fF1TDC_latency_ns
UInt_t QwF1TDC::GetF1TDC_refclkdiv ( ) const
inline

Definition at line 66 of file QwF1TDContainer.h.

References fF1TDC_refclkdiv.

66 {return fF1TDC_refclkdiv;};
UInt_t fF1TDC_refclkdiv
UInt_t QwF1TDC::GetF1TDC_refcnt ( ) const
inline

Definition at line 64 of file QwF1TDContainer.h.

References fF1TDC_refcnt.

64 {return fF1TDC_refcnt;};
UInt_t fF1TDC_refcnt
Double_t QwF1TDC::GetF1TDC_resolution ( ) const
inline

Definition at line 74 of file QwF1TDContainer.h.

References fF1TDC_resolution_ns.

Referenced by QwF1TDContainer::GetF1TDCsResolution().

74 {return fF1TDC_resolution_ns;};
Double_t fF1TDC_resolution_ns

+ Here is the caller graph for this function:

Double_t QwF1TDC::GetF1TDC_t_offset ( ) const
inline

Definition at line 77 of file QwF1TDContainer.h.

References fF1TDC_t_offset.

77 {return fF1TDC_t_offset;};
Double_t fF1TDC_t_offset
Double_t QwF1TDC::GetF1TDC_tframe ( ) const
inline

Definition at line 70 of file QwF1TDContainer.h.

References fF1TDC_tframe_ns.

70 {return fF1TDC_tframe_ns;};
Double_t fF1TDC_tframe_ns
Double_t QwF1TDC::GetF1TDC_trig_resolution ( ) const
inline

Definition at line 80 of file QwF1TDContainer.h.

References fF1TDC_trig_resolution_ns.

Double_t fF1TDC_trig_resolution_ns
Double_t QwF1TDC::GetF1TDC_trig_t_offset ( ) const
inline

Definition at line 79 of file QwF1TDContainer.h.

References fF1TDC_trig_t_offset.

Referenced by QwF1TDContainer::GetF1TDCTriggerRollover().

79 {return fF1TDC_trig_t_offset;};
Double_t fF1TDC_trig_t_offset

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetF1TDC_triglat ( ) const
inline

Definition at line 68 of file QwF1TDContainer.h.

References fF1TDC_triglat.

68 {return fF1TDC_triglat;};
UInt_t fF1TDC_triglat
UInt_t QwF1TDC::GetF1TDC_trigwin ( ) const
inline

Definition at line 67 of file QwF1TDContainer.h.

References fF1TDC_trigwin.

67 {return fF1TDC_trigwin;};
UInt_t fF1TDC_trigwin
Double_t QwF1TDC::GetF1TDC_window ( ) const
inline

Definition at line 72 of file QwF1TDContainer.h.

References fF1TDC_window_ns.

72 {return fF1TDC_window_ns;};
Double_t fF1TDC_window_ns
const UInt_t* QwF1TDC::GetF1TDCBuffer ( ) const
inline

Definition at line 96 of file QwF1TDContainer.h.

References fBuffer.

96 {return fBuffer;};
UInt_t * fBuffer
Int_t QwF1TDC::GetF1TDCIndex ( ) const
inline

Definition at line 82 of file QwF1TDContainer.h.

References fF1TDCIndex.

Referenced by QwF1TDContainer::GetF1TDCwithIndex().

82 {return fF1TDCIndex;};
Int_t fF1TDCIndex

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetFDF ( Int_t  channel) const
inline

Definition at line 131 of file QwF1TDContainer.h.

References fF1TDC_FDF_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

131 {return fF1TDC_FDF_counter[channel];};
UInt_t * fF1TDC_FDF_counter

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetHFO ( Int_t  channel) const
inline

Definition at line 128 of file QwF1TDContainer.h.

References fF1TDC_HFO_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

128 {return fF1TDC_HFO_counter[channel];}; // Hit Fifo Overflow counter
UInt_t * fF1TDC_HFO_counter

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetOFO ( Int_t  channel) const
inline

Definition at line 129 of file QwF1TDContainer.h.

References fF1TDC_OFO_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

129 {return fF1TDC_OFO_counter[channel];}; // Output Fifo Overflow coutner;
UInt_t * fF1TDC_OFO_counter

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetRLF ( Int_t  channel) const
inline

Definition at line 127 of file QwF1TDContainer.h.

References fF1TDC_RLF_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

127 {return fF1TDC_RLF_counter[channel];}; // Resolution Lock Fail couter
UInt_t * fF1TDC_RLF_counter

+ Here is the caller graph for this function:

Int_t QwF1TDC::GetROCNumber ( ) const
inline

Definition at line 56 of file QwF1TDContainer.h.

References fROC.

Referenced by QwF1TDContainer::GetF1TDC(), PrintContact(), and PrintF1TDCConfigure().

56 {return fROC;};

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetS30 ( Int_t  channel) const
inline

Definition at line 132 of file QwF1TDContainer.h.

References fF1TDC_S30_counter.

132 {return fF1TDC_S30_counter[channel];};
UInt_t * fF1TDC_S30_counter
UInt_t QwF1TDC::GetSEU ( Int_t  channel) const
inline

Definition at line 122 of file QwF1TDContainer.h.

References fF1TDC_SEU_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

122 {return fF1TDC_SEU_counter[channel];};
UInt_t * fF1TDC_SEU_counter

+ Here is the caller graph for this function:

Int_t QwF1TDC::GetSlotNumber ( ) const
inline

Definition at line 57 of file QwF1TDContainer.h.

References fSlot.

Referenced by QwF1TDContainer::GetF1TDC(), QwF1TDContainer::GetF1TDCwithBankIndexSLOT(), PrintContact(), and PrintF1TDCConfigure().

57 {return fSlot;};

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetSYN ( Int_t  channel) const
inline

Definition at line 123 of file QwF1TDContainer.h.

References fF1TDC_SYN_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

123 {return fF1TDC_SYN_counter[channel];};
UInt_t * fF1TDC_SYN_counter

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTFO ( Int_t  channel) const
inline

Definition at line 125 of file QwF1TDContainer.h.

References fF1TDC_TFO_counter.

Referenced by GetChannelErrorCounter(), and PrintChannelErrorCounter().

125 {return fF1TDC_TFO_counter[channel];};
UInt_t * fF1TDC_TFO_counter

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotal ( UInt_t *  error_counter)
private

Definition at line 482 of file QwF1TDContainer.cc.

References fMaxF1TDCChannelNumber.

Referenced by GetTotalEMM(), GetTotalFDF(), GetTotalHFO(), GetTotalOFO(), GetTotalRLF(), GetTotalS30(), GetTotalSEU(), GetTotalSYN(), and GetTotalTFO().

483 {
484  UInt_t error = 0;
485  Int_t i = 0;
486 
487  for(i=0; i<fMaxF1TDCChannelNumber; i++)
488  {
489  error += error_counter[i];
490  }
491  return error;
492 }
static const Int_t fMaxF1TDCChannelNumber

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalEMM ( )

Definition at line 507 of file QwF1TDContainer.cc.

References fF1TDC_EMM_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

508 {
510 }
UInt_t GetTotal(UInt_t *error_counter)
UInt_t * fF1TDC_EMM_counter

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TString QwF1TDC::GetTotalErrorCounter ( )

Definition at line 668 of file QwF1TDContainer.cc.

References fF1TDCIndex, fROC, fSlot, GetTotalEMM(), GetTotalFDF(), GetTotalHFO(), GetTotalOFO(), GetTotalRLF(), GetTotalSEU(), GetTotalSYN(), and GetTotalTFO().

669 {
670  TString error_counter;
671 
672  error_counter = Form("Error Counter F1TDC ROC%2d", fROC);
673  error_counter += Form(" Slot%2d", fSlot);
674  error_counter += Form(" Index%2d", fF1TDCIndex);
675  error_counter += " OFO : ";
676  error_counter += this->GetTotalOFO();
677  error_counter += " RLF : ";
678  error_counter += this->GetTotalRLF();
679  error_counter += " TFO : ";
680  error_counter += this->GetTotalTFO();
681  error_counter += " EMM : ";
682  error_counter += this->GetTotalEMM();
683  error_counter += " SEU : ";
684  error_counter += this->GetTotalSEU();
685  error_counter += " FDC : " ;
686  error_counter += this->GetTotalFDF();
687  error_counter += " SYN : ";
688  error_counter += this->GetTotalSYN();
689  error_counter += " HFO : ";
690  error_counter += this->GetTotalHFO();
691  // error_counter += " S30 : ";
692  // error_counter += this->GetTotalS30();
693  return error_counter;
694 }
UInt_t GetTotalFDF()
UInt_t GetTotalRLF()
UInt_t GetTotalEMM()
UInt_t GetTotalHFO()
UInt_t GetTotalSEU()
UInt_t GetTotalOFO()
UInt_t GetTotalSYN()
UInt_t GetTotalTFO()
Int_t fF1TDCIndex

+ Here is the call graph for this function:

UInt_t QwF1TDC::GetTotalFDF ( )

Definition at line 537 of file QwF1TDContainer.cc.

References fF1TDC_FDF_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

538 {
540 }
UInt_t * fF1TDC_FDF_counter
UInt_t GetTotal(UInt_t *error_counter)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalHFO ( )

Definition at line 525 of file QwF1TDContainer.cc.

References fF1TDC_HFO_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

526 {
528 }
UInt_t * fF1TDC_HFO_counter
UInt_t GetTotal(UInt_t *error_counter)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalOFO ( )

Definition at line 531 of file QwF1TDContainer.cc.

References fF1TDC_OFO_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

532 {
534 }
UInt_t * fF1TDC_OFO_counter
UInt_t GetTotal(UInt_t *error_counter)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalRFM ( )
inline

Definition at line 146 of file QwF1TDContainer.h.

References fF1TDC_RFM_counter.

Referenced by GetChannelErrorCounter(), and PrintTotalErrorCounter().

146 {return fF1TDC_RFM_counter;};
UInt_t fF1TDC_RFM_counter

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalRLF ( )

Definition at line 519 of file QwF1TDContainer.cc.

References fF1TDC_RLF_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

520 {
522 }
UInt_t GetTotal(UInt_t *error_counter)
UInt_t * fF1TDC_RLF_counter

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalS30 ( )

Definition at line 543 of file QwF1TDContainer.cc.

References fF1TDC_S30_counter, and GetTotal().

544 {
546 }
UInt_t * fF1TDC_S30_counter
UInt_t GetTotal(UInt_t *error_counter)

+ Here is the call graph for this function:

UInt_t QwF1TDC::GetTotalSEU ( )

Definition at line 495 of file QwF1TDContainer.cc.

References fF1TDC_SEU_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

496 {
498 }
UInt_t * fF1TDC_SEU_counter
UInt_t GetTotal(UInt_t *error_counter)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalSYN ( )

Definition at line 501 of file QwF1TDContainer.cc.

References fF1TDC_SYN_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

502 {
504 }
UInt_t * fF1TDC_SYN_counter
UInt_t GetTotal(UInt_t *error_counter)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t QwF1TDC::GetTotalTFO ( )

Definition at line 513 of file QwF1TDContainer.cc.

References fF1TDC_TFO_counter, and GetTotal().

Referenced by GetTotalErrorCounter(), and PrintTotalErrorCounter().

514 {
516 }
UInt_t * fF1TDC_TFO_counter
UInt_t GetTotal(UInt_t *error_counter)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool_t QwF1TDC::IsNormResolution ( ) const
inline

Definition at line 61 of file QwF1TDContainer.h.

References fF1TDCNormResFlag.

Referenced by PrintF1TDCConfigure().

61 {return fF1TDCNormResFlag;};
Bool_t fF1TDCNormResFlag

+ Here is the caller graph for this function:

Bool_t QwF1TDC::IsReferenceSlot ( ) const
inline

Definition at line 60 of file QwF1TDContainer.h.

References fReferenceSlotFlag.

60 {return fReferenceSlotFlag;};
Bool_t fReferenceSlotFlag
Bool_t QwF1TDC::IsSyncMode ( ) const
inline

Definition at line 62 of file QwF1TDContainer.h.

References fF1TDCSyncFlag.

Referenced by PrintF1TDCConfigure().

62 {return fF1TDCSyncFlag;};
Bool_t fF1TDCSyncFlag

+ Here is the caller graph for this function:

void QwF1TDC::PrintChannelErrorCounter ( Int_t  channel)

Definition at line 550 of file QwF1TDContainer.cc.

References QwLog::endl(), GetEMM(), GetF1SystemName(), GetFDF(), GetHFO(), GetOFO(), GetRLF(), GetSEU(), GetSYN(), GetTFO(), and QwMessage.

Referenced by QwF1TDContainer::AddEMM(), QwF1TDContainer::AddFDF(), QwF1TDContainer::AddHFO(), QwF1TDContainer::AddOFO(), QwF1TDContainer::AddRLF(), QwF1TDContainer::AddS30(), QwF1TDContainer::AddSEU(), QwF1TDContainer::AddSYN(), QwF1TDContainer::AddTFO(), and PrintErrorCounter().

551 {
552  TString system_name = this->GetF1SystemName();
553  if(system_name.Contains("R2") || system_name.Contains("R3")){
554  QwMessage << "System " << std::setw(4) << system_name
555  << " QwF1TDC obj at " << this
556  << *this
557  << " CH " << std::setw(2) << channel
558  << " OFO " << this->GetOFO(channel)
559  << " RLF " << this->GetRLF(channel)
560  << " TFO " << this->GetTFO(channel)
561  << " EMM " << this->GetEMM(channel)
562  << " SEU " << this->GetSEU(channel)
563  << " FDF " << this->GetFDF(channel)
564  << " SYN " << this->GetSYN(channel)
565  << " HFO " << this->GetHFO(channel)
566  // << " S30 " << this->GetS30(channel)
567  << QwLog::endl;
568  }
569  return;
570 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
UInt_t GetFDF(Int_t channel) const
UInt_t GetHFO(Int_t channel) const
const TString GetF1SystemName() const
UInt_t GetTFO(Int_t channel) const
UInt_t GetSEU(Int_t channel) const
UInt_t GetRLF(Int_t channel) const
UInt_t GetSYN(Int_t channel) const
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
UInt_t GetEMM(Int_t channel) const
UInt_t GetOFO(Int_t channel) const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwF1TDC::PrintContact ( )

Definition at line 698 of file QwF1TDContainer.cc.

References GetF1SystemName(), GetROCNumber(), and GetSlotNumber().

Referenced by QwF1TDContainer::GetF1TDCChannelNumber(), QwF1TDContainer::GetF1TDCsResolution(), and QwF1TDContainer::GetF1TDCTriggerRollover().

699 {
700  printf("-------------------------------------------------------------------------------- \n");
701  printf("%s : Roc%2d, slot%d is trouble now, please contact jhlee or rakithab immediately\n",
703  printf("-------------------------------------------------------------------------------- \n");
704  return;
705 }
Int_t GetROCNumber() const
const TString GetF1SystemName() const
Int_t GetSlotNumber() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwF1TDC::PrintErrorCounter ( )

Definition at line 575 of file QwF1TDContainer.cc.

References QwLog::endl(), fMaxF1TDCChannelNumber, GetF1SystemName(), PrintChannelErrorCounter(), and QwVerbose.

576 {
577  QwVerbose << "System " << this->GetF1SystemName()
578  << " QwF1TDC object at " << this
579  << *this
580  << " " << QwLog::endl;
581 
582  Int_t i = 0;
583 
584  for(i=0; i<fMaxF1TDCChannelNumber; i++)
585  {
587  }
588  return;
589 }
static const Int_t fMaxF1TDCChannelNumber
#define QwVerbose
Predefined log drain for verbose messages.
Definition: QwLog.h:55
const TString GetF1SystemName() const
void PrintChannelErrorCounter(Int_t channel)
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299

+ Here is the call graph for this function:

void QwF1TDC::PrintF1TDCBuffer ( )

Definition at line 408 of file QwF1TDContainer.cc.

References fBuffer, fF1BankIndex, fF1TDCIndex, fROC, fSlot, fSystemName, and fWordsPerBuffer.

409 {
410  Int_t i = 0;
411 
412  printf("System %s F1TDC ROC %2d, Slot %2d TDC id %2d Bank id %2d\n",
414  for(i=0; i<fWordsPerBuffer; i++) {
415  printf("0x%x ", fBuffer[i]);
416  }
417  printf("\n");
418 
419  return;
420 }
TString fSystemName
UInt_t * fBuffer
Int_t fF1BankIndex
static const Int_t fWordsPerBuffer
Int_t fF1TDCIndex
void QwF1TDC::PrintF1TDCConfigure ( )

Definition at line 424 of file QwF1TDContainer.cc.

References fChannelNumber, fF1TDC_full_range_ns, fF1TDC_hsdiv, fF1TDC_latency_ns, fF1TDC_refclkdiv, fF1TDC_refcnt, fF1TDC_resolution_ns, fF1TDC_t_offset, fF1TDC_tframe_ns, fF1TDC_trig_resolution_ns, fF1TDC_trig_t_offset, fF1TDC_triglat, fF1TDC_trigwin, fF1TDC_window_ns, GetF1SystemName(), GetROCNumber(), GetSlotNumber(), IsNormResolution(), and IsSyncMode().

Referenced by QwF1TDContainer::GetF1TDCChannelNumber(), QwF1TDContainer::GetF1TDCsResolution(), and QwF1TDContainer::GetF1TDCTriggerRollover().

425 {
426 
427  printf("%s, ROC%2d slot%2d ", GetF1SystemName().Data(), GetROCNumber(), GetSlotNumber());
428  if(IsNormResolution()) printf("Normal Resolution mode ");
429  else printf("High Resolution mMode ");
430 
431  printf(" with the total channel number %d\n", fChannelNumber);
432 
433  if(IsSyncMode()) {
434  printf("Synchronous mode ");
435  printf(" with the rollover counter data %8.2f and trigger time %6.2f \n", fF1TDC_t_offset, fF1TDC_trig_t_offset);
436  }
437  else {
438  printf("Non Synchronouse mode \n");
439  printf(" with the full range %8.1f\n", fF1TDC_t_offset);
440  }
441 
442  printf("refcnt = %5d, tframe(ns) = %5.4f\n", fF1TDC_refcnt, fF1TDC_tframe_ns);
443  printf("refclkdiv = %5d, hsdiv = %6d, bin_size(ns) = %10.5f, full_range(ns) = %8.2f\n",
445  printf("trigwin = %5d, triglat = %6d, window (ns) = %10.5f, latency (ns) = %8.2f\n",
447  printf("trig_bin_size(ns) = %10.5f\n", fF1TDC_trig_resolution_ns);
448 
449  printf("\n");
450 
451  return;
452 }
Double_t fF1TDC_resolution_ns
Int_t GetROCNumber() const
Double_t fF1TDC_full_range_ns
Double_t fF1TDC_t_offset
Double_t fF1TDC_trig_resolution_ns
UInt_t fF1TDC_refcnt
Double_t fF1TDC_latency_ns
const TString GetF1SystemName() const
UInt_t fF1TDC_trigwin
Bool_t IsSyncMode() const
UInt_t fF1TDC_refclkdiv
UInt_t fF1TDC_triglat
Bool_t IsNormResolution() const
UInt_t fF1TDC_hsdiv
Int_t fChannelNumber
Double_t fF1TDC_trig_t_offset
Double_t fF1TDC_tframe_ns
Int_t GetSlotNumber() const
Double_t fF1TDC_window_ns

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwF1TDC::PrintTotalErrorCounter ( )

Definition at line 594 of file QwF1TDContainer.cc.

References QwLog::endl(), GetF1SystemName(), GetTotalEMM(), GetTotalFDF(), GetTotalHFO(), GetTotalOFO(), GetTotalRFM(), GetTotalRLF(), GetTotalSEU(), GetTotalSYN(), GetTotalTFO(), and QwMessage.

595 {
596  QwMessage << "System " << this->GetF1SystemName()
597  << " QwF1TDC object at " << this
598  << *this
599  << " "
600  << " OFO " << this->GetTotalOFO()
601  << " RLF " << this->GetTotalRLF()
602  << " TFO " << this->GetTotalTFO()
603  << " EMM " << this->GetTotalEMM()
604  << " SEU " << this->GetTotalSEU()
605  << " FDF " << this->GetTotalFDF()
606  << " SYN " << this->GetTotalSYN()
607  << " RFM " << this->GetTotalRFM()
608  << " HFO " << this->GetTotalHFO()
609  // << " S30 " << this->GetTotalS30()
610  << QwLog::endl;
611  return;
612 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
UInt_t GetTotalFDF()
UInt_t GetTotalRLF()
UInt_t GetTotalEMM()
const TString GetF1SystemName() const
UInt_t GetTotalHFO()
UInt_t GetTotalSEU()
UInt_t GetTotalOFO()
UInt_t GetTotalSYN()
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
UInt_t GetTotalTFO()
UInt_t GetTotalRFM()

+ Here is the call graph for this function:

Double_t QwF1TDC::ReferenceSignalCorrection ( Double_t  raw_time,
Double_t  ref_time 
)

Definition at line 306 of file QwF1TDContainer.cc.

References fF1TDC_RFM_counter, fF1TDC_t_offset, and fF1TDC_trigwin.

Referenced by QwF1TDContainer::ReferenceSignalCorrection().

307 {
308 
309 
310  Double_t actual_time_difference = 0.0;
311 
312 
313  // If we don't have the reference signal in the case that
314  // it is recorded as "0.0" or it isn't recorded at the same time when the raw_time is recoreded
315  // return zero corrected time, because without a reference time, raw_time has no meaning
316  // Friday, January 20 13:04:33 EST 2012 , jhlee
317 
318  if (ref_time !=0.0) {
319 
320  Double_t trigger_window = (Double_t) fF1TDC_trigwin;
321  Double_t time_offset = (Double_t) fF1TDC_t_offset; // effective total bin numbers
322  Double_t time_condition = 0.0;
323  Double_t local_time_difference = 0.0;
324 
325  local_time_difference = raw_time - ref_time;
326 
327  if(local_time_difference != 0.0) {
328 
329  time_condition = fabs(local_time_difference);
330  // maximum value is trigger_window -1,
331  if(time_condition < trigger_window) {
332  // there is no ROLLEVENT within trigger window
333  actual_time_difference = local_time_difference;
334  }
335  else {
336  // there is an ROLLOVER event within trigger window
337  if (local_time_difference > 0.0) {
338  // ref_time is in after ROLLOVER event
339  actual_time_difference = local_time_difference - time_offset;
340  }
341  else {
342  // we already excluded local_time_diffrence == 0 case.
343  // ref_time is in before ROLLOVER event
344  actual_time_difference = local_time_difference + time_offset;
345  }
346  }
347  }
348  else {
349  // raw_time is the same as ref_time
350  // std::cout << "QwF1TDC::ReferenceSignalCorrection "
351  // << local_time_difference
352  // << " ref " << ref_time
353  // << " raw " << raw_time
354  // << std::endl;
355  actual_time_difference = local_time_difference;
356  }
357 
358  }
359  else {
361  }
362  // Double_t trigger_window = (Double_t) fF1TDC_trigwin;
363  // Double_t time_offset = (Double_t) fF1TDC_t_offset;
364 
365 
366  // Double_t time_condition = 0.0;
367  // Double_t local_time_difference = 0.0;
368  // Double_t actual_time_difference = 0.0;
369 
370  // local_time_difference = raw_time - ref_time;
371 
372  // if(local_time_difference == 0.0) {
373  // // raw_time is the same as ref_time
374  // // std::cout << "QwF1TDC::ReferenceSignalCorrection "
375  // // << local_time_difference
376  // // << " ref " << ref_time
377  // // << " raw " << raw_time
378  // // << std::endl;
379  // actual_time_difference = local_time_difference;
380  // }
381  // else {
382  // time_condition = fabs(local_time_difference);
383  // // maximum value is trigger_window -1,
384  // if(time_condition < trigger_window) {
385  // // there is no ROLLEVENT within trigger window
386  // actual_time_difference = local_time_difference;
387  // }
388  // else {
389  // // there is an ROLLOVER event within trigger window
390  // if (local_time_difference > 0.0) {
391  // // ref_time is in after ROLLOVER event
392  // actual_time_difference = local_time_difference - time_offset;
393  // }
394  // else {
395  // // we already excluded local_time_diffrence == 0 case.
396  // // ref_time is in before ROLLOVER event
397  // actual_time_difference = local_time_difference + time_offset;
398  // }
399 
400  // }
401  // }
402  return actual_time_difference;
403 }
Double_t fF1TDC_t_offset
UInt_t fF1TDC_RFM_counter
UInt_t fF1TDC_trigwin

+ Here is the caller graph for this function:

void QwF1TDC::ResetCounters ( )

Definition at line 457 of file QwF1TDContainer.cc.

References fF1TDC_EMM_counter, fF1TDC_FDF_counter, fF1TDC_HFO_counter, fF1TDC_OFO_counter, fF1TDC_RFM_counter, fF1TDC_RLF_counter, fF1TDC_S30_counter, fF1TDC_SEU_counter, fF1TDC_SYN_counter, fF1TDC_TFO_counter, and fMaxF1TDCChannelNumber.

Referenced by QwF1TDC().

458 {
459  Int_t i = 0;
460 
461  fF1TDC_RFM_counter = 0;
462 
463  for(i=0; i<fMaxF1TDCChannelNumber; i++)
464  {
465  fF1TDC_SEU_counter[i] = 0;
466  fF1TDC_SYN_counter[i] = 0;
467  fF1TDC_EMM_counter[i] = 0;
468 
469  fF1TDC_TFO_counter[i] = 0;
470 
471  fF1TDC_RLF_counter[i] = 0;
472  fF1TDC_HFO_counter[i] = 0;
473  fF1TDC_OFO_counter[i] = 0;
474  fF1TDC_FDF_counter[i] = 0;
475  fF1TDC_S30_counter[i] = 0;
476  }
477  return;
478 }
UInt_t * fF1TDC_SYN_counter
UInt_t fF1TDC_RFM_counter
static const Int_t fMaxF1TDCChannelNumber
UInt_t * fF1TDC_FDF_counter
UInt_t * fF1TDC_SEU_counter
UInt_t * fF1TDC_TFO_counter
UInt_t * fF1TDC_OFO_counter
UInt_t * fF1TDC_HFO_counter
UInt_t * fF1TDC_S30_counter
UInt_t * fF1TDC_RLF_counter
UInt_t * fF1TDC_EMM_counter

+ Here is the caller graph for this function:

void QwF1TDC::SetF1BankIndex ( const Int_t  bank_index)
inline
void QwF1TDC::SetF1SystemName ( const TString  name)
inline
void QwF1TDC::SetF1TDCBuffer ( UInt_t *  buffer,
UInt_t  num_words 
)

Definition at line 213 of file QwF1TDContainer.cc.

References fBuffer, fChannelNumber, fF1TDC_full_range_ns, fF1TDC_hsdiv, fF1TDC_latency_ns, fF1TDC_refclkdiv, fF1TDC_refcnt, fF1TDC_resolution_ns, fF1TDC_t_offset, fF1TDC_tframe_ns, fF1TDC_trig_resolution_ns, fF1TDC_trig_t_offset, fF1TDC_triglat, fF1TDC_trigwin, fF1TDC_window_ns, fF1TDCFactor, fF1TDCNormResFlag, fF1TDCSyncFlag, fMaxF1TDCChannelNumber, fSlot, and fWordsPerBuffer.

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

214 {
215  UInt_t i = 0;
216  Int_t j = 0;
217  UInt_t start_index = 0;
218 
219  for(i=0; i<num_words; i++ ) {
220  if(buffer[i] == (UInt_t) fSlot) start_index = i;
221  }
222 
223 
224  // reassign buffer with 16 bits trim, because f1 configuration register is 16 bits
225  Int_t F1_16Bits = 0xFFFF;
226  Int_t F1_9Bits = 0x01FF;
227 
228  Double_t buffer_range = (Double_t) F1_16Bits + 1.0;
229  Double_t trig_range = (Double_t) F1_9Bits + 1.0;
230 
231  for(j=0; j<fWordsPerBuffer; j++) {
232  // exclude the first buffer, because it contains "slot" number.
233  fBuffer[j] = buffer[start_index+1+j] & F1_16Bits;
234  }
235 
236 
237  // decide Normal or High Resolution Mode
238  if ( fBuffer[1] & 0x8000 ) {
239  fF1TDCFactor = 0.5;
240  fF1TDCNormResFlag = false;
241  }
242  else {
243  fF1TDCFactor = 1.0;
244  fF1TDCNormResFlag = true;
245  }
246 
247 
248  // check whether Synchronous mode or not
249  if( fBuffer[15] & 0x4 ) {
250  fF1TDCSyncFlag = true;
251  }
252  else {
253  fF1TDCSyncFlag = false;
254  }
255  // calculate resolution_ns or bin_size_ns and full_range_ns
256  Double_t f1tdc_internal_reference_clock_ns = 25.0; // 40MHz
257  // decide max channel number of F1TDC according to "resolution mode"
258 
260 
261  // get refcnt and calculate tframe_ns
262  fF1TDC_refcnt = (fBuffer[7]>>6) & 0x1FF;
263  fF1TDC_tframe_ns = (Double_t)(f1tdc_internal_reference_clock_ns * (fF1TDC_refcnt +2 ));
264 
265 
266  // calculate refclkdiv
267  UInt_t exponent = 0;
268  exponent = ( fBuffer[10] >> 8 ) & 0x7;
269 
270  fF1TDC_refclkdiv = 1;
271  for(UInt_t ii = 0; ii < exponent; ii++) fF1TDC_refclkdiv = 2 * fF1TDC_refclkdiv;
272 
273  // get hsdiv
274  fF1TDC_hsdiv = fBuffer[10] & 0xFF;
275 
276 
277  fF1TDC_resolution_ns = fF1TDCFactor * (f1tdc_internal_reference_clock_ns/152.0) * ( (Double_t) fF1TDC_refclkdiv )/( (Double_t) fF1TDC_hsdiv );
279 
280  // get trigwin and triglat
281  fF1TDC_trigwin = fBuffer[8] & F1_16Bits;
282  fF1TDC_triglat = fBuffer[9] & F1_16Bits;
283 
284  // calculate trigger window_ns and trigger latency_ns
285  fF1TDC_window_ns = ((Double_t)fF1TDC_trigwin) * fF1TDC_resolution_ns / fF1TDCFactor;
286  fF1TDC_latency_ns = ((Double_t)fF1TDC_triglat) * fF1TDC_resolution_ns / fF1TDCFactor;
287 
288  // calculate trigger resolution_ns
289  fF1TDC_trig_resolution_ns = fF1TDC_resolution_ns * 128.0; // buffer_range / trig_range = 65536 /512 = 128
290 
291  // calculate the rollover counter (t_offset) if synchronoues mode is used
292  if(fF1TDCSyncFlag) {
295  }
296  else {
297  fF1TDC_t_offset = buffer_range; // no offset (rollover)
298  fF1TDC_trig_t_offset = trig_range;
299  }
300 
301  return;
302 }
Double_t fF1TDC_resolution_ns
Double_t fF1TDC_full_range_ns
Double_t fF1TDC_t_offset
Double_t fF1TDC_trig_resolution_ns
static const Int_t fMaxF1TDCChannelNumber
UInt_t fF1TDC_refcnt
Double_t fF1TDC_latency_ns
Bool_t fF1TDCSyncFlag
UInt_t fF1TDC_trigwin
UInt_t fF1TDC_refclkdiv
UInt_t fF1TDC_triglat
UInt_t * fBuffer
UInt_t fF1TDC_hsdiv
Bool_t fF1TDCNormResFlag
Int_t fChannelNumber
Double_t fF1TDC_trig_t_offset
static const Int_t fWordsPerBuffer
Double_t fF1TDCFactor
Double_t fF1TDC_tframe_ns
Double_t fF1TDC_window_ns

+ Here is the caller graph for this function:

void QwF1TDC::SetF1TDCIndex ( const Int_t  tdc_index)
inline
void QwF1TDC::SetReferenceSlot ( const Bool_t  reflag)
inline

Definition at line 88 of file QwF1TDContainer.h.

References fReferenceSlotFlag.

88 {fReferenceSlotFlag = reflag;};
Bool_t fReferenceSlotFlag
void QwF1TDC::SetROCNumber ( const Int_t  roc)
inline

Definition at line 86 of file QwF1TDContainer.h.

References fROC.

86 {fROC = roc;};
void QwF1TDC::SetSlotNumber ( const Int_t  slot)
inline

Definition at line 87 of file QwF1TDContainer.h.

References fSlot.

87 {fSlot = slot;};

Friends And Related Function Documentation

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

Definition at line 718 of file QwF1TDContainer.cc.

719 {
720  os << " ROC ";
721  os << std::setw(2) << f1tdc.fROC;
722  os << " Slot ";
723  os << std::setw(2) << f1tdc.fSlot;
724  os << " TDC idx ";
725  os << std::setw(2) << f1tdc.fF1TDCIndex;
726  os << " Bank idx ";
727  os << std::setw(2) << f1tdc.fF1BankIndex;
728 
729  return os;
730 }
Int_t fF1BankIndex
Int_t fF1TDCIndex

Field Documentation

UInt_t* QwF1TDC::fBuffer
Int_t QwF1TDC::fChannelNumber

Definition at line 176 of file QwF1TDContainer.h.

Referenced by GetChannelNumber(), PrintF1TDCConfigure(), QwF1TDC(), and SetF1TDCBuffer().

Int_t QwF1TDC::fF1BankIndex
UInt_t* QwF1TDC::fF1TDC_EMM_counter

Definition at line 209 of file QwF1TDContainer.h.

Referenced by AddEMM(), GetEMM(), GetTotalEMM(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

UInt_t* QwF1TDC::fF1TDC_FDF_counter

Definition at line 217 of file QwF1TDContainer.h.

Referenced by AddFDF(), GetFDF(), GetTotalFDF(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

Double_t QwF1TDC::fF1TDC_full_range_ns
UInt_t* QwF1TDC::fF1TDC_HFO_counter

Definition at line 215 of file QwF1TDContainer.h.

Referenced by AddHFO(), GetHFO(), GetTotalHFO(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

UInt_t QwF1TDC::fF1TDC_hsdiv

Definition at line 181 of file QwF1TDContainer.h.

Referenced by GetF1TDC_hsdiv(), PrintF1TDCConfigure(), QwF1TDC(), and SetF1TDCBuffer().

Double_t QwF1TDC::fF1TDC_latency_ns

Definition at line 190 of file QwF1TDContainer.h.

Referenced by GetF1TDC_latency(), PrintF1TDCConfigure(), QwF1TDC(), and SetF1TDCBuffer().

UInt_t* QwF1TDC::fF1TDC_OFO_counter

Definition at line 216 of file QwF1TDContainer.h.

Referenced by AddOFO(), GetOFO(), GetTotalOFO(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

UInt_t QwF1TDC::fF1TDC_refclkdiv
UInt_t QwF1TDC::fF1TDC_refcnt

Definition at line 180 of file QwF1TDContainer.h.

Referenced by GetF1TDC_refcnt(), PrintF1TDCConfigure(), QwF1TDC(), and SetF1TDCBuffer().

Double_t QwF1TDC::fF1TDC_resolution_ns
UInt_t QwF1TDC::fF1TDC_RFM_counter
private

Definition at line 240 of file QwF1TDContainer.h.

Referenced by GetTotalRFM(), QwF1TDC(), ReferenceSignalCorrection(), and ResetCounters().

UInt_t* QwF1TDC::fF1TDC_RLF_counter

Definition at line 214 of file QwF1TDContainer.h.

Referenced by AddRLF(), GetRLF(), GetTotalRLF(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

UInt_t* QwF1TDC::fF1TDC_S30_counter

Definition at line 218 of file QwF1TDContainer.h.

Referenced by AddS30(), GetS30(), GetTotalS30(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

UInt_t* QwF1TDC::fF1TDC_SEU_counter

Definition at line 208 of file QwF1TDContainer.h.

Referenced by AddSEU(), GetSEU(), GetTotalSEU(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

UInt_t* QwF1TDC::fF1TDC_SYN_counter

Definition at line 210 of file QwF1TDContainer.h.

Referenced by AddSYN(), GetSYN(), GetTotalSYN(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

Double_t QwF1TDC::fF1TDC_t_offset
UInt_t* QwF1TDC::fF1TDC_TFO_counter

Definition at line 211 of file QwF1TDContainer.h.

Referenced by AddTFO(), GetTFO(), GetTotalTFO(), QwF1TDC(), ResetCounters(), and ~QwF1TDC().

Double_t QwF1TDC::fF1TDC_tframe_ns

Definition at line 186 of file QwF1TDContainer.h.

Referenced by GetF1TDC_tframe(), PrintF1TDCConfigure(), QwF1TDC(), and SetF1TDCBuffer().

Double_t QwF1TDC::fF1TDC_trig_resolution_ns
Double_t QwF1TDC::fF1TDC_trig_t_offset

Definition at line 196 of file QwF1TDContainer.h.

Referenced by GetF1TDC_trig_t_offset(), PrintF1TDCConfigure(), and SetF1TDCBuffer().

UInt_t QwF1TDC::fF1TDC_triglat

Definition at line 184 of file QwF1TDContainer.h.

Referenced by GetF1TDC_triglat(), PrintF1TDCConfigure(), QwF1TDC(), and SetF1TDCBuffer().

UInt_t QwF1TDC::fF1TDC_trigwin
Double_t QwF1TDC::fF1TDC_window_ns

Definition at line 189 of file QwF1TDContainer.h.

Referenced by GetF1TDC_window(), PrintF1TDCConfigure(), QwF1TDC(), and SetF1TDCBuffer().

Double_t QwF1TDC::fF1TDCFactor

Definition at line 199 of file QwF1TDContainer.h.

Referenced by QwF1TDC(), and SetF1TDCBuffer().

Bool_t QwF1TDC::fF1TDCNormResFlag

Definition at line 223 of file QwF1TDContainer.h.

Referenced by IsNormResolution(), QwF1TDC(), and SetF1TDCBuffer().

Bool_t QwF1TDC::fF1TDCSyncFlag

Definition at line 224 of file QwF1TDContainer.h.

Referenced by IsSyncMode(), QwF1TDC(), and SetF1TDCBuffer().

const Int_t QwF1TDC::fMaxF1TDCChannelNumber = 64
staticprivate
TArrayD* QwF1TDC::fReferenceSignals

Definition at line 221 of file QwF1TDContainer.h.

Referenced by QwF1TDC(), and ~QwF1TDC().

Bool_t QwF1TDC::fReferenceSlotFlag

Definition at line 220 of file QwF1TDContainer.h.

Referenced by IsReferenceSlot(), QwF1TDC(), and SetReferenceSlot().

TString QwF1TDC::fSystemName
private

Definition at line 236 of file QwF1TDContainer.h.

Referenced by GetF1SystemName(), PrintF1TDCBuffer(), and SetF1SystemName().

const Int_t QwF1TDC::fWordsPerBuffer = 16
staticprivate

Definition at line 237 of file QwF1TDContainer.h.

Referenced by PrintF1TDCBuffer(), QwF1TDC(), and SetF1TDCBuffer().


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