]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/AliRawReaderDateOnline.h
Xcode project file addded to .gitignore
[u/mrichter/AliRoot.git] / RAW / AliRawReaderDateOnline.h
CommitLineData
3b98a4d4 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 */
5
6///////////////////////////////////////////////////////////////////////////////
7///
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:
13///
14/// : - events are taken from shared memory
15/// or
16/// <DATE_filename> - events are taken from date file
17///
18/// Cvetan Cheshkov 1/04/2008
19///////////////////////////////////////////////////////////////////////////////
20
e5705501 21#include <TSysEvtHandler.h>
22
3b98a4d4 23#include "AliRawReaderDate.h"
24
25class AliRawReaderDateOnline: public AliRawReaderDate {
26 public :
c0f9fd2d 27 AliRawReaderDateOnline(const char* fileName, const Char_t** customTable = NULL);
3b98a4d4 28 virtual ~AliRawReaderDateOnline();
29
30 virtual Bool_t NextEvent();
36a7d3c6 31 // virtual Bool_t RewindEvents();
3b98a4d4 32
2d91a353 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; }
37
e5705501 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
42 virtual void Stop();
a3c2f91e 43 static Bool_t GetNoSleep() {return fgNoSleep;}
44 static void SetNoSleep(Bool_t v=kTRUE) {fgNoSleep = v;}
45 //
20e6c4f4 46 protected:
e5705501 47 class AliRawReaderDateIntHandler : public TSignalHandler {
48 public:
49 AliRawReaderDateIntHandler(AliRawReaderDateOnline *rawReader):
50 TSignalHandler(kSigUser1, kFALSE), fRawReader(rawReader) { }
51 Bool_t Notify() {
52 Info("Notify", "received a SIGUSR1 signal");
53 fRawReader->Stop();
54 return kTRUE;
55 }
56 private:
57 AliRawReaderDateOnline *fRawReader; // raw-reader to signal
58
59 AliRawReaderDateIntHandler(const AliRawReaderDateIntHandler& handler); // Not implemented
60 AliRawReaderDateIntHandler& operator=(const AliRawReaderDateIntHandler& handler); // Not implemented
61 };
62
20e6c4f4 63 virtual void SelectEvents(Int_t type, ULong64_t triggerMask = 0, const char *triggerExpr = NULL);
3b98a4d4 64 private:
65 AliRawReaderDateOnline(const AliRawReaderDateOnline& rawReader);
66 AliRawReaderDateOnline& operator = (const AliRawReaderDateOnline& rawReader);
67
c0f9fd2d 68 const Char_t** fTable;// custom monitoring table
e5705501 69 Bool_t fStop; // raw-reader signaled to stop
a3c2f91e 70 static Bool_t fgNoSleep; // do we freez the system while looping in event waiting?
3b98a4d4 71 ClassDef(AliRawReaderDateOnline, 0) // class for reading DATE raw data from shared memory
72};
73
74#endif