Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oamlBuffer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file oamlBuffer.h
1 #ifndef __OAMLBUFFER_H__
2 #define __OAMLBUFFER_H__
3 
4 #include "olzoBuffer.h"
5 
6 #define CTRL_BEGINRUN 1
7 #define CTRL_ENDRUN 2
8 #define CTRL_DATA 3
9 #define CTRL_CLOSE 4
10 
11 
12 #ifndef __CINT__
14 #else
15 class oamlBuffer : public oBuffer{
16 #endif
17 
18 public:
19 
20  //** Constructors
21 
22  oamlBuffer (const char *host, const int port, PHDWORD * where,
23  const int length,
24  const int irun=0,
25  const int iseq=0 );
26 
27  // this one takes the form hostname:port
28 
29  oamlBuffer (const char *hostport, PHDWORD * where,
30  const int length,
31  const int irun=0,
32  const int iseq=0 );
33 
34 
35  virtual ~oamlBuffer();
36 
37 
38  virtual int writeout ();
39 
40 
41 protected:
42 
43  int connect_aml();
44  int begin_run();
45 
46  int has_begun;
47  int RunNumber;
49 
50  static int readn(int , char *, int);
51  static int writen(int , char *, int);
52 
53 
54  char HostName[256];
55  int ThePort;
56 
57  int sockfd;
58 
59 
60 };
61 
62 
63 
64 #endif /* __OAMLBUFFER_H__ */
65