EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
remote_msg_buffer Class Reference

#include <online_distribution/blob/master/newbasic/remote_msg_buffer.h>

+ Inheritance diagram for remote_msg_buffer:
+ Collaboration diagram for remote_msg_buffer:

Public Member Functions

 remote_msg_buffer (const char *host="va010.phenix.bnl.gov", const int port=8400, const int msglen=256)
 
virtual ~remote_msg_buffer ()
 the virtual destructor
 
virtual int sync ()
 the sync function overrides the streambuf's sync function
 
- Public Member Functions inherited from msg_buffer
 msg_buffer (const int msglen=256)
 
virtual ~msg_buffer ()
 
virtual int overflow (int ch)
 

Protected Member Functions

void send_string (const char *x, const int len)
 
int writen (int fd, const char *ptr, int nbytes)
 
- Protected Member Functions inherited from msg_buffer
virtual char * format (int *length, msgProfile *mp)
 

Protected Attributes

STREAMBUForiginal_streambuf
 
int ThePort
 
char * TheHost
 
int sockfd
 
struct sockaddr_in server_addr
 
struct hostent * p_host
 
- Protected Attributes inherited from msg_buffer
char * oBuffer
 
int pos
 
int maximum_position
 
msg_controlm
 

Detailed Description

This is the "filter" msg\_buffer class which allows you to filter

messages based on their profile. Its default behavior is to let all messages pass. You can use the member functions to tailor the kind of messages filtered and passed on.

Definition at line 32 of file remote_msg_buffer.h.

View newest version in sPHENIX GitHub at line 32 of file remote_msg_buffer.h

Constructor & Destructor Documentation

remote_msg_buffer::remote_msg_buffer ( const char *  host = "va010.phenix.bnl.gov",
const int  port = 8400,
const int  msglen = 256 
)

The msglen parameter specifies the initial length of the message string which is kept internally. If you exceed the length, it is automautically extended.

Definition at line 7 of file remote_msg_buffer.cc.

View newest version in sPHENIX GitHub at line 7 of file remote_msg_buffer.cc

References COUT, ENDL, original_streambuf, p_host, server_addr, STREAMBUF, TheHost, and ThePort.

remote_msg_buffer::~remote_msg_buffer ( )
virtual

the virtual destructor

Definition at line 38 of file remote_msg_buffer.cc.

View newest version in sPHENIX GitHub at line 38 of file remote_msg_buffer.cc

References COUT, original_streambuf, and TheHost.

Member Function Documentation

void remote_msg_buffer::send_string ( const char *  x,
const int  len 
)
protected

Definition at line 88 of file remote_msg_buffer.cc.

View newest version in sPHENIX GitHub at line 88 of file remote_msg_buffer.cc

References server_addr, sockfd, and writen().

+ Here is the call graph for this function:

int remote_msg_buffer::sync ( )
virtual

the sync function overrides the streambuf's sync function

Reimplemented from msg_buffer.

Definition at line 54 of file remote_msg_buffer.cc.

View newest version in sPHENIX GitHub at line 54 of file remote_msg_buffer.cc

References G4BARRELHCAL::length, pos(), and x.

+ Here is the call graph for this function:

int remote_msg_buffer::writen ( int  fd,
const char *  ptr,
int  nbytes 
)
protected

Definition at line 107 of file remote_msg_buffer.cc.

View newest version in sPHENIX GitHub at line 107 of file remote_msg_buffer.cc

References tree::write().

Referenced by send_string().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

STREAMBUF* remote_msg_buffer::original_streambuf
protected

Definition at line 37 of file remote_msg_buffer.h.

View newest version in sPHENIX GitHub at line 37 of file remote_msg_buffer.h

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

struct hostent* remote_msg_buffer::p_host
protected

Definition at line 43 of file remote_msg_buffer.h.

View newest version in sPHENIX GitHub at line 43 of file remote_msg_buffer.h

Referenced by remote_msg_buffer().

struct sockaddr_in remote_msg_buffer::server_addr
protected

Definition at line 42 of file remote_msg_buffer.h.

View newest version in sPHENIX GitHub at line 42 of file remote_msg_buffer.h

Referenced by remote_msg_buffer(), and send_string().

int remote_msg_buffer::sockfd
protected

Definition at line 41 of file remote_msg_buffer.h.

View newest version in sPHENIX GitHub at line 41 of file remote_msg_buffer.h

Referenced by send_string().

char* remote_msg_buffer::TheHost
protected

Definition at line 39 of file remote_msg_buffer.h.

View newest version in sPHENIX GitHub at line 39 of file remote_msg_buffer.h

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

int remote_msg_buffer::ThePort
protected

Definition at line 38 of file remote_msg_buffer.h.

View newest version in sPHENIX GitHub at line 38 of file remote_msg_buffer.h

Referenced by remote_msg_buffer().


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