Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 #if defined(__clang__) && __clang_major__ >= 19
307 # pragma clang diagnostic push
308 # pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
309 #endif
310  struct timeval timeout; timeout.tv_sec = 1; timeout.tv_usec = 0;
311  clnt_stat ret = clnt_call(client, NULLPROC, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_void, NULL, timeout);
312 #if defined(__clang__) && __clang_major__ >= 19
313 # pragma clang diagnostic pop
314 #endif
315 #if __GNUC__ >= 8
316 # pragma GCC diagnostic pop
317 #endif
318  if (ret == RPC_SUCCESS){
319  //So we already have a server, and it is alive -- then we don't start
320  ServerSvc->Message(MSG::ERROR,"Server exists and is alive on local host - stopping this thread");
321  pthread_exit(NULL);
322  } else ServerSvc->Message(MSG::WARNING,"Existing server does not respond");
323  } else ServerSvc->Message(MSG::WARNING,"Can not create client for existing server");
324 
325  //Now just force a clearing of the portmap entry
326  ServerSvc->Message(MSG::WARNING,"Clearing existing portmap entry!");
327  pmap_unset(ONCRPCSERVERPROG, ONCRPCSERVERVERS);
328 
329  //Finally clear the error entry by trying to get the port number again
330  port = pmap_getport(&my_addr, ONCRPCSERVERPROG,ONCRPCSERVERVERS,IPPROTO_TCP);
331  }
332 
333  //We should have left either the first or the second call to pmap_getport
334  // with "program not registered" , which is returned as RPC_PROGNOTREGISTERD
335  //or RPC_SYSTEMERROR. However, we could also have failed contacting the portmapper
336  if ((rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED) &&
337  (rpc_createerr.cf_stat != RPC_SYSTEMERROR )){
338  ServerSvc->Message(MSG::ERROR,clnt_spcreateerror("Failed querying portmapper on local host for existing servers"));
339  pthread_exit(NULL);
340  }
341 
342  //The socket to connect to, not bound to a specifc port by default
343  int server_socket = RPC_ANYSOCK;
344 
345  //Check if a specific port was requested
346  if (PortNumber != 0){
347 
348  //Create a socket
349  if ((server_socket = socket(AF_INET, SOCK_STREAM, 0)) != 0) {
350  checkResult(errno,"server thread creating socket",ServerSvc);
351  pthread_exit(NULL);
352  }
353 
354  //Create an inet address with the given port number
355  struct sockaddr_in server_addr;
356  server_addr.sin_family = AF_INET; //IPv4 address
357  server_addr.sin_addr.s_addr = INADDR_ANY; //will bind all interfaces
358  server_addr.sin_port = htons(PortNumber); //port number in network byte order
359  memset(&server_addr.sin_zero, 0, sizeof(server_addr.sin_zero)); //zero padding
360 
361  //Now bind the socket to that inet address
362  if (bind(server_socket, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) != 0){
363  std::ostringstream msg; msg << "server thread binding socket to port " << PortNumber;
364  checkResult(errno,msg.str(),ServerSvc);
365  pthread_exit(NULL);
366  }
367  std::ostringstream msg; msg << "Successfully bound port " << PortNumber;
368  ServerSvc->Message(MSG::INFO,msg.str());
369  }
370 
371  //Get a transport handle using default buffer sizes
372  SVCXPRT * transp = svctcp_create(server_socket, 0, 0);
373 
374  //Check result
375  if (transp == NULL) {
376  ServerSvc->Message(MSG::ERROR,"Opening TCP socket failed");
377  pthread_exit(NULL);
378  }
379 
380  //Next register our server with the RPC daemon
381 #ifndef __APPLE__
382  if (! svc_register(transp,ONCRPCSERVERPROG,ONCRPCSERVERVERS,ONCRPCRequestHandler,IPPROTO_TCP)){
383 #else
384  if (! svc_register(transp,ONCRPCSERVERPROG,ONCRPCSERVERVERS,(void (*)())ONCRPCRequestHandler,IPPROTO_TCP)){
385 #endif
386  ServerSvc->Message(MSG::ERROR,"Could not register ONCRPC Server with RPC daemon");
387  checkResult(errno,"registering ONCRPC Server with RPC daemon",ServerSvc);
388  pthread_exit(NULL);
389  }
390 
391  //A set of socket file descriptors
392  fd_set SocketFileDescriptorSet;
393  //Size of the socket handle table
394  int NFileDescriptors = FD_SETSIZE;
395 
396  //Count the number of requests we have received while running
397  unsigned long NRequests = 0;
398 
399  do {
400 
401  ServerSvc->Message(MSG::VERBOSE,"Waiting for call...");
402 
403  //Get the file descriptor set
404  SocketFileDescriptorSet = svc_fdset;
405 
406  //Wait for input on any of these using select:
407  // - first NULL: not cecking for readiness to write to socket
408  // - second NULL: not checking for socket conditions
409  // - third NULL: timeout - wait forever
410  int ret = select(NFileDescriptors,&SocketFileDescriptorSet,NULL,NULL,NULL);
411  // Check result
412  switch (ret){
413  // an error occured
414  case -1:
415  // If just an interrupt continue
416  if ( errno == EINTR ) continue ;
417  // Else show error
418  checkResult(errno,"server thread returning from select",ServerSvc);
419  return NULL;
420  // a timeout occured - break the loop
421  case 0:
422  break ;
423  // activity on one of the sockets
424  default:
425  //Count number of requests
426  ++NRequests;
427  // Get the requests from the sockets
428  svc_getreqset(&SocketFileDescriptorSet);
429  }
430  } while ( ServerSvc->GetRunServerFlag() );
431 
432  ServerSvc->Message(MSG::DEBUG,"Serving loop finished");
433 
434  //Unregister the service, so no clients can connect anymore
435  svc_unregister(ONCRPCSERVERPROG,ONCRPCSERVERVERS);
436 
437  //Also stop all the dispatching threads, which need to finish before this
438  //one. Otherwise the server will become invalid, before all requests are
439  //served
440 
441  //Tell how many threads we are waiting for
442  std::ostringstream msg; msg << "Waiting for " << dispatchThreads->NumberOfThreads() << " open dispatch threads to terminate ... ";
443  ServerSvc->Message(MSG::INFO,msg.str());
444  //Then wait for them all to finish
446  //Tell when we are done
447  ServerSvc->Message(MSG::INFO, " ... finished all dispatch threads");
448 
449  //Now that the threads are stopped we can finish the transport protocol and
450  //close the port
451  svc_destroy(transp);
452 
453  //Return number of requests - as all local variables will disappear,
454  //the return value needs to be allocated on the heap;
455  unsigned long* NReqPtr = new unsigned long(NRequests);
456  //Terminate this thread
457  pthread_exit(NReqPtr);
458 
459  } catch (std::exception &e){
460  std::ostringstream msg; msg << "Caught exception in ServerThread: " << e.what();
461  ServerSvc->Message(MSG::ERROR,msg.str());
462  }
463 
464  return NULL;
465  }

