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 */
7 // Author: Andrei Gheata, 04/01/2010
9 //==============================================================================
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.
17 //==============================================================================
25 class AliTrigScheduledEntry : public TNamed {
28 Int_t fStartTime; // Time to fire-up
29 AliTrigDevice *fDevice; // Device to fire-up
32 AliTrigScheduledEntry(const AliTrigScheduledEntry &other);
33 AliTrigScheduledEntry &operator=(const AliTrigScheduledEntry &other);
36 AliTrigScheduledEntry() : TNamed(), fStartTime(0), fDevice(NULL) {}
37 AliTrigScheduledEntry(const char *name, AliTrigDevice *device, Int_t start=0);
38 virtual ~AliTrigScheduledEntry() {}
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;}
45 ClassDef(AliTrigScheduledEntry, 1) // ABC for scheduled responses
48 //==============================================================================
50 // AliTrigScheduledResponse - Scheduled device response function. Fires-up a
51 // single response function at a time.
53 //==============================================================================
55 class AliTrigScheduledResponse : public AliTrigScheduledEntry {
58 Int_t fOutputID; // Device output to be fired
61 AliTrigScheduledResponse(const AliTrigScheduledResponse &other);
62 AliTrigScheduledResponse &operator=(const AliTrigScheduledResponse &other);
65 AliTrigScheduledResponse() : AliTrigScheduledEntry(), fOutputID(-1) {}
66 AliTrigScheduledResponse(const char *name, AliTrigDevice *device, Int_t output, Int_t start=0);
67 virtual ~AliTrigScheduledResponse() {}
69 Int_t GetOutputID() const {return fOutputID;}
70 virtual void FireUp(Int_t time);
72 ClassDef(AliTrigScheduledResponse, 1) // Scheduled response function for a device
75 //==============================================================================
77 // AliTrigScheduledDevice - Scheduled entry for a full device sequence. Invokes
78 // the device scheduler when firing-up.
80 //==============================================================================
82 class AliTrigScheduledDevice : public AliTrigScheduledEntry {
85 AliTrigScheduledDevice(const AliTrigScheduledDevice &other);
86 AliTrigScheduledDevice &operator=(const AliTrigScheduledDevice &other);
89 AliTrigScheduledDevice() : AliTrigScheduledEntry() {}
90 AliTrigScheduledDevice(const char *name, AliTrigDevice *device, Int_t start=0);
91 virtual ~AliTrigScheduledDevice() {}
93 virtual void FireUp(Int_t time);
95 ClassDef(AliTrigScheduledDevice, 1) // Scheduled device replay