ATLAS Offline Software
Namespaces | Classes | Typedefs | Functions | Variables
JiveXML Namespace Reference

This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc. More...

Namespaces

 MuonFullIDHelper
 
 SiSpacePointRetrieverHelpers
 
 TrackParticleRetrieverHelpers
 
 TrackRetrieverHelpers
 Namespace for all helper functions.
 

Classes

class  AlgoJiveXML
 Converts Reconstructed Event Data objects into XML files which can be read by, for example, the Atlantis graphics package. More...
 
class  AODCaloClusterRetriever
 Retrieves all Calo Cluster objects. More...
 
class  AODJetRetriever
 Retrieves all Jet objects (JetEvent/Jet) More...
 
class  BadLArRetriever
 Retrieves all Calo Cluster objects. More...
 
class  BadTileRetriever
 Retrieves all Tile Calo Cell objects. More...
 
class  BeamSpotRetriever
 Retrieve the BeamSpot information (official ID s/w result) More...
 
class  BJetRetriever
 Retrieves Jet objects, filter from weight for BJet (JetEvent/Jet) More...
 
class  CaloClusterRetriever
 Retrieves all Calo Cluster objects. More...
 
class  CaloFCalRetriever
 Retrieves all Calo Cluster objects. More...
 
class  CaloHECRetriever
 Retrieves all Calo Cluster objects. More...
 
class  CaloLArRetriever
 Retrieves all Calo Cluster objects. More...
 
class  CaloMBTSRetriever
 Retrieves all Calo Cluster objects. More...
 
class  CaloTileRetriever
 Retrieves all Tile Calo Cell objects. More...
 
class  CompositeParticleRetriever
 Retrieves all CompositeParticle objects (AllObjects) More...
 
class  CSCClusterRetriever
 
class  CscPrepDataRetriever
 
class  CTPDecisionRetriever
 
class  DataType
 Templated class to convert any object that is streamable in a ostringstream in a string. More...
 
struct  DispatchThreadArguments_t
 
class  ElectronRetriever
 Retrieves all Electron objects (ElectronAODCollection etc.) More...
 
class  EmTauROIRetriever
 
struct  Event_t
 
struct  EventRequest_t
 
class  EventStreamID
 For the client-server communication, each event is uniquely identified by the run number, the event number and a string determining which stream it belongs to. More...
 
class  ExternalONCRPCServerSvc
 This athena service will provide a link to an external ONCRPC server, e.g running as standalone application or in another athena application. More...
 
class  GeometryWriter
 Writes the inner detector and calorimeter geometry to an XML file for use with Atlantis. More...
 
class  IDataRetriever
 Interface for all DataRetriever classes, that extract event data from StoreGate and pass them on to a IFormatTool The interface will only hold the methods that have to be implemented by all DataRetrievers. More...
 
class  IEventReceiver
 Pure abstract interface for all event serving classes that provide events, streams and status information to the serving threads. More...
 
class  IEventServer
 Pure abstract interface for all event serving classes that provide events, streams and status information to the serving threads. More...
 
class  IFormatTool
 Abstract interface to event data formatting classes. More...
 
class  IGeometryWriter
 
class  IInDetGeoModelTool
 Interface for the InDetGeoModelTool. More...
 
class  IMessage
 Pure abstract interface to provide some athena-indepandant messaging Note that only MSG::Level enum is used from IMessageSvc. More...
 
class  InDetGeoModelTool
 Provides easy access to the geometry model managers and identifier helpers for all JiveXML::IDataRetriever implemenations in InDetJiveXML . More...
 
class  IServer
 Pure abstract interface for all full server implementations. More...
 
class  IServerSvc
 Athena interface for all ServerSvc implementations. More...
 
class  IStreamTool
 Abstract interface to JiveXML event streaming classes. More...
 
class  JetROIRetriever
 Retrieves ROI objects, default mode uses HLT/Offline object LVL1_ROI::jets_type. More...
 
class  JiveXMLServer
 
class  LArDigitRetriever
 Retrieves all Tile Calo Cell objects. More...
 
class  LVL1JetElementRetriever
 
class  LVL1ResultRetriever
 
class  LVL1TrigTowerRetriever
 
class  MdtPrepDataRetriever
 
class  MMPrepDataRetriever
 
class  MuonGeometryWriter
 Writes the GeoModel muon geometry to an XML file for use with Atlantis. More...
 
class  MuonRetriever
 Retrieves all Muon objects (StacoMuonCollection etc.) More...
 
class  MuonROIRetriever
 Retrieves ROI objects, default mode uses HLT/Offline object LVL1_ROI::emtaus_type. More...
 
class  ONCRPCServerSvc
 This athena service will create an ONC/RPC (aka SunRPC) server, that can provide the athena status as well as data strings from events. More...
 
class  PhotonRetriever
 Retrieves all Photon objects (PhotonAODCollection) More...
 
class  PixelClusterRetriever
 Retrieves all InDet::SiCluster objects. More...
 
class  PixelRDORetriever
 Retrieve all PixelRDORawData information (pixel raw hits) More...
 
class  RpcPrepDataRetriever
 
class  SCTRDORetriever
 Retrieve all SCT_RDORawData information (SCT raw hits) More...
 
class  SegmentRetriever
 Retrieves all Trk::SegmentCollection objects. More...
 
struct  ServerThreadArguments_t
 
class  SiClusterRetriever
 Retrieves all InDet::SiCluster objects. More...
 
class  SiSpacePointRetriever
 Retrieves all InDet::SpacePoint data for Pixel and SCT. More...
 
class  sTgcPrepDataRetriever
 
struct  Streams_t
 
class  StreamToFileTool
 Stream JiveXML event information into a file. More...
 
class  StreamToServerTool
 Stream event to an IServerSvc, which typically is a network server run from and controlled by the Athena application. More...
 
class  TauJetRetriever
 Retrieves all TauJet objects. More...
 
class  TgcPrepDataRetriever
 
class  ThreadCollection
 This class handles a collection of threads. More...
 
class  TrackParticleRetriever
 Retrieves all TrackParticle (AOD) Collection objects This is a chopped version of the full (RDO/ESD) Trk::Track retriever TrigJiveXML/TrackRetriever. More...
 
class  TrackRetriever
 Retrieves all Trk::TrackCollection objects. More...
 
class  TrigEMClusterRetriever
 
class  TriggerInfoRetriever
 
class  TrigMuonROIRetriever
 
class  TrigRpcDataRetriever
 
class  TrigSiSpacePointRetriever
 
class  TRTRetriever
 Retrieves all InDet::TRT_DriftCircle objects. More...
 
class  TruthMuonTrackRetriever
 Retrieves the muons information from the TrackRecordCollection. More...
 
class  TruthParticleRetriever
 
class  TruthTrackRetriever
 Retrieves the McEventCollection or the TrackRecordCollection in simulated cosmics. More...
 
class  VertexRetriever
 Retrieves all Trk::VxCandidate objects. More...
 