◆ 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 112 of file ONCRPCServerProcs.cxx.

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

◆ 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 defined(__clang__) && __clang_major__ >= 19
52 # pragma clang diagnostic push
53 # pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
54 #endif
55  if (!svc_sendreply(transp, (xdrproc_t)xdr_void, 0))
56  //check global errno variable on result
57  checkResult(errno,"dispatch thread sending reply to NULLPROC call",ServerSvc);
58  }

◆ 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 70 of file ONCRPCServerProcs.cxx.

70  {
71  int state = ServerSvc->GetState();
72  if (!svc_sendreply(transp, (xdrproc_t)xdr_int, (caddr_t)&state))
73  //check global errno variable on result
74  checkResult(errno,"dispatch thread sending reply to GETSTATUS call",ServerSvc);
75  }

◆ 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 80 of file ONCRPCServerProcs.cxx.

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

◆ 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 189 of file ONCRPCServerProcs.cxx.

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

◆ 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:189
JiveXML::ONCRPCDispatchThread
void * ONCRPCDispatchThread(void *args)
This is the thread handling the request - one thread per request.
Definition: ONCRPCServerThreads.cxx:42
python.CaloAddPedShiftConfig.args
args
Definition: CaloAddPedShiftConfig.py:45
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:80
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:70
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:318
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:112
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:13
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:36
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
JiveXML::NSTREAMMAX
const unsigned int NSTREAMMAX
Definition: ONCRPCServer.h:38