]>
Commit | Line | Data |
---|---|---|
88f843f1 | 1 | #ifndef ALITRIGCONNECTOR_H |
2 | #define ALITRIGCONNECTOR_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, 28/07/2009 | |
8 | ||
9 | //============================================================================== | |
10 | // AliTrigConnector - Class representing a connector between an output of a | |
11 | // device (feeder) and an arbitrary number of inputs of other devices. | |
12 | //============================================================================== | |
13 | ||
14 | #ifndef ROOT_TNamed | |
15 | #include "TNamed.h" | |
16 | #endif | |
17 | ||
18 | class TObjArray; | |
19 | class AliTrigDevice; | |
20 | class AliTrigEvent; | |
21 | ||
22 | class AliTrigConnector : public TNamed { | |
23 | ||
24 | public: | |
25 | AliTrigConnector() : TNamed(), fFeeder(0), fOutput(0), fNclients(0), fArraySize(0), fInputs(0), fDevices(0) {} | |
79e35bac | 26 | AliTrigConnector(const char *name, AliTrigDevice *feeder, Int_t output) : TNamed(name, ""), fFeeder(feeder), fOutput(output), fNclients(0), fArraySize(0), fInputs(0), fDevices(0) {} |
88f843f1 | 27 | virtual ~AliTrigConnector(); |
28 | ||
88f843f1 | 29 | |
30 | // Connect a client input. | |
79e35bac | 31 | void Connect(AliTrigDevice *client, Int_t input); |
88f843f1 | 32 | |
33 | virtual void Print(Option_t *option="") const; | |
34 | ||
35 | // Transmit the feeder signal to all connected inputs. Different device types | |
36 | // call different Transmit() methods. | |
37 | Bool_t Transmit(Bool_t value); | |
38 | Bool_t Transmit(AliTrigEvent *event); | |
39 | ||
40 | private: | |
4aa6faab | 41 | AliTrigConnector(const AliTrigConnector &other); |
42 | AliTrigConnector &operator=(const AliTrigConnector &other); | |
43 | ||
88f843f1 | 44 | AliTrigDevice *fFeeder; // Feeder device |
79e35bac | 45 | Int_t fOutput; // Output slot index for the feeder |
88f843f1 | 46 | Int_t fNclients; // Number of clients |
47 | Int_t fArraySize; // Size of the clients array | |
79e35bac | 48 | Int_t *fInputs; //[fArraySize] Array of input slot indices |
88f843f1 | 49 | TObjArray *fDevices; // Array of client devices |
50 | ||
51 | ClassDef(AliTrigConnector,1) // Class representing a connector between devices. | |
52 | }; | |
53 | #endif |