ATLAS Offline Software
Loading...
Searching...
No Matches
ONCRPCServer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JIVEXML__ONCRPCSERVER_H
6#define JIVEXML__ONCRPCSERVER_H
7
15
16extern "C" {
17 #include <rpc/rpc.h>
18 #include <rpc/pmap_clnt.h>
19}
20
21#include <math.h>
22
23//Safeguard external includes
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28namespace JiveXML{
29
30 #define ONCRPCSERVERPROG 200048965 //By this number the server is identified
31 #define ONCRPCSERVERVERS 2 //By this number the version of the server is identified
32 #define ONCRPC_GETSTATUS_PROC 1 //This number identifies the procedure returning the current athena status
33 #define ONCRPC_GETSTREAMS_PROC 2 //This number identifies the procedure returning the names of the available streams
34 #define ONCRPC_GETEVENT_PROC 3 //This number identifies the procedure returning an event for a specific stream
35 #define ONCRPC_SETEVENT_PROC 4 //This number identifies the procedure setting a new event for a specific stream
36
37 //Maximum allowed number of streams
38 const unsigned int NSTREAMMAX = 1024 ;
39 //Maximum allowd number of bytes in one event (2^31 for 4-byte ints)
40 const unsigned int NBYTESMAX = 0x1u << (sizeof( unsigned int )*8 - 1) ; //2147483648 ;
41
45 typedef struct Streams_t Streams;
46 struct Streams_t {
47 unsigned int NStreams;
49 };
50
54
55 // When requesting an event from a particular stream, the user give the eventID
56 // if the event he already has This avoids duplicate transfer of the same event
59 int64_t EventNumber;
60 int64_t RunNumber;
61 const char* StreamName;
62 };
63
64 // The event return structure, which holds several parameters of the event
65 typedef struct Event_t Event;
66 struct Event_t {
67 bool_t isAvailable; //This flag is set false if no event is available for the requested stream
68 bool_t isIdentical; //This flag is set true if the event is the same as the one the user had asked for
69 bool_t isCompressed; //This flag is set true if the event is compressed
70 const char* StreamName; //Then name of the stream of this event
71 int64_t EventNumber; //The event number of the event that is send back
72 int64_t RunNumber; //The run number of the event that is send back
73 unsigned int NBytes; //Number of bytes in the event data
74 const char* EventData; //Address of event data - if there is any
75 };
76
77}//namespace
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif // include guards
84
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
const unsigned int NBYTESMAX
struct EventRequest_t EventRequest
Data structures for GetEvent functions.
struct Streams_t Streams
Data structures for GetStreams functions.
struct Event_t Event
const unsigned int NSTREAMMAX
const char * EventData
unsigned int NBytes
const char * StreamName
unsigned int NStreams