]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRIGGER/AliTrigScheduledEntry.h
In MUONRecoCheck.C:
[u/mrichter/AliRoot.git] / TRIGGER / AliTrigScheduledEntry.h
1 #ifndef ALITRIGSCHEDULEDENTRY_H
2 #define ALITRIGSCHEDULEDENTRY_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7 // Author: Andrei Gheata, 04/01/2010
8
9 //==============================================================================
10 //
11 //   AliTrigScheduledEntry - ABC for scheduled responses of a device that is
12 //                           able to fire-up single response functions or the 
13 //                           full device scheduled sequence. The start time is
14 //                           in arbitrary units and in case it is 0 will not be
15 //                           considered when ordering by time by schedulers.
16 // 
17 //==============================================================================
18
19 #ifndef ROOT_TNamed
20 #include "TNamed.h"
21 #endif
22
23 class AliTrigDevice;
24
25 class AliTrigScheduledEntry : public TNamed {
26
27 protected:
28   Int_t             fStartTime;           // Time to fire-up
29   AliTrigDevice    *fDevice;              // Device to fire-up
30   
31 private:
32   AliTrigScheduledEntry(const AliTrigScheduledEntry &other);
33   AliTrigScheduledEntry &operator=(const AliTrigScheduledEntry &other);
34
35 public:
36   AliTrigScheduledEntry() : TNamed(), fStartTime(0), fDevice(NULL) {}
37   AliTrigScheduledEntry(const char *name, AliTrigDevice *device, Int_t start=0);
38   virtual ~AliTrigScheduledEntry() {}
39
40   Int_t             GetStartTime() const     {return fStartTime;}
41   AliTrigDevice    *GetDevice()    const     {return fDevice;}
42   virtual void      FireUp(Int_t time)                                      = 0;
43   void              SetStartTime(Int_t time) {fStartTime = time;}
44
45   ClassDef(AliTrigScheduledEntry, 1) // ABC for scheduled responses
46 };   
47
48 //==============================================================================
49 //
50 //   AliTrigScheduledResponse - Scheduled device response function. Fires-up a
51 //                              single response function at a time.
52 //
53 //==============================================================================
54
55 class AliTrigScheduledResponse : public AliTrigScheduledEntry {
56
57 private:
58   Int_t             fOutputID;            // Device output to be fired
59
60 private:
61   AliTrigScheduledResponse(const AliTrigScheduledResponse &other);
62   AliTrigScheduledResponse &operator=(const AliTrigScheduledResponse &other);
63
64 public:
65   AliTrigScheduledResponse() : AliTrigScheduledEntry(), fOutputID(-1) {}
66   AliTrigScheduledResponse(const char *name, AliTrigDevice *device, Int_t output, Int_t start=0);
67   virtual ~AliTrigScheduledResponse() {}
68   
69   Int_t             GetOutputID() const      {return fOutputID;}
70   virtual void      FireUp(Int_t time);
71   
72   ClassDef(AliTrigScheduledResponse, 1) // Scheduled response function for a device
73 };
74
75 //==============================================================================
76 //
77 //   AliTrigScheduledDevice - Scheduled entry for a full device sequence. Invokes
78 //                            the device scheduler when firing-up.
79 //
80 //==============================================================================
81
82 class AliTrigScheduledDevice : public AliTrigScheduledEntry {
83
84 private:
85   AliTrigScheduledDevice(const AliTrigScheduledDevice &other);
86   AliTrigScheduledDevice &operator=(const AliTrigScheduledDevice &other);
87
88 public:
89   AliTrigScheduledDevice() : AliTrigScheduledEntry() {}
90   AliTrigScheduledDevice(const char *name, AliTrigDevice *device, Int_t start=0);
91   virtual ~AliTrigScheduledDevice() {}
92   
93   virtual void      FireUp(Int_t time);
94   
95   ClassDef(AliTrigScheduledDevice, 1) // Scheduled device replay
96 };
97 #endif