1 // Author: Mihai Niculescu 2013
3 /**************************************************************************
4 * Copyright(c) 1998-2013, ALICE Experiment at CERN, all rights reserved. *
5 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
6 * full copyright notice. *
7 **************************************************************************/
9 #ifndef __AliRecoServerThread_H__
10 #define __AliRecoServerThread_H__
13 #include <RQ_OBJECT.h>
15 #include <TCondition.h>
21 class AliReconstruction;
29 class AliRecoServerThread : public TQObject
32 AliRecoServerThread(zmq::context_t *context, AliReconstruction* reco);
33 virtual ~AliRecoServerThread();
35 Bool_t Start(const char* host);
37 Bool_t ForceStop(); // imediate kill it, use it with rarely and with caution
39 zmq::context_t* GetContext() { return fContext; }
40 AliReconstruction* GetReconstruction() { return fReco; }
41 const char* GetHost() { return fHost.Data(); }
42 TCondition* Condition() { return fCond; }
44 void Finished(Int_t status); // *SIGNAL*
47 static void* RunThreaded(void* arg);
48 static void SendStreamerInfos(TMessage* mess, zmq::socket_t *sock);
49 static void SendEvent(AliESDEvent* event, zmq::socket_t* socket);
52 zmq::context_t* fContext;
53 AliReconstruction* fReco;
58 TCondition* fCond; // condition whether to stop reco/clean exit thread
61 AliRecoServerThread(const AliRecoServerThread&); // Not implemented
62 AliRecoServerThread& operator=(const AliRecoServerThread&); // Not implemented
66 ClassDef(AliRecoServerThread, 0);
68 #endif /* __AliReconstructionThread_H__ */