QwAnalysis
QwErrDBInterface Class Reference

#include <QwDBInterface.h>

Public Member Functions

 QwErrDBInterface ()
 
virtual ~QwErrDBInterface ()
 
void SetAnalysisID (UInt_t id)
 
void SetDeviceName (TString &in)
 
void SetDeviceID (UInt_t id)
 
void SetMonitorID (QwParityDB *db)
 
void SetMainDetectorID (QwParityDB *db)
 
void SetLumiDetectorID (QwParityDB *db)
 
void SetErrorCodeId (UInt_t in)
 
void SetN (UInt_t in)
 
TString GetDeviceName ()
 
void Reset ()
 
template<class T >
void AddThisEntryToList (std::vector< T > &list)
 
void PrintStatus (Bool_t print_flag)
 

Private Member Functions

template<class T >
TypedDBClone ()
 

Private Attributes

UInt_t fAnalysisId
 
UInt_t fDeviceId
 
UInt_t fErrorCodeId
 
UInt_t fN
 
TString fDeviceName
 

Detailed Description

Definition at line 165 of file QwDBInterface.h.

Constructor & Destructor Documentation

QwErrDBInterface::QwErrDBInterface ( )
inline

Definition at line 182 of file QwDBInterface.h.

References fDeviceName.

183  : fAnalysisId(0),fDeviceId(0),fErrorCodeId(0),fN(0) {
184  fDeviceName ="";
185  }
virtual QwErrDBInterface::~QwErrDBInterface ( )
inlinevirtual

Definition at line 186 of file QwDBInterface.h.

186 { }

Member Function Documentation

template<class T >
void QwErrDBInterface::AddThisEntryToList ( std::vector< T > &  list)
inline

Definition at line 227 of file QwDBInterface.h.

References QwLog::endl(), fAnalysisId, fDeviceId, PrintStatus(), QwError, and Qw::T.

Referenced by QwBlinder::FillErrDB().

228 {
229  Bool_t okay = kTRUE;
230  if (fAnalysisId == 0) {
231  QwError << "QwErrDBInterface::AddDBEntryToList: Analysis ID invalid; entry dropped"
232  << QwLog::endl;
233  okay = kFALSE;
234  }
235  if (fDeviceId == 0) {
236  QwError << "QwErrDBInterface::AddDBEntryToList: Device ID invalid; entry dropped"
237  << QwLog::endl;
238  okay = kFALSE;
239  }
240  if (okay) {
241  T row = TypedDBClone<T>();
242  if (row.analysis_id == 0){
243  QwError << "QwErrDBInterface::AddDBEntryToList: Unknown list type; entry dropped"
244  << QwLog::endl;
245  okay = kFALSE;
246  } else {
247  list.push_back(row);
248  }
249  }
250  if (okay == kFALSE) {
251  PrintStatus(kTRUE);
252  };
253 }
static const double T
Magnetic field: base unit is T.
Definition: QwUnits.h:111
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
void PrintStatus(Bool_t print_flag)
#define QwError
Predefined log drain for errors.
Definition: QwLog.h:40

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TString QwErrDBInterface::GetDeviceName ( )
inline

Definition at line 199 of file QwDBInterface.h.

References fDeviceName.

199 {return fDeviceName;};
void QwErrDBInterface::PrintStatus ( Bool_t  print_flag)
inline

Definition at line 213 of file QwDBInterface.h.

References QwLog::endl(), fAnalysisId, fDeviceId, fDeviceName, fErrorCodeId, fN, and QwMessage.

Referenced by AddThisEntryToList().

213  {
214  if(print_flag) {
215  QwMessage << std::setw(12)
216  << " AnalysisID " << fAnalysisId
217  << " Device :" << std::setw(30) << fDeviceName
218  << ":" << std::setw(4) << fDeviceId
219  << " ErrorCode " << fErrorCodeId
220  << " n " << fN
221  << QwLog::endl;
222  }
223  }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwErrDBInterface::Reset ( )
inline

Definition at line 201 of file QwDBInterface.h.

References fAnalysisId, fDeviceId, fDeviceName, fErrorCodeId, and fN.

Referenced by QwVQWK_Channel::AddErrEntriesToList().

