Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

CLogger Class Reference

#include <CLogger.h>

List of all members.

Public Types

enum  Severity { SUCCESS, WARNING, ERROR }
 The facility name which is logging the event. More...

Public Member Functions

 CLogger (STD(string) facility)
 CLogger (const CLogger &aCLogger)
 ~CLogger ()
bool Log (Severity sev, STD(string) message)
HostListIterator begin ()
HostListIterator end ()
int size ()
void AddHost (const STD(string)&newHost)
void RemoveHost (const STD(string)&oldHost)
void RemoveHost (HostListIterator It)

Private Member Functions

 STD (list)< STD(string)> m_HostList
const STD (string) m_sFacility
 The list of hosts running EventLog.tcl.
CLogger operator= (const CLogger &aCLogger)
int operator== (const CLogger &aCLogger)
 STD (list)< STD(string)> getHostList() const
const STD (string) getFacility() const


Detailed Description

Encapsulates a logger class for events which occur in the data acquisition framework. The Logger maintains a list of hostnames on which the actual EventLog.tcl script is running, as well as the port number and name of the facility which contains it. An event is logged via a call to the CLogger::Log() function member which creates client sockets that connect to each of the hosts in the host list and logs the events. Each socket is shut down immediately after the log entry is written. CLogger also contains an enumeration CLogger::Severity. This is used for function CLogger::Log(), as there are only three possible values for severity that the logger will accept:

Definition at line 351 of file CLogger.h.


Member Enumeration Documentation

enum CLogger::Severity
 

The facility name which is logging the event.

Enumeration values:
SUCCESS 
WARNING 
ERROR 

Definition at line 357 of file CLogger.h.


Constructor & Destructor Documentation

CLogger::CLogger STD(string)  facility  ) 
 

CLogger::CLogger const CLogger aCLogger  ) 
 

"Copy Constructor" This is the copy constructor. It creates a new object by copying the information of the reference object which is its parameter.

Parameters:
aCLogger - the reference object whose attributes will be copied.

Definition at line 326 of file CLogger.cpp.

CLogger::~CLogger  ) 
 

"Destructor" Called when an object goes out of scope, or when execution of the program is terminated. Destroys the object, and frees up space.

Definition at line 335 of file CLogger.cpp.


Member Function Documentation

void CLogger::AddHost const STD(string)&  newHost  ) 
 

HostListIterator CLogger::begin  ) 
 

Operation Type: Selector

Purpose: Returns an iterator to the first host in m_HostList.

Definition at line 474 of file CLogger.cpp.

HostListIterator CLogger::end  ) 
 

Operator Type: Selector

Purpose: Returns an iterator which points to just past the last host in m_HostList.

Definition at line 488 of file CLogger.cpp.

bool CLogger::Log Severity  sev,
STD(string)  message
 

CLogger CLogger::operator= const CLogger aCLogger  )  [private]
 

int CLogger::operator== const CLogger aCLogger  )  [private]
 

void CLogger::RemoveHost HostListIterator  It  ) 
 

Operation Type: Mutator

Purpose: Removes a host from the list of hosts that we will attempt to form a connection with and log a message to.

Parameters:
It An iterator which points to the host in m_HostList that is to be removed.
Exceptions:
CNoSuchObjectException Thrown if the name supplied in the paramter is not in m_HostList.

Definition at line 576 of file CLogger.cpp.

References HostListIterator.

void CLogger::RemoveHost const STD(string)&  oldHost  ) 
 

int CLogger::size  ) 
 

Operation Type: Selector

Purpose: Returns the number of hosts that are currently being logged to.

Returns:
The number of hosts in m_HostList

Definition at line 503 of file CLogger.cpp.

const CLogger::STD string   )  const [inline, private]
 

Definition at line 381 of file CLogger.h.

CLogger::STD list   )  const [inline, private]
 

Definition at line 380 of file CLogger.h.

const CLogger::STD string   )  [private]
 

The list of hosts running EventLog.tcl.

CLogger::STD list   )  [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Jan 6 16:58:44 2005 for Spectrodaq External Event Framework by  doxygen 1.3.9.1