]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRIGGER/AliTrigScheduledEntry.h
also on a batch farm encode spaces to avoid problems parsing arguments
[u/mrichter/AliRoot.git] / TRIGGER / AliTrigScheduledEntry.h
CommitLineData
79e35bac 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
23class AliTrigDevice;
24
25class AliTrigScheduledEntry : public TNamed {
26
27protected:
28 Int_t fStartTime; // Time to fire-up
29 AliTrigDevice *fDevice; // Device to fire-up
30
31private:
32 AliTrigScheduledEntry(const AliTrigScheduledEntry &other);
33 AliTrigScheduledEntry &operator=(const AliTrigScheduledEntry &other);
34
35public:
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
55class AliTrigScheduledResponse : public AliTrigScheduledEntry {
56
57private:
58 Int_t fOutputID; // Device output to be fired
59
60private:
61 AliTrigScheduledResponse(const AliTrigScheduledResponse &other);
62 AliTrigScheduledResponse &operator=(const AliTrigScheduledResponse &other);
63
64public:
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
82class AliTrigScheduledDevice : public AliTrigScheduledEntry {
83
84private:
85 AliTrigScheduledDevice(const AliTrigScheduledDevice &other);
86 AliTrigScheduledDevice &operator=(const AliTrigScheduledDevice &other);
87
88public:
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