#include <TMutex.h>
#include <TCondition.h>
+#include "AliThreadedSocket.h"
+
class TCondition;
-class TMessage;
class TThread;
class AliReconstruction;
class AliESDEvent;
-namespace zmq{
- class context_t;
- class socket_t;
-}
-
-class AliRecoServerThread : public TQObject
+class AliRecoServerThread : public AliThreadedSocket
{
public:
AliRecoServerThread(zmq::context_t *context, AliReconstruction* reco);
virtual ~AliRecoServerThread();
- Bool_t Start(const char* host);
- Int_t Stop();
- Bool_t ForceStop(); // imediate kill it, use it with rarely and with caution
- zmq::context_t* GetContext() { return fContext; }
+ Bool_t Start(const char* endpoint);
+
+ const char* GetHost() const { return fHost.Data(); }
AliReconstruction* GetReconstruction() { return fReco; }
- const char* GetHost() { return fHost.Data(); }
- TCondition* Condition() { return fCond; }
+ TCondition* Condition() { return fCond; }
- void Finished(Int_t status); // *SIGNAL*
-
private:
- static void* RunThreaded(void* arg);
- static void SendStreamerInfos(TMessage* mess, zmq::socket_t *sock);
- static void SendEvent(AliESDEvent* event, zmq::socket_t* socket);
+ static void* RunThrdWrite(void* arg);
- // shared
- zmq::context_t* fContext;
AliReconstruction* fReco;
// local
- TString fHost;
- TThread* fThread;
TCondition* fCond; // condition whether to stop reco/clean exit thread
+ TString fHost;
private:
AliRecoServerThread(const AliRecoServerThread&); // Not implemented