ATLAS Offline Software
Loading...
Searching...
No Matches
ONCRPCXDRProcs.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // lots of const violations in this C-code
9
10namespace JiveXML {
11
12
17
18 //De-/Encoding of Streams_t
19 bool_t xdr_streams( XDR* xdrsp, Streams* streams ){
20
21 // As we do not know the string length, we use xdr_wrap_string
22 return (xdr_array( xdrsp, (caddr_t*)&streams->StreamNames, &streams->NStreams,
23 NSTREAMMAX, sizeof(char*), (xdrproc_t)xdr_wrapstring));
24 }
25
30
31 //De-/Encoding of EventRequest_t
32 bool_t xdr_event_req( XDR* xdrsp, EventRequest* eventReq ){
33
34 //de-/encode event number
35 if (! xdr_int64_t( xdrsp, &(eventReq->EventNumber)))
36 return false ;
37
38 //de-/encode run number
39 if (! xdr_int64_t( xdrsp, &(eventReq->RunNumber)))
40 return false ;
41
42 //de-/encode stream name
43 if (! xdr_wrapstring( xdrsp, (char**)&(eventReq->StreamName)))
44 return false ;
45
46 // All done successfully
47 return true ;
48 }
49
50 //De-/Encoding of Event_t
51 bool_t xdr_event( XDR* xdrsp, Event* event ){
52
53 //de-/encode is-available bit
54 if (! xdr_bool( xdrsp, &(event->isAvailable)))
55 return false ;
56
57 //de-/encode is-available bit
58 if (! xdr_bool( xdrsp, &(event->isIdentical)))
59 return false ;
60
61 //de-/encode is-available bit
62 if (! xdr_bool( xdrsp, &(event->isCompressed)))
63 return false ;
64
65 //de-/encode stream name
66 if (! xdr_wrapstring( xdrsp, (char**)&(event->StreamName)))
67 return false ;
68
69 //de-/encode event number
70 if (! xdr_int64_t( xdrsp, &(event->EventNumber)))
71 return false ;
72
73 //de-/encode run number
74 if (! xdr_int64_t( xdrsp, &(event->RunNumber)))
75 return false ;
76
77 // wrap data as an array of bytes with length NBytes - this allows non-null
78 // terminated byte arrays to be send. Also - in contrast to an array - no
79 // subroutine is called for each byte. Instead, the string is just padded
80 // with null-char to obtain a length divisible by four
81 return (xdr_bytes( xdrsp, (caddr_t*)&event->EventData, &event->NBytes, NBYTESMAX));
82 }
83}
84
85
Define macros for attributes used to control the static checker.
#define ATLAS_NO_CHECK_FILE_THREAD_SAFETY
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
const unsigned int NBYTESMAX
bool_t xdr_event_req(XDR *xdrsp, EventRequest *eventReq)
De-/Encoding of EventRequest_t.
struct EventRequest_t EventRequest
Data structures for GetEvent functions.
bool_t xdr_streams(XDR *xdrsp, Streams *streams)
De- and Encoding of Streams_t.
struct Streams_t Streams
Data structures for GetStreams functions.
struct Event_t Event
const unsigned int NSTREAMMAX
bool_t xdr_event(XDR *xdrsp, Event *event)
De-/Encoding of Event_t.