1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 // Author: Andrei Gheata, 28/07/2009
19 //==============================================================================
20 // AliTrigDigitalCircuit - Device that has N Boolean inputs and one Boolean
21 // output. This is a base class and derived digital circuits must implement the
22 // response function Trigger()
23 //==============================================================================
25 #include "AliTrigDigitalCircuit.h"
26 #include "AliTrigConnector.h"
28 ClassImp(AliTrigDigitalCircuit)
30 //______________________________________________________________________________
31 AliTrigDigitalCircuit::~AliTrigDigitalCircuit()
34 if (fConnector) delete fConnector;
37 //______________________________________________________________________________
38 Bool_t AliTrigDigitalCircuit::Connect(Int_t output, AliTrigDevice *other, Int_t at_input)
40 // Connect to an input of another device.
41 if (!fConnector) fConnector = new AliTrigConnector(Form("wire_%s_%d", GetName(), output), (AliTrigDevice*)this, 0);
42 fConnector->Connect(other, at_input);
46 //______________________________________________________________________________
47 Bool_t AliTrigDigitalCircuit::Response(Int_t /*output*/)
49 // Response function of the digital circuit. Calling user-defined one.
50 fLastOutput = Trigger();
51 if (fConnector) fConnector->Transmit(fLastOutput);