/// Cvetan Cheshkov 1/04/2008
///////////////////////////////////////////////////////////////////////////////
+#include <TSysEvtHandler.h>
+
#include "AliRawReaderDate.h"
class AliRawReaderDateOnline: public AliRawReaderDate {
public :
- AliRawReaderDateOnline(const char* fileName);
+ AliRawReaderDateOnline(const char* fileName, const Char_t** customTable = NULL);
virtual ~AliRawReaderDateOnline();
virtual Bool_t NextEvent();
// virtual Bool_t RewindEvents();
+ // Method which can be used in order to force the auto-save on
+ // ESD tree inside AliReconstruction. For the moment it will be
+ // activated only for AliRawReaderDateOnline.
+ virtual Bool_t UseAutoSaveESD() const { return kTRUE; }
+
+ // Method triggered by signal hanlder
+ // Set fStop to false in which case
+ // NextEvent() returns fFALSE and the
+ // processing of raw data stops
+ virtual void Stop();
+ static Bool_t GetNoSleep() {return fgNoSleep;}
+ static void SetNoSleep(Bool_t v=kTRUE) {fgNoSleep = v;}
+ //
+ protected:
+ class AliRawReaderDateIntHandler : public TSignalHandler {
+ public:
+ AliRawReaderDateIntHandler(AliRawReaderDateOnline *rawReader):
+ TSignalHandler(kSigUser1, kFALSE), fRawReader(rawReader) { }
+ Bool_t Notify() {
+ Info("Notify", "received a SIGUSR1 signal");
+ fRawReader->Stop();
+ return kTRUE;
+ }
+ private:
+ AliRawReaderDateOnline *fRawReader; // raw-reader to signal
+
+ AliRawReaderDateIntHandler(const AliRawReaderDateIntHandler& handler); // Not implemented
+ AliRawReaderDateIntHandler& operator=(const AliRawReaderDateIntHandler& handler); // Not implemented
+ };
+
+ virtual void SelectEvents(Int_t type, ULong64_t triggerMask = 0, const char *triggerExpr = NULL);
private:
AliRawReaderDateOnline(const AliRawReaderDateOnline& rawReader);
AliRawReaderDateOnline& operator = (const AliRawReaderDateOnline& rawReader);
+ const Char_t** fTable;// custom monitoring table
+ Bool_t fStop; // raw-reader signaled to stop
+ static Bool_t fgNoSleep; // do we freez the system while looping in event waiting?
ClassDef(AliRawReaderDateOnline, 0) // class for reading DATE raw data from shared memory
};