201  {
202  fAnalysisId = 0;
203  fDeviceId = 0;
204  fErrorCodeId = 0;
205  fN = 0;
206  fDeviceName = "";
207  };

+ Here is the caller graph for this function:

void QwErrDBInterface::SetAnalysisID ( UInt_t  id)
inline

Definition at line 188 of file QwDBInterface.h.

References fAnalysisId.

Referenced by QwBlinder::FillErrDB().

188 {fAnalysisId = id;};

+ Here is the caller graph for this function:

void QwErrDBInterface::SetDeviceID ( UInt_t  id)
inline

Definition at line 190 of file QwDBInterface.h.

References fDeviceId.

Referenced by QwBlinder::FillErrDB().

190 {fDeviceId = id;};

+ Here is the caller graph for this function:

void QwErrDBInterface::SetDeviceName ( TString &  in)
inline

Definition at line 189 of file QwDBInterface.h.

References fDeviceName, and Qw::in.

Referenced by QwVQWK_Channel::AddErrEntriesToList().

189 {fDeviceName = in;};
static const double in
Definition: QwUnits.h:66

+ Here is the caller graph for this function:

void QwErrDBInterface::SetErrorCodeId ( UInt_t  in)
inline

Definition at line 196 of file QwDBInterface.h.

References fErrorCodeId, and Qw::in.

Referenced by QwVQWK_Channel::AddErrEntriesToList(), and QwBlinder::FillErrDB().

196 {fErrorCodeId = in;};
static const double in
Definition: QwUnits.h:66

+ Here is the caller graph for this function:

void QwErrDBInterface::SetLumiDetectorID ( QwParityDB db)

Definition at line 140 of file QwDBInterface.cc.

References fDeviceId, fDeviceName, and QwParityDB::GetLumiDetectorID().

141 {
143 }
UInt_t GetLumiDetectorID(const string &name, Bool_t zero_id_is_error=kTRUE)
Definition: QwParityDB.cc:790

+ Here is the call graph for this function:

void QwErrDBInterface::SetMainDetectorID ( QwParityDB db)

Definition at line 135 of file QwDBInterface.cc.

References fDeviceId, fDeviceName, and QwParityDB::GetMainDetectorID().

136 {
138 }
UInt_t GetMainDetectorID(const string &name, Bool_t zero_id_is_error=kTRUE)
Definition: QwParityDB.cc:661

+ Here is the call graph for this function:

void QwErrDBInterface::SetMonitorID ( QwParityDB db)

Definition at line 130 of file QwDBInterface.cc.

References fDeviceId, fDeviceName, and QwParityDB::GetMonitorID().

131 {
132  fDeviceId = db->GetMonitorID(fDeviceName.Data());
133 }
UInt_t GetMonitorID(const string &name, Bool_t zero_id_is_error=kTRUE)
Definition: QwParityDB.cc:618

+ Here is the call graph for this function:

void QwErrDBInterface::SetN ( UInt_t  in)
inline

Definition at line 197 of file QwDBInterface.h.

References fN, and Qw::in.

Referenced by QwVQWK_Channel::AddErrEntriesToList(), and QwBlinder::FillErrDB().

197 {fN = in;};
static const double in
Definition: QwUnits.h:66

+ Here is the caller graph for this function:

template<class T >
T QwErrDBInterface::TypedDBClone ( )
private

Definition at line 146 of file QwDBInterface.cc.

References Qw::T.

147 {
148  T row(0);
149  return row;
150 }
static const double T
Magnetic field: base unit is T.
Definition: QwUnits.h:111

Field Documentation

UInt_t QwErrDBInterface::fAnalysisId
private

Definition at line 169 of file QwDBInterface.h.

Referenced by AddThisEntryToList(), PrintStatus(), Reset(), and SetAnalysisID().

UInt_t QwErrDBInterface::fDeviceId
private
TString QwErrDBInterface::fDeviceName
private
UInt_t QwErrDBInterface::fErrorCodeId
private

Definition at line 171 of file QwDBInterface.h.

Referenced by PrintStatus(), Reset(), and SetErrorCodeId().

UInt_t QwErrDBInterface::fN
private

Definition at line 172 of file QwDBInterface.h.

Referenced by PrintStatus(), Reset(), and SetN().


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