]>
Commit | Line | Data |
---|---|---|
fcd2bfb7 | 1 | #ifndef ALITRIGMODULE_H |
2 | #define ALITRIGMODULE_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | // Author: Andrei Gheata, 27/07/2009 | |
7 | ||
8 | //============================================================================== | |
9 | // AliTrigModule - Base class for trigger devices handling generic events. | |
10 | // A module has arbitrary number of inputs and outputs. Derived classes must | |
11 | // implement CreateDevice() and Trigger() metods. | |
12 | //============================================================================== | |
13 | ||
14 | #ifndef ALITRIGDEVICE_H | |
15 | #include "AliTrigDevice.h" | |
16 | #endif | |
17 | ||
18 | class TObjArray; | |
19 | class AliTrigEvent; | |
20 | ||
21 | class AliTrigModule : public AliTrigDevice { | |
22 | ||
23 | public: | |
24 | AliTrigModule() : AliTrigDevice(), fInputs(0), fOutputs(0), fOutputConnectors(0) {} | |
25 | AliTrigModule(const char *name, Int_t ninputs, Int_t noutputs) : AliTrigDevice(name, ninputs, noutputs), fInputs(0), fOutputs(0), fOutputConnectors(0) {} | |
26 | virtual ~AliTrigModule(); | |
27 | ||
28 | virtual Bool_t Connect(Int_t output, AliTrigDevice *other, Int_t at_input); | |
29 | virtual Bool_t CreateDevice() = 0; | |
30 | void DefineInput(Int_t islot, AliTrigEvent *event); | |
31 | void DefineOutput(Int_t islot, AliTrigEvent *event); | |
32 | virtual Bool_t Response(Int_t output); | |
33 | // Get/Set inputs | |
34 | AliTrigEvent *GetInputValue(Int_t input) const; | |
35 | AliTrigEvent *GetOutputValue(Int_t output) const; | |
36 | virtual void ResetInputs(); | |
37 | virtual Bool_t SetInputType(Int_t /*input*/, const char */*classname*/) {return kFALSE;} | |
38 | virtual Bool_t SetInputValue(Int_t /*input*/, Bool_t /*value*/) {return kFALSE;} | |
39 | virtual Bool_t SetInputValue(Int_t input, AliTrigEvent *event); | |
40 | private: | |
41 | // Circuit response function. | |
42 | AliTrigModule(const AliTrigModule &other); | |
43 | AliTrigModule &operator=(const AliTrigModule &other); | |
44 | virtual Bool_t Trigger(Int_t ioutput) = 0; | |
45 | ||
46 | protected: | |
47 | TObjArray *fInputs; // Array of input events | |
48 | TObjArray *fOutputs; // Array of output events | |
49 | TObjArray *fOutputConnectors; // Array of output connectors | |
50 | ||
51 | ClassDef(AliTrigModule,1) // Base class for a trigger module handling events | |
52 | }; | |
53 | #endif |