adding body of missing method
[u/mrichter/AliRoot.git] / VZERO / AliVZEROTriggerSimulator.h
CommitLineData
e311315a 1#ifndef ALIVZEROTRIGGERSIMULATOR_H
2#define ALIVZEROTRIGGERSIMULATOR_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * See cxx source for full Copyright notice
7 */
8
9#include <TObject.h>
10
24f5db95 11#include "AliVZEROTriggerData.h"
e311315a 12
13class AliVZEROLogicalSignal;
14class TTree;
15class TClonesArray;
16
17class AliVZEROTriggerSimulator : public TObject {
18public:
19 AliVZEROTriggerSimulator();
20 AliVZEROTriggerSimulator(TTree * digitsTree, TClonesArray* digits);
21 ~AliVZEROTriggerSimulator();
22 AliVZEROTriggerSimulator(const AliVZEROTriggerSimulator &triggerSim);
23 AliVZEROTriggerSimulator& operator= (const AliVZEROTriggerSimulator &triggerSim);
24
25 AliVZEROTriggerData * GetTriggerData() const {return fTriggerData;};
26
27 Bool_t GetBBAandBBC() const {return (fTriggerWord & 0x1);};
28 Bool_t GetBBAorBBC() const {return (fTriggerWord>>1 & 0x1);};
29 Bool_t GetBGAandBBC() const {return (fTriggerWord>>2 & 0x1);};
30 Bool_t GetBGA() const {return (fTriggerWord>>3 & 0x1);};
31 Bool_t GetBGCandBBA() const {return (fTriggerWord>>4 & 0x1);};
32 Bool_t GetBGC() const {return (fTriggerWord>>5 & 0x1);};
33 Bool_t GetCTA1andCTC1() const {return (fTriggerWord>>6 & 0x1);};
34 Bool_t GetCTA1orCTC1() const {return (fTriggerWord>>7 & 0x1);};
35 Bool_t GetCTA2andCTC2() const {return (fTriggerWord>>8 & 0x1);};
36 Bool_t GetCTA2orCTC2() const {return (fTriggerWord>>9 & 0x1);};
37 Bool_t GetMTAandMTC() const {return (fTriggerWord>>10 & 0x1);};
38 Bool_t GetMTAorMTC() const {return (fTriggerWord>>11 & 0x1);};
39 Bool_t GetBBA() const {return (fTriggerWord>>12 & 0x1);};
40 Bool_t GetBBC() const {return (fTriggerWord>>13 & 0x1);};
41 Bool_t GetBGAorBGC() const {return (fTriggerWord>>14 & 0x1);};
42 Bool_t GetBeamGas() const {return (fTriggerWord>>15 & 0x1);};
43
44 void SetBBAandBBC() { (fTriggerWord += 0x1);};
45 void SetBBAorBBC() { (fTriggerWord += 0x1<<1);};
46 void SetBGAandBBC() { (fTriggerWord += 0x1<<2);};
47 void SetBGA() { (fTriggerWord += 0x1<<3);};
48 void SetBGCandBBA() { (fTriggerWord += 0x1<<4);};
49 void SetBGC() { (fTriggerWord += 0x1<<5);};
50 void SetCTA1andCTC1() { (fTriggerWord += 0x1<<6);};
51 void SetCTA1orCTC1() { (fTriggerWord += 0x1<<7);};
52 void SetCTA2andCTC2() { (fTriggerWord += 0x1<<8);};
53 void SetCTA2orCTC2() { (fTriggerWord += 0x1<<9);};
54 void SetMTAandMTC() { (fTriggerWord += 0x1<<10);};
55 void SetMTAorMTC() { (fTriggerWord += 0x1<<11);};
56 void SetBBA() { (fTriggerWord += 0x1<<12);};
57 void SetBBC() { (fTriggerWord += 0x1<<13);};
58 void SetBGAorBGC() { (fTriggerWord += 0x1<<14);};
59 void SetBeamGas() { (fTriggerWord += 0x1<<15);};
60
61 void Run();
62
63private:
64 // Private methods
65 AliVZEROTriggerData * LoadTriggerData() const ;
66 void GenerateBBWindows();
67 void GenerateBGWindows();
68
69 // Members
70 AliVZEROLogicalSignal * fBBGate[AliVZEROTriggerData::kNCIUBoards];
71 AliVZEROLogicalSignal * fBBLatch[AliVZEROTriggerData::kNCIUBoards];
72 AliVZEROLogicalSignal * fBBReset[AliVZEROTriggerData::kNCIUBoards];
73
74 AliVZEROLogicalSignal * fBGGate[AliVZEROTriggerData::kNCIUBoards];
75 AliVZEROLogicalSignal * fBGLatch[AliVZEROTriggerData::kNCIUBoards];
76 AliVZEROLogicalSignal * fBGReset[AliVZEROTriggerData::kNCIUBoards];
77
78 AliVZEROTriggerData *fTriggerData; // Object holding the trigger configuration parameters
79
80 TTree* fDigitsTree;
81 TClonesArray* fDigits;
82
83 Bool_t fBBFlags[64];
84 Bool_t fBGFlags[64];
85 Int_t fCharges[64];
86
87 UShort_t fTriggerWord;
88
89 ClassDef( AliVZEROTriggerSimulator, 1 )
90
91};
92
93
94#endif // ALIVZEROTRIGGERSIMULATOR_H