JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
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::QwErrDBInterface ( )
inline

Definition at line 182 of file QwDBInterface.h.

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

◆ ~QwErrDBInterface()

virtual QwErrDBInterface::~QwErrDBInterface ( )
inlinevirtual

Definition at line 186 of file QwDBInterface.h.

186{ }

Member Function Documentation

◆ AddThisEntryToList()

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

Definition at line 226 of file QwDBInterface.h.

227{
228 Bool_t okay = kTRUE;
229 if (fAnalysisId == 0) {
230 QwError << "QwErrDBInterface::AddDBEntryToList: Analysis ID invalid; entry dropped"
231 << QwLog::endl;
232 okay = kFALSE;
233 }
234 if (fDeviceId == 0) {
235 QwError << "QwErrDBInterface::AddDBEntryToList: Device ID invalid; entry dropped"
236 << QwLog::endl;
237 okay = kFALSE;
238 }
239 if (okay) {
240 T row = TypedDBClone<T>();
241 // Note: analysis_id validation done above with fAnalysisId check
242 list.push_back(row);
243 }
244 if (okay == kFALSE) {
245 PrintStatus(kTRUE);
246 };
247}
#define QwError
Predefined log drain for errors.
Definition QwLog.h:39
void PrintStatus(Bool_t print_flag)
static std::ostream & endl(std::ostream &)
End of the line.
Definition QwLog.cc:297

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

+ Here is the call graph for this function:

◆ GetDeviceName()

TString QwErrDBInterface::GetDeviceName ( )
inline

Definition at line 199 of file QwDBInterface.h.

199{return fDeviceName;};

References fDeviceName.

◆ PrintStatus()

void QwErrDBInterface::PrintStatus ( Bool_t print_flag)
inline

Definition at line 212 of file QwDBInterface.h.

212 {
213 if(print_flag) {
214 QwMessage << std::setw(12)
215 << " AnalysisID " << fAnalysisId
216 << " Device :" << std::setw(30) << fDeviceName
217 << ":" << std::setw(4) << fDeviceId
218 << " ErrorCode " << fErrorCodeId
219 << " n " << fN
220 << QwLog::endl;
221 }
222 }
#define QwMessage
Predefined log drain for regular messages.
Definition QwLog.h:49

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

Referenced by AddThisEntryToList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Reset()

void QwErrDBInterface::Reset ( )
inline

Definition at line 201 of file QwDBInterface.h.

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

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

◆ SetAnalysisID()

void QwErrDBInterface::SetAnalysisID ( UInt_t id)
inline

Definition at line 188 of file QwDBInterface.h.

188{fAnalysisId = id;};

References fAnalysisId.

◆ SetDeviceID()

void QwErrDBInterface::SetDeviceID ( UInt_t id)
inline

Definition at line 190 of file QwDBInterface.h.

190{fDeviceId = id;};

References fDeviceId.

◆ SetDeviceName()

void QwErrDBInterface::SetDeviceName ( TString & in)
inline

Definition at line 189 of file QwDBInterface.h.

189{fDeviceName = in;};

References fDeviceName.

◆ SetErrorCodeId()

void QwErrDBInterface::SetErrorCodeId ( UInt_t in)
inline

Definition at line 196 of file QwDBInterface.h.

196{fErrorCodeId = in;};

References fErrorCodeId.

◆ SetLumiDetectorID()

void QwErrDBInterface::SetLumiDetectorID ( QwParityDB * db)

◆ SetMainDetectorID()

void QwErrDBInterface::SetMainDetectorID ( QwParityDB * db)

◆ SetMonitorID()

void QwErrDBInterface::SetMonitorID ( QwParityDB * db)

◆ SetN()

void QwErrDBInterface::SetN ( UInt_t in)
inline

Definition at line 197 of file QwDBInterface.h.

197{fN = in;};

References fN.

◆ TypedDBClone()

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

Definition at line 153 of file QwDBInterface.cc.

154{
155 T row(0);
156 return row;
157}

Referenced by AddThisEntryToList().

+ Here is the caller graph for this function:

Field Documentation

◆ fAnalysisId

UInt_t QwErrDBInterface::fAnalysisId
private

◆ fDeviceId

UInt_t QwErrDBInterface::fDeviceId
private

◆ fDeviceName

TString QwErrDBInterface::fDeviceName
private

Definition at line 174 of file QwDBInterface.h.

Referenced by GetDeviceName(), PrintStatus(), QwErrDBInterface(), Reset(), and SetDeviceName().

◆ fErrorCodeId

UInt_t QwErrDBInterface::fErrorCodeId
private

Definition at line 171 of file QwDBInterface.h.

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

◆ fN

UInt_t QwErrDBInterface::fN
private

Definition at line 172 of file QwDBInterface.h.

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


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