class  xAODCaloClusterRetriever
 Retrieves all Calo Cluster objects. More...
 
class  xAODElectronRetriever
 Retrieves all Electron objects (ElectronAODCollection etc.) More...
 
class  xAODEmTauROIRetriever
 
class  xAODJetRetriever
 Retrieves all Jet objects (JetAODCollection etc.) More...
 
class  xAODJetROIRetriever
 
class  xAODMissingETRetriever
 Retrieves all MissingET objects (MissingETAODCollection etc.) More...
 
class  xAODMuonRetriever
 Retrieves all Muon objects (MuonAODCollection etc.) More...
 
class  xAODMuonROIRetriever
 
class  xAODPhotonRetriever
 Retrieves all Photon objects (PhotonAODCollection etc.) More...
 
class  xAODTauRetriever
 Retrieves all Tau objects (TauAODCollection etc.) More...
 
class  xAODTrackParticleRetriever
 Retrieves all TrackParticle objects (TrackParticleAODCollection etc.) More...
 
class  xAODTrigDecisionRetriever
 
class  xAODTriggerTowerRetriever
 Retrieves TriggerTower xAOD objects. More...
 
class  xAODVertexRetriever
 Retrieves all Vertex objects (VertexAODCollection etc.) More...
 
class  XMLFormatTool
 Writes data stored in a DataMap into an XML stream in the format required by the Atlantis event display. More...
 

Typedefs

typedef std::vector< DataTypeDataVect
 Defines a map with a key and a vector of DataType objects e.g. More...
 
typedef std::map< std::string, DataVectDataMap
 
typedef std::pair< std::string, std::string > TagType
 Defines a tag as a pair of strings. More...
 
typedef std::pair< const EventStreamID, const std::string > EventStreamPair
 A map that stores events according to their EventStreamID Due to the way EventStreamID is build, events will be sorted by their stream name. More...
 
typedef std::map< const EventStreamID, const std::string > EventStreamMap
 
typedef struct Streams_t Streams
 Data structures for GetStreams functions. More...
 
typedef struct EventRequest_t EventRequest
 Data structures for GetEvent functions. More...
 
typedef struct Event_t Event
 
typedef struct ServerThreadArguments_t ServerThreadArguments
 Arguments handed over fromt the main (Athena) thread to the server thread. More...
 
typedef struct DispatchThreadArguments_t DispatchThreadArguments
 Arguments handed over fromt the main server thread to the thread dispatching the request (one for each request) More...
 

Functions

std::ostream & operator<< (std::ostream &os, const DataType &dt)
 Allow this to be streamed in an ostream. More...
 
bool checkResult (const int RetVal, const std::string &Module, IMessage *const ServerSvc)
 Simple result checking routine, that will output an errorMsg throught the ServerSvc if there was an error. More...
 
void ReturnNull (SVCXPRT *transp, IServer *const ServerSvc)
 Implementation of NULLPROC Return nothing - server has just been pinged. More...
 
void ReturnState (SVCXPRT *transp, IServer *const ServerSvc)
 Implementation of ONCRPC_ATHENASTATUS_PROC Return the current athena status in XDR representation. More...
 
void ReturnStreams (SVCXPRT *transp, IServer *const ServerSvc)
 Implementation of ONCRPC_GETSTREAMS_PROC Return the currently available event streams. More...
 
void ReturnEvent (SVCXPRT *transp, const EventRequest *eventReq, IServer *const ServerSvc)
 Implementation of ONCRPC_GETEVENT_PROC Return an event from a certain streams. More...
 
void SetNewEvent (SVCXPRT *transp, const Event *event, IServer *const ServerSvc)
 Implementation of ONCRPC_SETEVENT_PROC Set a new event for a certain streams. More...
 
void * ONCRPCServerThread (void *args)
 This is the actual server thread, which takes above arguments. More...
 
void * ONCRPCDispatchThread (void *args)
 This is the thread handling the request - one thread per request. More...
 
void ONCRPCRequestHandler (struct svc_req *rqstp, SVCXPRT *transp)
 The Request handler is called from the RPC kernel routines - hence extern C It creates a new dispatch thread and returns. More...
 
bool_t xdr_streams (XDR *xdrsp, Streams *streams)
 De- and Encoding of Streams_t. More...
 
bool_t xdr_event_req (XDR *xdrsp, EventRequest *eventReq)
 De-/Encoding of EventRequest_t. More...
 
bool_t xdr_event (XDR *xdrsp, Event *event)
 De-/Encoding of Event_t. More...
 
void ONCRPCCleanupHandler (void *args)
 This cleanup handler is called whenever the server thread exits. More...
 
void manualPerigeeMatch (const Trk::Perigee *per1, const Trk::Perigee *per2, bool &matched)
 Manually match measured perigee d0,z0,phi0 of Trk::Track and Rec::TrackParticle, some problem with direct match depite identical values (maybe worth trying again). More...
 

Variables

const unsigned int NSTREAMMAX = 1024
 
const unsigned int NBYTESMAX = 0x1u << (sizeof( unsigned int )*8 - 1)
 
ThreadCollection *const dispatchThreads = new ThreadCollection()
 
pthread_key_t ServerSvcKey ATLAS_THREAD_SAFE
 

Detailed Description

This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.

Migrated to new TrigDecisionTool described here https://twiki.cern.ch/twiki/bin/view/Atlas/TrigDecisionTool15.

These are the XDR procedures that are used to encode/decode the data which is transfered inbetween client and server in the XDR (eXternal Data Representation).

It defines

format. This format is platform independant ( see standards RFC 1832 and RFC 4506).

Typedef Documentation

◆ DataMap

typedef std::map<std::string, DataVect > JiveXML::DataMap

Definition at line 59 of file DataType.h.

◆ DataVect

typedef std::vector<DataType> JiveXML::DataVect

Defines a map with a key and a vector of DataType objects e.g.

"CellID" and a vector of cell IDs

Definition at line 58 of file DataType.h.

◆ DispatchThreadArguments

Arguments handed over fromt the main server thread to the thread dispatching the request (one for each request)

Definition at line 34 of file ONCRPCServerThreads.h.

◆ Event

typedef struct Event_t JiveXML::Event

Definition at line 40 of file ONCRPCServer.h.

◆ EventRequest

Data structures for GetEvent functions.

Definition at line 40 of file ONCRPCServer.h.

◆ EventStreamMap

typedef std::map< const EventStreamID, const std::string> JiveXML::EventStreamMap

Definition at line 87 of file EventStream.h.

◆ EventStreamPair

typedef std::pair< const EventStreamID, const std::string> JiveXML::EventStreamPair

A map that stores events according to their EventStreamID Due to the way EventStreamID is build, events will be sorted by their stream name.

std::map::find(key) and operator[] will return the event that belongs to this stream. In order to compare for identity of events use EventStreamID::isSameEvent()

Definition at line 86 of file EventStream.h.

