ATLAS Offline Software
Loading...
Searching...
No Matches
ExternalONCRPCServerSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JIVEXML_ExternalONCRPCSERVERSVC_H
6#define JIVEXML_ExternalONCRPCSERVERSVC_H
7
9#include "GaudiKernel/ServiceHandle.h"
10#include "GaudiKernel/MsgStream.h"
11#include "JiveXML/EventStream.h"
12#include "JiveXML/IServerSvc.h"
13
14#include <rpc/clnt.h>
15
16namespace JiveXML {
17
23 class ExternalONCRPCServerSvc : public extends<AthService, IServerSvc> {
24
25 public:
26
28 ExternalONCRPCServerSvc(const std::string& name, ISvcLocator* sl);
31
33 virtual StatusCode initialize() override;
34 virtual StatusCode finalize() override;
35
38
39 virtual StatusCode UpdateEventForStream( const EventStreamID& evtStreamID, const std::string & event) override;
41
42 private:
43
44 //Instantiate and release the client handle
45 StatusCode GetClient();
46 StatusCode ReleaseClient();
47
48 //Get a timeval struct from the timeout double
49 struct timeval GetTimeout();
50
51 //The name of the machine the external server is running on
52 //defaults to "localhost"
53 std::string m_hostName;
54
55 //The timeout when calling the server in seconds
56 double m_timeOut;
57
58 //A client handle
59 CLIENT* m_client;
60 };
61
62} //namespace
63
64#endif
65
For the client-server communication, each event is uniquely identified by the run number,...
Definition EventStream.h:19
virtual StatusCode initialize() override
Gaudi default methods.
StatusCode ReleaseClient()
Destroy the private client handle.
StatusCode GetClient()
Obtain a client handle by.
virtual StatusCode finalize() override
Finalize - called once at the end.
virtual StatusCode UpdateEventForStream(const EventStreamID &evtStreamID, const std::string &event) override
Put this event as new current event for stream given by name.
struct timeval GetTimeout()
Convert timeout double in seconds to struct timeval.
ExternalONCRPCServerSvc(const std::string &name, ISvcLocator *sl)
Default constructor.
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.