1 #ifndef ALIRAWREADERDATEONLINE_H
2 #define ALIRAWREADERDATEONLINE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 ///////////////////////////////////////////////////////////////////////////////
8 /// This is a class for reading raw data from a date monitoring libraries.
9 /// It supports two modes - event taken from shared memory via DATE monitoring
10 /// libs, or an emulation mode when the events are taken from a DATE file using
11 /// the same monitoring libs.
12 /// The constructor requires an argument:
14 /// : - events are taken from shared memory
16 /// <DATE_filename> - events are taken from date file
18 /// Cvetan Cheshkov 1/04/2008
19 ///////////////////////////////////////////////////////////////////////////////
21 #include <TSysEvtHandler.h>
23 #include "AliRawReaderDate.h"
25 class AliRawReaderDateOnline: public AliRawReaderDate {
27 AliRawReaderDateOnline(const char* fileName, const Char_t** customTable = NULL);
28 virtual ~AliRawReaderDateOnline();
30 virtual Bool_t NextEvent();
31 // virtual Bool_t RewindEvents();
33 // Method which can be used in order to force the auto-save on
34 // ESD tree inside AliReconstruction. For the moment it will be
35 // activated only for AliRawReaderDateOnline.
36 virtual Bool_t UseAutoSaveESD() const { return kTRUE; }
38 // Method triggered by signal hanlder
39 // Set fStop to false in which case
40 // NextEvent() returns fFALSE and the
41 // processing of raw data stops
43 static Bool_t GetNoSleep() {return fgNoSleep;}
44 static void SetNoSleep(Bool_t v=kTRUE) {fgNoSleep = v;}
47 class AliRawReaderDateIntHandler : public TSignalHandler {
49 AliRawReaderDateIntHandler(AliRawReaderDateOnline *rawReader):
50 TSignalHandler(kSigUser1, kFALSE), fRawReader(rawReader) { }
52 Info("Notify", "received a SIGUSR1 signal");
57 AliRawReaderDateOnline *fRawReader; // raw-reader to signal
59 AliRawReaderDateIntHandler(const AliRawReaderDateIntHandler& handler); // Not implemented
60 AliRawReaderDateIntHandler& operator=(const AliRawReaderDateIntHandler& handler); // Not implemented
63 virtual void SelectEvents(Int_t type, ULong64_t triggerMask = 0, const char *triggerExpr = NULL);
65 AliRawReaderDateOnline(const AliRawReaderDateOnline& rawReader);
66 AliRawReaderDateOnline& operator = (const AliRawReaderDateOnline& rawReader);
68 const Char_t** fTable;// custom monitoring table
69 Bool_t fStop; // raw-reader signaled to stop
70 static Bool_t fgNoSleep; // do we freez the system while looping in event waiting?
71 ClassDef(AliRawReaderDateOnline, 0) // class for reading DATE raw data from shared memory