◆ ServerThreadArguments

Arguments handed over fromt the main (Athena) thread to the server thread.

Definition at line 17 of file ONCRPCServerThreads.h.

◆ Streams

typedef struct Streams_t JiveXML::Streams

Data structures for GetStreams functions.

Definition at line 40 of file ONCRPCServer.h.

◆ TagType

typedef std::pair<std::string,std::string> JiveXML::TagType

Defines a tag as a pair of strings.

Definition at line 62 of file DataType.h.

Function Documentation

◆ checkResult()

bool JiveXML::checkResult ( const int  RetVal,
const std::string &  Module,
IMessage *const  ServerSvc 
)

Simple result checking routine, that will output an errorMsg throught the ServerSvc if there was an error.

Returns false on error;

Definition at line 24 of file ONCRPCServerProcs.cxx.

24  {
25 
26  //Immediately return on no error
27  if (RetVal == 0) return true ;
28 
29  //If there was an error, assemble the message
30  std::ostringstream msg;
31  char errbuf[256];
32  msg << "Error in " << Module << ": " << strerror_r(RetVal, errbuf, sizeof(errbuf));
33 
34  //Output the message via the ServerSvc
35  ServerSvc->Message(MSG::ERROR,msg.str());
36 
37  //In case of error return false
38  return false ;
39  }

◆ manualPerigeeMatch()

void JiveXML::manualPerigeeMatch ( const Trk::Perigee per1,
const Trk::Perigee per2,
bool &  matched 
)

Manually match measured perigee d0,z0,phi0 of Trk::Track and Rec::TrackParticle, some problem with direct match depite identical values (maybe worth trying again).

Definition at line 61 of file VertexRetriever.cxx.

62  {
63 
64  double diff1 = ( per1->parameters()[Trk::d0] -
65  per2->parameters()[Trk::d0] );
66  double diff2 = ( per1->parameters()[Trk::z0] -
67  per2->parameters()[Trk::z0] );
68  double diff3 = ( per1->parameters()[Trk::phi0] -
69  per2->parameters()[Trk::phi0] );
70  double diff4 = ( per1->charge() -
71  per2->charge() );
72  double diff5 = ( per1->pT() -
73  per2->pT() );
74 
75  matched = diff1+diff2+diff3+diff4+diff5 == 0.;
76  }

◆ ONCRPCCleanupHandler()

void JiveXML::ONCRPCCleanupHandler ( void *  args)

This cleanup handler is called whenever the server thread exits.

Definition at line 241 of file ONCRPCServerThreads.cxx.

241  {
242  //Since this cleanup handler is associated with the IServer*
243  //we will get exactly this as an argument
244  ((JiveXML::IServer*)args)->Message(MSG::INFO,"Finished ONCRPC server thread");
245  //Also call the servers callback
246  ((JiveXML::IServer*)args)->ServerThreadStopped();
247  }

◆ ONCRPCDispatchThread()

void * JiveXML::ONCRPCDispatchThread ( void *  args)

This is the thread handling the request - one thread per request.

This is the dispatch function, which does the actual calls of the ServerSvc routines.

Many of these dispatch requests may be running at the same time, each in its own thread.

Definition at line 42 of file ONCRPCServerThreads.cxx.

42  {
43 
44  //Get the thread arguments
45  const struct svc_req* rqstp = ((DispatchThreadArguments*)args)->rqstp;
46  const EventRequest* eventRequest = ((DispatchThreadArguments*)args)->evtReq;
47  const Event* event = ((DispatchThreadArguments*)args)->evt;
48  IServer* const ServerSvc = ((DispatchThreadArguments*)args)->ServerSvcPtr;
49 
50  //we have stored the arguments, so delete the object
52 
53  try {
54 
55  //Now first of all register myself with the ServerSvc;
56  dispatchThreads->AddThread(pthread_self());
57  //Tell them the thread number if they want to know
58  std::ostringstream msg; msg << "Created new dispatch thread " << pthread_self();
59  ServerSvc->Message(MSG::VERBOSE,msg.str());
60 
61  //Process the request
62  switch (rqstp->rq_proc){
63  //NULLPROC - no data exchanged, just pinging for response
64  case NULLPROC:
65  ReturnNull(rqstp->rq_xprt, ServerSvc);
66  break ;
67  //GETSTATUS - return the current athena status
69  ReturnState(rqstp->rq_xprt, ServerSvc);
70  break ;
71  //GETSTREAMS - return the names of the available streams
73  ReturnStreams(rqstp->rq_xprt, ServerSvc);
74  break ;
75  //GETEVENT - return the current event in a given stream
77  ReturnEvent(rqstp->rq_xprt, eventRequest, ServerSvc);
78  break ;
79  //GETEVENT - return the current event in a given stream
81  SetNewEvent(rqstp->rq_xprt, event, ServerSvc);
82  break ;
83  default:
84  std::ostringstream msg;
85  msg << "Client request for server procedure #" << rqstp->rq_proc << " which is not defined";
86  ServerSvc->Message(MSG::WARNING, msg.str());
87  svcerr_noproc(rqstp->rq_xprt);
88  break ;
89  }
90 
91  //We have dealt with the request, delete it
92  delete rqstp;
93  delete event;
94  delete eventRequest;
95 
96  //Finally unregister myself with the ServerSvc
97  //Note that this will also detach the thread, so this has to be the last
98  //statement before the thread returns
99  dispatchThreads->RemoveThread(pthread_self());
100 
101  } catch (std::exception &e){
102  std::ostringstream msg; msg << "Caught exception in DispatchThread: " << e.what();
103  ServerSvc->Message(MSG::ERROR,msg.str());
104  }
105 
106  return NULL;
107  }

◆ ONCRPCRequestHandler()

void JiveXML::ONCRPCRequestHandler ( struct svc_req *  rqstp,
SVCXPRT *   
)

The Request handler is called from the RPC kernel routines - hence extern C It creates a new dispatch thread and returns.

This function handles all the requests that are received from the server by creating a new thread for each request.

For request with an input value the input parameters are extracted first, as svc_getreqset is not thread safe.

Definition at line 116 of file ONCRPCServerThreads.cxx.

