  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
   18     base_class ( 
name, sl ),
 
   22       declareProperty(
"Hostname",
m_hostName=
"localhost",
"The name of the host the external server is running on [ default: \"localhost\" ]");
 
   23       declareProperty(
"Timeout",
m_timeOut=10,
"Timeout when calling the server in seconds [ default: 10 ]");
 
   52     return StatusCode::SUCCESS;
 
   74       return StatusCode::FAILURE;
 
   79 # pragma GCC diagnostic push 
   80 # pragma GCC diagnostic ignored "-Wcast-function-type" 
   82 #if defined(__clang__) && __clang_major__ >= 19 
   83 # pragma clang diagnostic push 
   84 # pragma clang diagnostic ignored "-Wcast-function-type-mismatch" 
   87     clnt_stat ret = clnt_call(
m_client, NULLPROC, (xdrproc_t)xdr_void, NULL,
 
   89 #if defined(__clang__) && __clang_major__ >= 19 
   90 # pragma clang diagnostic pop 
   93 # pragma GCC diagnostic pop 
   97     if (ret != RPC_SUCCESS){
 
  103       return StatusCode::FAILURE;
 
  109     return StatusCode::SUCCESS;
 
  117     struct timeval 
timeout = { 0, 0 };
 
  119     if (m_timeOut < 0)  
return timeout;
 
  121     timeout.tv_sec = 
static_cast<long>(m_timeOut);
 
  123     timeout.tv_usec = 
static_cast<long>((m_timeOut - 
timeout.tv_sec)*1e6);
 
  137     return StatusCode::SUCCESS;
 
  153     return StatusCode::SUCCESS;
 
  166       ATH_MSG_ERROR( 
"Invalid event stream identifier - cannot add event"  );
 
  167       return StatusCode::FAILURE;
 
  173     event.isAvailable = false ; 
event.isIdentical = false ; 
event.isCompressed = false ;
 
  174     event.RunNumber = evtStreamID.
RunNumber();
 
  176     event.StreamName=strdup(evtStreamID.
StreamName().c_str());
 
  177     event.NBytes = strlen(eventStr.c_str())+1;
 
  178     event.EventData = strdup(eventStr.c_str());
 
  181                      << 
" from run " << 
event.RunNumber 
 
  182                      << 
" to be put in stream " << 
event.StreamName 
 
  183                      << 
" with " << 
event.NBytes << 
" bytes"  );
 
  190                        << 
" from run " << evtStreamID.
RunNumber()  );
 
  191       return StatusCode::FAILURE;
 
  195     bool isSuccess = 
false;
 
  197                              (xdrproc_t)xdr_bool,(caddr_t)&isSuccess, 
GetTimeout());
 
  200     if (ret != RPC_SUCCESS){
 
  204                        << 
" from run " << evtStreamID.
RunNumber()  );
 
  205       return StatusCode::FAILURE;
 
  213                        << 
" from run " << evtStreamID.
RunNumber()  );
 
  214       return StatusCode::FAILURE;
 
  221                    << 
" from run " << evtStreamID.
RunNumber()  );
 
  226     return StatusCode::SUCCESS;
 
  
StatusCode GetClient()
Obtain a client handle by.
 
unsigned long EventNumber() const
 
#define ATH_MSG_VERBOSE(x)
 
ExternalONCRPCServerSvc(const std::string &name, ISvcLocator *sl)
Default constructor.
 
virtual StatusCode initialize() override
Gaudi default methods.
 
::StatusCode StatusCode
StatusCode definition for legacy code.
 
bool_t xdr_event(XDR *xdrsp, Event *event)
De-/Encoding of Event_t.
 
This athena service will provide a link to an external ONCRPC server, e.g running as standalone appli...
 
struct timeval GetTimeout()
Convert timeout double in seconds to struct timeval.
 
For the client-server communication, each event is uniquely identified by the run number,...
 
const std::string & StreamName() const
 
virtual ~ExternalONCRPCServerSvc()
Destructor.
 
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
 
#define ONCRPC_SETEVENT_PROC
 
StatusCode ReleaseClient()
Destroy the private client handle.
 
virtual StatusCode UpdateEventForStream(const EventStreamID &evtStreamID, const std::string &event) override
Put this event as new current event for stream given by name.
 
virtual StatusCode finalize() override
Finalize - called once at the end.
 
#define ATH_MSG_WARNING(x)
 
unsigned int RunNumber() const