Preliminary version of new MUON trigger electronics code
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerElectronics.h
CommitLineData
516d3280 1#ifndef ALIMUONTRIGGERELECTRONICS_H
2#define ALIMUONTRIGGERELECTRONICS_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
8//*-- Author: Rachid Guernane (LPCCFd)
9
10#ifndef ROOT_TTask
11# include "TTask.h"
12#endif
13
14#ifndef ROOT_TArrayI
15# include "TArrayI.h"
16#endif
17
18#ifndef ROOT_TString
19# include "TString.h"
20#endif
21
22class AliMUONTriggerCrate;
23class AliMUONData;
24class AliMUONGlobalTriggerBoard;
25class TClonesArray;
26
27class AliMUONTriggerElectronics : public TTask
28{
29 public:
30 AliMUONTriggerElectronics(AliMUONData* Data = 0);
31 virtual ~AliMUONTriggerElectronics();
32
33 virtual void Exec(Option_t*);
34
35// CRATE CONFIG FROM ASCII FILE
36 virtual void SetDataSource(TString SourceFile = "$ALICE_ROOT/MUON/data/CRATE.TXT")
37 {fSourceFileName = SourceFile;}
38
39 virtual void Factory();
40 virtual void AddCrate(char *name);
41
42 virtual AliMUONTriggerCrate* Crate(char *name);
43
44 virtual void Feed();
45 virtual void Feed(UShort_t pattern[2][4]);
46
47 virtual void BoardName(Int_t ix, Int_t iy, char *name);
48
49 virtual void Reset();
50
51 virtual void Scan(Option_t *option);
52
53 virtual void LocalResponse();
54 virtual void RegionalResponse();
55 virtual void GlobalResponse();
56
57 virtual void BuildName(Int_t icirc, char name[20]);
58
59 virtual void DumpOS();
60
61 virtual void Digits2Trigger();
62 virtual void Trigger();
63 virtual void ClearDigitNumbers();
64 virtual void DigitFiredCircuit(Int_t circuit, Int_t cathode, Int_t chamber, Int_t digit);
65
66// virtual AliMUONData* GetMUONData() {return fMUONData;}
67
68 private:
69 TString fSourceFileName;
70 TClonesArray *fCrates;
71 AliMUONGlobalTriggerBoard *fGlobalTriggerBoard;
72 Int_t fNCrates;
73 static const Int_t fgkNCrates;
74 UShort_t fLocal[16][16]; // 16 crates of 16 LB
75 UShort_t fRegional[16];
76 UShort_t fGlobal;
77 AliMUONData *fMUONData; //! Data container for MUON subsystem
78 TArrayI fDigitNumbers[234]; //! The digit number that fired a circuit.
79
80 ClassDef(AliMUONTriggerElectronics,1)
81};
82#endif