116  {
117 
118  //Get the ServerSvc pointer for this thread
119  JiveXML::IServer* const ServerSvc = (JiveXML::IServer*)pthread_getspecific(ServerSvcKey);
120  std::ostringstream msg; msg << "Request handler in thread " << pthread_self();
121  ServerSvc->Message(MSG::VERBOSE,msg.str()); msg.str("");
122 
123  try {
124 
125  //Check wether it is worth retrievin caller information
126  if ( ServerSvc->LogLevel() <= MSG::DEBUG ){
127 
128  //Get information about the requester
129  auto caller = (struct sockaddr* )svc_getcaller(rqstp->rq_xprt);
130  char port[NI_MAXSERV];
131  char host[NI_MAXHOST];
132  char IPAddr[INET6_ADDRSTRLEN];
133 
134  //assemble a message
135  msg << "Request from host ";
136  //Add host name if we have one
137  if(getnameinfo(caller, rqstp->rq_xprt->xp_addrlen,
138  host, sizeof host,
139  nullptr, 0,
140  0) == 0)
141  msg << host << " ";
142  //Add ip-address and port
143  if(getnameinfo(caller, rqstp->rq_xprt->xp_addrlen,
144  IPAddr, sizeof IPAddr,
145  port, sizeof port,
146  NI_NUMERICSERV | NI_NUMERICHOST) == 0)
147  msg << "(" << IPAddr << ") on port " << port;
148  //Deliver the message
149  ServerSvc->Message(MSG::DEBUG,msg.str()); msg.str("");
150  }
151 
152  //Prepare the dispatch thread argument structure making a copy of the
153  //request, so it sticks around if this thread is gone
154  DispatchThreadArguments DpThreadArgs(ServerSvc, new svc_req(*rqstp), NULL, NULL);
155 
156  //Check for input data to the request
157  switch (rqstp->rq_proc){
158 
159  case ONCRPC_GETEVENT_PROC: {
160  //Create structure to hold request arguments on the head so we can
161  //forward it to the dispatch thread.
162  //NOTE: This is a C-struct that MUST be initalized.
163  //It will be cleaned up by the dispatch thread
164  EventRequest* evtReq = new EventRequest;
165  evtReq->EventNumber=-2;evtReq->RunNumber=-2;evtReq->StreamName=NULL;
166 
167  //Retrieve the request arguments
168  if (!svc_getargs(rqstp->rq_xprt,(xdrproc_t)xdr_event_req,(caddr_t)evtReq)){
169  checkResult(errno,"creating dispatch tread arguments from GETEVENT call",ServerSvc);
170  //tell the client his request failed
171  svcerr_decode(rqstp->rq_xprt);
172  //return immediately from this request
173  return ;
174  }
175 
176  //Set the event request argument
177  DpThreadArgs.evtReq = evtReq;
178  break;
179 
180  } case ONCRPC_SETEVENT_PROC: {
181  //Create structure to hold request arguments on the HEAP so we can
182  //forward it to the dispatch thread.
183  //NOTE: This is a C-struct that MUST be initalized
184  //It will be cleaned up by the dispatch thread
185  Event* evt = new Event;
186  evt->EventNumber=-2;evt->RunNumber=-2;evt->StreamName=NULL;evt->NBytes=0;evt->EventData=NULL;
187 
188  //Retrieve the request arguments
189  if (!svc_getargs(rqstp->rq_xprt,(xdrproc_t)xdr_event,(caddr_t)evt)){
190  checkResult(errno,"creating dispatch tread arguments from SETEVENT call",ServerSvc);
191  //tell the client his request failed
192  svcerr_decode(rqstp->rq_xprt);
193  //return immediately from this request
194  return ;
195  }
196 
197  //Set the event request argument
198  DpThreadArgs.evt = evt;
199  break;
200  }
201  }
202 
203  //Check for errors in all pthread functions
204  int retVal = 0;
205 
206  //Generate thread attributes
207  pthread_attr_t attr; retVal = pthread_attr_init (&attr);
208  if ( ! checkResult(retVal,"request handler initializing thread attributes",ServerSvc)) return ;
209 
210  //Removing the limit on the thread memory usage as a test. Suspect that some threads do not have enough memory to finish and therefore eat up all the memory.
211  //retVal = pthread_attr_setstacksize(&attr,10*PTHREAD_STACK_MIN);
212  if ( ! checkResult(retVal,"request handler setting thread stacksize",ServerSvc)) return ;
213 
214  //NOTE: All threads are first created joinable, so we can wait for the to
215  //finish using pthread_detach. Yet, when the thread removes itself from
216  //the ThreadCollection, it will detach itself, so no memory is lost.
217  retVal = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
218  if ( ! checkResult(retVal,"request handler setting thread detach state",ServerSvc)) return;
219 
220  //Create a new thread
221  pthread_t dispatchThread;
222  retVal = pthread_create(&dispatchThread,&attr,&ONCRPCDispatchThread,new DispatchThreadArguments(DpThreadArgs));
223  if ( ! checkResult(retVal,"request handler creating dispatch thread",ServerSvc)) return;
224 
225  //And wait till it has registered itself with the ThreadCollection
227 
228  //release thread attributs
229  retVal = pthread_attr_destroy(&attr);
230  if ( ! checkResult(retVal,"request handler destroying thread attributes",ServerSvc)) return;
231 
232  } catch (std::exception &e){
233  std::ostringstream msg; msg << "Caught exception in RequestHandler: " << e.what();
234  ServerSvc->Message(MSG::ERROR,msg.str());
235  }
236  }

◆ ONCRPCServerThread()

void * JiveXML::ONCRPCServerThread ( void *  args)

This is the actual server thread, which takes above arguments.

Main server therad.

Check wether the the portmapper is up and if it already has another instance of this server registered

Check wether the the portmapper is up and if it already has another instance of this server registered

Definition at line 252 of file ONCRPCServerThreads.cxx.

252  {
253 
254  //Get a pointer to the Service that started this thread
255  JiveXML::IServer* const ServerSvc = (*( ServerThreadArguments* )args).ServerPtr;
256  //Get the port number from the thread arguments
257  const int PortNumber = (*( ServerThreadArguments* )args).PortNumber;
258 
259  //We've got the arguments and can delete the struct
260  delete (ServerThreadArguments*)args;
261 
262  //Save the arguments in a thread-specific keys
263  //Once the thread exits, the specified cleanup handler is called,
264  //which in our case is used to notify the IServer of the thread termination
265  int retVal = 0;
266  retVal = pthread_key_create(&ServerSvcKey,ONCRPCCleanupHandler);
267  if (! checkResult(retVal,"server thread creating thread-specific key",ServerSvc)) pthread_exit(NULL);
268  retVal = pthread_setspecific(ServerSvcKey, ServerSvc);
269  if (! checkResult(retVal,"server thread setting thread-specific key",ServerSvc)) pthread_exit(NULL);
270 
271  try {
272 
273  //Also install cleanup handlers if they are given as arguments
274 
275  //Send a message to the messaging function of the service
276  ServerSvc->Message(MSG::INFO,"Started ONCRPC server thread");
277 
278  //Check wether the runServerThread flag is set
279  if (!ServerSvc->GetRunServerFlag()){
280  ServerSvc->Message(MSG::WARNING,"The run server flag is not set - stopping server thread immediately");
281  pthread_exit(NULL);
282  }
283 
288  //Get my address
289  struct sockaddr_in my_addr; get_myaddress(&my_addr);
290  //Try get the portnumber of that process
291  unsigned short port = pmap_getport(&my_addr, ONCRPCSERVERPROG,ONCRPCSERVERVERS,IPPROTO_TCP);
292  //Check if some program has already been registered
293  if ( port != 0 ){
294  //First report it
295  std::ostringstream msg; msg << "Program with program number " << ONCRPCSERVERPROG
296  << " already registered with portmapper on local host";
297  ServerSvc->Message(MSG::INFO,msg.str());
298  //Next check if it is alive by creating a client and calling its NULLPROC
299  CLIENT* client = clnt_create("localhost", ONCRPCSERVERPROG,ONCRPCSERVERVERS, "tcp");
300  if (client != NULL){
301 // xdr_void is defined inconsistently in xdr.h and gets a warning from gcc8.
302 #if __GNUC__ >= 8
303 # pragma GCC diagnostic push
304 # pragma GCC diagnostic ignored "-Wcast-function-type"
305 #endif
306  struct timeval timeout; timeout.tv_sec = 1; timeout.tv_usec = 0;
307  clnt_stat ret = clnt_call(client, NULLPROC, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_void, NULL, timeout);
308 #if __GNUC__ >= 8
309 # pragma GCC diagnostic pop
310 #endif
311  if (ret == RPC_SUCCESS){
312  //So we already have a server, and it is alive -- then we don't start
313  ServerSvc->Message(MSG::ERROR,"Server exists and is alive on local host - stopping this thread");
314  pthread_exit(NULL);
315  } else ServerSvc->Message(MSG::WARNING,"Existing server does not respond");
316  } else ServerSvc->Message(MSG::WARNING,"Can not create client for existing server");
317 
318  //Now just force a clearing of the portmap entry
319  ServerSvc->Message(MSG::WARNING,"Clearing existing portmap entry!");
320  pmap_unset(ONCRPCSERVERPROG, ONCRPCSERVERVERS);
321 
322  //Finally clear the error entry by trying to get the port number again
323  port = pmap_getport(&my_addr, ONCRPCSERVERPROG,ONCRPCSERVERVERS,IPPROTO_TCP);
324  }
325 
326  //We should have left either the first or the second call to pmap_getport
327  // with "program not registered" , which is returned as RPC_PROGNOTREGISTERD
328  //or RPC_SYSTEMERROR. However, we could also have failed contacting the portmapper
329  if ((rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED) &&
330  (rpc_createerr.cf_stat != RPC_SYSTEMERROR )){
331  ServerSvc->Message(MSG::ERROR,clnt_spcreateerror("Failed querying portmapper on local host for existing servers"));
332  pthread_exit(NULL);
333  }
334 
335  //The socket to connect to, not bound to a specifc port by default
336  int server_socket = RPC_ANYSOCK;
337 
338  //Check if a specific port was requested
339  if (PortNumber != 0){
340 
341  //Create a socket
342  if ((server_socket = socket(AF_INET, SOCK_STREAM, 0)) != 0) {
343  checkResult(errno,"server thread creating socket",ServerSvc);
344  pthread_exit(NULL);
345  }
346 
347  //Create an inet address with the given port number
348  struct sockaddr_in server_addr;
349  server_addr.sin_family = AF_INET; //IPv4 address
350  server_addr.sin_addr.s_addr = INADDR_ANY; //will bind all interfaces
351  server_addr.sin_port = htons(PortNumber); //port number in network byte order
352  memset(&server_addr.sin_zero, 0, sizeof(server_addr.sin_zero)); //zero padding
353 
354  //Now bind the socket to that inet address
355  if (bind(server_socket, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) != 0){
356  std::ostringstream msg; msg << "server thread binding socket to port " << PortNumber;
357  checkResult(errno,msg.str(),ServerSvc);
358  pthread_exit(NULL);
359  }
360  std::ostringstream msg; msg << "Successfully bound port " << PortNumber;
361  ServerSvc->Message(MSG::INFO,msg.str());
362  }
363 
364  //Get a transport handle using default buffer sizes
365  SVCXPRT * transp = svctcp_create(server_socket, 0, 0);
366 
367  //Check result
368  if (transp == NULL) {
369  ServerSvc->Message(MSG::ERROR,"Opening TCP socket failed");
370  pthread_exit(NULL);
371  }
372 
373  //Next register our server with the RPC daemon
374 #ifndef __APPLE__
375  if (! svc_register(transp,ONCRPCSERVERPROG,ONCRPCSERVERVERS,ONCRPCRequestHandler,IPPROTO_TCP)){
376 #else
377  if (! svc_register(transp,ONCRPCSERVERPROG,ONCRPCSERVERVERS,(void (*)())ONCRPCRequestHandler,IPPROTO_TCP)){
378 #endif
379  ServerSvc->Message(MSG::ERROR,"Could not register ONCRPC Server with RPC daemon");
380  checkResult(errno,"registering ONCRPC Server with RPC daemon",ServerSvc);
381  pthread_exit(NULL);
382  }
383 
384  //A set of socket file descriptors
385  fd_set SocketFileDescriptorSet;
386  //Size of the socket handle table
387  int NFileDescriptors = FD_SETSIZE;
388 
389  //Count the number of requests we have received while running
390  unsigned long NRequests = 0;
391 
392  do {
393 
394  ServerSvc->Message(MSG::VERBOSE,"Waiting for call...");
395 
396  //Get the file descriptor set
397  SocketFileDescriptorSet = svc_fdset;
398 
399  //Wait for input on any of these using select:
400  // - first NULL: not cecking for readiness to write to socket
401  // - second NULL: not checking for socket conditions
402  // - third NULL: timeout - wait forever
403  int ret = select(NFileDescriptors,&SocketFileDescriptorSet,NULL,NULL,NULL);
404  // Check result
405  switch (ret){
406  // an error occured
407  case -1:
408  // If just an interrupt continue
409  if ( errno == EINTR ) continue ;
410  // Else show error
411  checkResult(errno,"server thread returning from select",ServerSvc);
412  return NULL;
413  // a timeout occured - break the loop
414  case 0:
415  break ;
416  // activity on one of the sockets
417  default:
418  //Count number of requests
419  ++NRequests;
420  // Get the requests from the sockets
421  svc_getreqset(&SocketFileDescriptorSet);
422  }
423  } while ( ServerSvc->GetRunServerFlag() );
424 
425  ServerSvc->Message(MSG::DEBUG,"Serving loop finished");
426 
427  //Unregister the service, so no clients can connect anymore
428  svc_unregister(ONCRPCSERVERPROG,ONCRPCSERVERVERS);
429 
430  //Also stop all the dispatching threads, which need to finish before this
431  //one. Otherwise the server will become invalid, before all requests are
432  //served
433 
434  //Tell how many threads we are waiting for
435  std::ostringstream msg; msg << "Waiting for " << dispatchThreads->NumberOfThreads() << " open dispatch threads to terminate ... ";
436  ServerSvc->Message(MSG::INFO,msg.str());
437  //Then wait for them all to finish
439  //Tell when we are done
440  ServerSvc->Message(MSG::INFO, " ... finished all dispatch threads");
441 
442  //Now that the threads are stopped we can finish the transport protocol and
443  //close the port
444  svc_destroy(transp);
445 
446  //Return number of requests - as all local variables will disappear,
447  //the return value needs to be allocated on the heap;
448  unsigned long* NReqPtr = new unsigned long(NRequests);
449  //Terminate this thread
450  pthread_exit(NReqPtr);
451 
452  } catch (std::exception &e){
453  std::ostringstream msg; msg << "Caught exception in ServerThread: " << e.what();
454  ServerSvc->Message(MSG::ERROR,msg.str());
455  }
456 
457  return NULL;
458  }

◆ operator<<()

std::ostream & JiveXML::operator<< ( std::ostream &  os,
const DataType dt 
)

Allow this to be streamed in an ostream.

Allow the DataType to be streamed in an ostream.

Parameters
osthe stream
dtthe DataType object

Definition at line 27 of file DataType.cxx.

27  {
28  return os << dt.toString();
29  }

◆ ReturnEvent()

void JiveXML::ReturnEvent ( SVCXPRT *  transp,
const EventRequest eventReq,
IServer *const  ServerSvc 
)

Implementation of ONCRPC_GETEVENT_PROC Return an event from a certain streams.

Return the actual event for a requested stream, only if.

  • the stream is available
  • this is not the same event as the user had already asked for
  • otherwise, set flags accordingly in the return structure

Definition at line 105 of file ONCRPCServerProcs.cxx.

105  {
106 
107  //Check if there was an event request
108  std::ostringstream msg;
109  if (! eventReq ) {
110  msg << "Request to return event with void event request structure";
111  ServerSvc->Message(MSG::ERROR,msg.str());
112  svcerr_systemerr(transp);
113  return ;
114  }
115 
116  //Be a bit verbose
117  msg << "Request for stream " << eventReq->StreamName
118  << " with existing event " << eventReq->EventNumber
119  << " from run " << eventReq->RunNumber;
120  //Send message an clear stream
121  ServerSvc->Message(MSG::DEBUG,msg.str()); msg.str("");
122 
123  //Next get the current eventStreamID from that stream
124  EventStreamID currEvtStreamID = ServerSvc->GetEventStreamID(eventReq->StreamName);
125 
126  //Also get an event stream ID for the requested event
127  EventStreamID reqEvtStreamID(eventReq->EventNumber,eventReq->RunNumber,eventReq->StreamName);
128 
129  //We got all the data from the request, so delete it
130  caddr_t nc_eventReq ATLAS_THREAD_SAFE = (caddr_t)eventReq;
131  xdr_free((xdrproc_t)xdr_event_req,nc_eventReq);
132 
133  //Prepare response structure
134  Event event;
135  event.isAvailable = false ;
136  event.isIdentical = false ;
137  event.isCompressed = false ;
138  event.EventNumber = currEvtStreamID.EventNumber();
139  event.RunNumber = currEvtStreamID.RunNumber();
140  event.StreamName = currEvtStreamID.StreamNameCStr();
141  event.NBytes = 0; event.EventData = NULL ;
142 
143  //Check if such a stream was currently found
144  if (!currEvtStreamID.isValid()) {
145  // Sending reply with "no such stream" - i.e unmodified event structure
146  msg << "Sending response NO SUCH STREAM "; ServerSvc->Message(MSG::DEBUG,msg.str());
147  if (!svc_sendreply(transp, (xdrproc_t)xdr_event, (caddr_t)&event))
148  checkResult(errno,"dispatch thread sending reply to GETEVENT call",ServerSvc);
149  return ;
150  } else
151  //We have an event in that stream
152  event.isAvailable = true ;
153 
154  //Check if this is the same event the user already has
155  if ( currEvtStreamID.isSameEvent(reqEvtStreamID) ){
156  // Set the same event flag
157  event.isIdentical = true ;
158  // Sending reply with "same event"
159  msg << "Sending response SAME EVENT "; ServerSvc->Message(MSG::DEBUG,msg.str());
160  if (!svc_sendreply(transp, (xdrproc_t)xdr_event, (caddr_t)&event))
161  checkResult(errno,"dispatch thread sending reply to GETEVENT call",ServerSvc);
162  return ;
163  }
164 
165  //Otherwise just get the event itself
166  std::string evt = ServerSvc->GetEvent( currEvtStreamID );
167  event.EventData = evt.c_str();
168  event.NBytes = strlen(evt.c_str())+1; //including null-termination character
169  //Send reply with an actual event
170  msg << "Sending response NEW EVENT (" << event.EventNumber << ","<< event.RunNumber << ")" ;
171  ServerSvc->Message(MSG::DEBUG,msg.str());
172  if (!svc_sendreply(transp, (xdrproc_t)xdr_event, (caddr_t)&event))
173  checkResult(errno,"dispatch thread sending reply to GETEVENT call",ServerSvc);
174 
175  //No need to use xdr_free to free the returned event object since we did
176  //not allocate resources for it (just point the pointers to the proper place).
177  }

◆ ReturnNull()

void JiveXML::ReturnNull ( SVCXPRT *  transp,
IServer *const  ServerSvc 
)

Implementation of NULLPROC Return nothing - server has just been pinged.

Definition at line 45 of file ONCRPCServerProcs.cxx.

45  {
46 // xdr_void is defined inconsistently in xdr.h and gets a warning from gcc8.
47 #if __GNUC__ >= 8
48 # pragma GCC diagnostic push
49 # pragma GCC diagnostic ignored "-Wcast-function-type"
50 #endif
51  if (!svc_sendreply(transp, (xdrproc_t)xdr_void, 0))
52  //check global errno variable on result
53  checkResult(errno,"dispatch thread sending reply to NULLPROC call",ServerSvc);
54  }

◆ ReturnState()

void JiveXML::ReturnState ( SVCXPRT *  transp,
IServer *const  ServerSvc 
)

Implementation of ONCRPC_ATHENASTATUS_PROC Return the current athena status in XDR representation.

Implementation of ONCRPC_GETSTATUS_PROC Return the current athena status in XDR representation.

Definition at line 63 of file ONCRPCServerProcs.cxx.

63  {
64  int state = ServerSvc->GetState();
65  if (!svc_sendreply(transp, (xdrproc_t)xdr_int, (caddr_t)&state))
66  //check global errno variable on result
67  checkResult(errno,"dispatch thread sending reply to GETSTATUS call",ServerSvc);
68  }

◆ ReturnStreams()

void JiveXML::ReturnStreams ( SVCXPRT *  transp,
IServer *const  ServerSvc 
)

Implementation of ONCRPC_GETSTREAMS_PROC Return the currently available event streams.

Return the names of all the streams that are available at the server.

Definition at line 73 of file ONCRPCServerProcs.cxx.

73  {
74 
75  // First of all get the list of names
76  std::vector<std::string> StreamNames = ServerSvc->GetStreamNames();
77 
78  // Create a new XDR data structure to fill in the streams
79  Streams XDRStreams;
80 
81  // Fill in number of streams
82  XDRStreams.NStreams = StreamNames.size();
83 
84  //Create a new array with the stream names
85  XDRStreams.StreamNames = (char**) malloc(StreamNames.size()*sizeof(char*));
86 
87  //Fill in all the names themselves
88  for ( unsigned int iName = 0; iName < StreamNames.size(); ++iName)
89  XDRStreams.StreamNames[iName] = strdup(StreamNames[iName].c_str());
90 
91  //return that object
92  if (!svc_sendreply(transp, (xdrproc_t)xdr_streams, (caddr_t)&XDRStreams))
93  checkResult(errno,"dispatch thread sending reply to GETSTREAMS call",ServerSvc);
94 
95  //Afterwards free the object
96  xdr_free((xdrproc_t)xdr_streams,(caddr_t)&XDRStreams);
97  }

◆ SetNewEvent()

void JiveXML::SetNewEvent ( SVCXPRT *  transp,
const Event event,
IServer *const  ServerSvc 
)

Implementation of ONCRPC_SETEVENT_PROC Set a new event for a certain streams.

Set a new event for a given stream.

Definition at line 182 of file ONCRPCServerProcs.cxx.

182  {
183 
184  //Check if there was a valid event request
185  //NOTE: Event number can be 0, run number can not
186  std::ostringstream msg;
187  if ( (!event) || (event->EventNumber<0) || (!event->RunNumber) || (!event->StreamName) ) {
188  msg << "Request to set new event with void or invalid event structure";
189  ServerSvc->Message(MSG::ERROR,msg.str());
190  svcerr_systemerr(transp);
191  return ;
192  }
193 
194  //Be a bit verbose
195  msg << "Request to set new event " << event->EventNumber
196  << " from run " << event->RunNumber
197  << " for stream " << event->StreamName;
198  //Send message an clear stream
199  ServerSvc->Message(MSG::DEBUG,msg.str()); msg.str("");
200 
201  //The success flag returned to the client
202  //Need to use bool_t (4bytes) instead of bool (1byte)!
203  bool_t isSuccess=false;
204 
205  //Create a new EventStreamID from the data we have got
206  EventStreamID newEvtStreamID(event->EventNumber,event->RunNumber,event->StreamName);
207 
208  //Make sure this ID is valid
209  if (! newEvtStreamID.isValid()) {
210  msg << "Request to set new event with invalid stream name or event/run number";
211  ServerSvc->Message(MSG::ERROR,msg.str());
212  if (!svc_sendreply(transp, (xdrproc_t)xdr_bool, (caddr_t)&isSuccess))
213  checkResult(errno,"dispatch thread sending reply to SETEVENT call",ServerSvc);
214  return ;
215  }
216 
217  //And make sure there is data
218  if ((! event->EventData ) || (strlen(event->EventData) == 0)){
219  msg << "Request to set new event with invalid event data";
220  ServerSvc->Message(MSG::ERROR,msg.str());
221  if (!svc_sendreply(transp, (xdrproc_t)xdr_bool, (caddr_t)&isSuccess))
222  checkResult(errno,"dispatch thread sending reply to SETEVENT call",ServerSvc);
223  return ;
224  }
225 
226  //Also make sure it has the proper length
227  if ( strlen(event->EventData) != event->NBytes -1 ){
228  msg << "Event string length does not match claimed number of bytes (null-termination problem?)";
229  ServerSvc->Message(MSG::ERROR,msg.str());
230  if (!svc_sendreply(transp, (xdrproc_t)xdr_bool, (caddr_t)&isSuccess))
231  checkResult(errno,"dispatch thread sending reply to SETEVENT call",ServerSvc);
232  return ;
233  }
234  //Get the event data
235  std::string EvtData(event->EventData);
236 
237  //Now set the event at the server
238  if (ServerSvc->UpdateEventForStream( newEvtStreamID, EvtData).isSuccess())
239  //and set the success flag
240  isSuccess = true;
241 
242  //Show the result
243  msg << "Sending response for set new event: ";
244  if (isSuccess) msg << " SUCCESS!"; else msg << " FAILED!";
245  ServerSvc->Message(MSG::DEBUG,msg.str());
246  //Send the reply
247  if (!svc_sendreply(transp, (xdrproc_t)xdr_bool, (caddr_t)&isSuccess))
248  checkResult(errno,"dispatch thread sending reply to SETEVENT call",ServerSvc);
249 
250  //Afterwards free the object
251  caddr_t nc_event ATLAS_THREAD_SAFE = (caddr_t)event;
252  xdr_free((xdrproc_t)xdr_event,nc_event);
253  }

◆ xdr_event()

bool_t JiveXML::xdr_event ( XDR *  xdrsp,
Event event 
)

De-/Encoding of Event_t.

Definition at line 51 of file ONCRPCXDRProcs.cxx.

51  {
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  }

◆ xdr_event_req()

bool_t JiveXML::xdr_event_req ( XDR *  xdrsp,
EventRequest eventReq 
)

De-/Encoding of EventRequest_t.

Implementation of XDR converters for ONCRPC_GETEVENT_PROC Return the currently available eventRequest or event in XDR representation.

Definition at line 32 of file ONCRPCXDRProcs.cxx.

32  {
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  }

◆ xdr_streams()

bool_t JiveXML::xdr_streams ( XDR *  xdrsp,
Streams streams 
)

De- and Encoding of Streams_t.

Implementation of XDR converters for ONCRPC_GETSTREAMS_PROC Return the currently available event streams in XDR representation.

Definition at line 19 of file ONCRPCXDRProcs.cxx.

19  {
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  }

Variable Documentation

◆ ATLAS_THREAD_SAFE

pthread_key_t ServerSvcKey JiveXML::ATLAS_THREAD_SAFE

Definition at line 35 of file ONCRPCServerThreads.cxx.

◆ dispatchThreads

ThreadCollection *const JiveXML::dispatchThreads = new ThreadCollection()

Definition at line 31 of file ONCRPCServerThreads.cxx.

◆ NBYTESMAX

const unsigned int JiveXML::NBYTESMAX = 0x1u << (sizeof( unsigned int )*8 - 1)

Definition at line 40 of file ONCRPCServer.h.

◆ NSTREAMMAX

const unsigned int JiveXML::NSTREAMMAX = 1024

Definition at line 38 of file ONCRPCServer.h.

AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
JiveXML::ONCRPCCleanupHandler
void ONCRPCCleanupHandler(void *args)
This cleanup handler is called whenever the server thread exits.
Definition: ONCRPCServerThreads.cxx:241
JiveXML::SetNewEvent
void SetNewEvent(SVCXPRT *transp, const Event *event, IServer *const ServerSvc)
Implementation of ONCRPC_SETEVENT_PROC Set a new event for a certain streams.
Definition: ONCRPCServerProcs.cxx:182
JiveXML::ONCRPCDispatchThread
void * ONCRPCDispatchThread(void *args)
This is the thread handling the request - one thread per request.
Definition: ONCRPCServerThreads.cxx:42
python.outputTest_v2.streams
streams
Definition: outputTest_v2.py:55
JiveXML::ReturnStreams
void ReturnStreams(SVCXPRT *transp, IServer *const ServerSvc)
Implementation of ONCRPC_GETSTREAMS_PROC Return the currently available event streams.
Definition: ONCRPCServerProcs.cxx:73
ONCRPC_GETSTATUS_PROC
#define ONCRPC_GETSTATUS_PROC
Definition: ONCRPCServer.h:32
Event
Definition: trigbs_orderedMerge.cxx:42
JiveXML::Event
struct Event_t Event
Definition: ONCRPCServer.h:65
Trk::z0
@ z0
Definition: ParamDefs.h:64
JiveXML::ServerThreadArguments
struct ServerThreadArguments_t ServerThreadArguments
Arguments handed over fromt the main (Athena) thread to the server thread.
Definition: ONCRPCServerThreads.h:22
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
JiveXML::EventRequest
struct EventRequest_t EventRequest
Data structures for GetEvent functions.
Definition: ONCRPCServer.h:57
JiveXML::Streams_t::NStreams
unsigned int NStreams
Definition: ONCRPCServer.h:47
ONCRPC_GETSTREAMS_PROC
#define ONCRPC_GETSTREAMS_PROC
Definition: ONCRPCServer.h:33
JiveXML::ReturnState
void ReturnState(SVCXPRT *transp, IServer *const ServerSvc)
Implementation of ONCRPC_ATHENASTATUS_PROC Return the current athena status in XDR representation.
Definition: ONCRPCServerProcs.cxx:63
JiveXML::ThreadCollection::NumberOfThreads
int NumberOfThreads()
Definition: ONCRPCThreadCollection.cxx:119
JiveXML::ONCRPCRequestHandler
void ONCRPCRequestHandler(struct svc_req *rqstp, SVCXPRT *transp)
The Request handler is called from the RPC kernel routines - hence extern C It creates a new dispatch...
Definition: ONCRPCServerThreads.cxx:116
JiveXML::dispatchThreads
ThreadCollection *const dispatchThreads
Definition: ONCRPCServerThreads.cxx:31
ONCRPC_GETEVENT_PROC
#define ONCRPC_GETEVENT_PROC
Definition: ONCRPCServer.h:34
JiveXML::EventRequest_t::EventNumber
int64_t EventNumber
Definition: ONCRPCServer.h:59
rerun_display.client
client
Definition: rerun_display.py:31
JiveXML::ThreadCollection::AddThread
void AddThread(const pthread_t &thread)
Definition: ONCRPCThreadCollection.cxx:34
JiveXML::IMessage::LogLevel
virtual MSG::Level LogLevel() const =0
Get the logging level.
StateLessPT_NewConfig.StreamNames
StreamNames
Definition: StateLessPT_NewConfig.py:315
JiveXML::xdr_streams
bool_t xdr_streams(XDR *xdrsp, Streams *streams)
De- and Encoding of Streams_t.
Definition: ONCRPCXDRProcs.cxx:19
JiveXML::DispatchThreadArguments
struct DispatchThreadArguments_t DispatchThreadArguments
Arguments handed over fromt the main server thread to the thread dispatching the request (one for eac...
Definition: ONCRPCServerThreads.h:40
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
JiveXML::ReturnEvent
void ReturnEvent(SVCXPRT *transp, const EventRequest *eventReq, IServer *const ServerSvc)
Implementation of ONCRPC_GETEVENT_PROC Return an event from a certain streams.
Definition: ONCRPCServerProcs.cxx:105
JiveXML::xdr_event_req
bool_t xdr_event_req(XDR *xdrsp, EventRequest *eventReq)
De-/Encoding of EventRequest_t.
Definition: ONCRPCXDRProcs.cxx:32
JiveXML::ThreadCollection::JoinAll
void JoinAll()
Definition: ONCRPCThreadCollection.cxx:88
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
JiveXML::xdr_event
bool_t xdr_event(XDR *xdrsp, Event *event)
De-/Encoding of Event_t.
Definition: ONCRPCXDRProcs.cxx:51
calibdata.exception
exception
Definition: calibdata.py:496
TrigInDetValidation_Base.malloc
malloc
Definition: TrigInDetValidation_Base.py:132
JiveXML::NBYTESMAX
const unsigned int NBYTESMAX
Definition: ONCRPCServer.h:40
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
ONCRPCSERVERPROG
#define ONCRPCSERVERPROG
Definition: ONCRPCServer.h:30
ONCRPC_SETEVENT_PROC
#define ONCRPC_SETEVENT_PROC
Definition: ONCRPCServer.h:35
JiveXML::IEventServer::GetRunServerFlag
virtual bool GetRunServerFlag() const =0
The server thread will stop once this flag is set to false.
JiveXML::IMessage::Message
virtual void Message(const MSG::Level level, const std::string &msg) const =0
JiveXML::ReturnNull
void ReturnNull(SVCXPRT *transp, IServer *const ServerSvc)
Implementation of NULLPROC Return nothing - server has just been pinged.
Definition: ONCRPCServerProcs.cxx:45
Trk::d0
@ d0
Definition: ParamDefs.h:63
python.ElectronD3PDObject.matched
matched
Definition: ElectronD3PDObject.py:138
JiveXML::IServer
Pure abstract interface for all full server implementations.
Definition: IServer.h:22
ONCRPCSERVERVERS
#define ONCRPCSERVERVERS
Definition: ONCRPCServer.h:31
JiveXML::ThreadCollection::WaitAdd
void WaitAdd()
Definition: ONCRPCThreadCollection.cxx:51
DEBUG
#define DEBUG
Definition: page_access.h:11
JiveXML::Streams
struct Streams_t Streams
Data structures for GetStreams functions.
Definition: ONCRPCServer.h:45
JiveXML::checkResult
bool checkResult(const int RetVal, const std::string &Module, IMessage *const ServerSvc)
Simple result checking routine, that will output an errorMsg throught the ServerSvc if there was an e...
Definition: ONCRPCServerProcs.cxx:24
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
DerivationFramework::ClustersInCone::select
void select(const xAOD::IParticle *particle, const float coneSize, const xAOD::CaloClusterContainer *clusters, std::vector< bool > &mask)
Definition: ClustersInCone.cxx:14
python.TrigInDetArtSteps.timeout
timeout
Definition: TrigInDetArtSteps.py:35
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Trk::phi0
@ phi0
Definition: ParamDefs.h:65
JiveXML::ThreadCollection::RemoveThread
void RemoveThread(const pthread_t &thread)
Definition: ONCRPCThreadCollection.cxx:58
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
JiveXML::NSTREAMMAX
const unsigned int NSTREAMMAX
Definition: ONCRPCServer.h:38