New Trigger Emulation and Trigger access from data (Rachid Guernane)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTriggerBoard.h
CommitLineData
916f1e76 1#ifndef ALIEMCALTRIGGERBOARD_H
2#define ALIEMCALTRIGGERBOARD_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/*
7EMCal trigger board super class
8run the sliding window algorithm
9Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3
10*/
11
12#include "TVector2.h"
13
14class TClonesArray;
15class AliEMCALCalibData;
16
17typedef enum { kGamma, kJet } L1TriggerType_t;
18
19class AliEMCALTriggerBoard : public TObject
20{
21
22public:
23 AliEMCALTriggerBoard();
24 AliEMCALTriggerBoard(const AliEMCALCalibData *calibData, const TVector2& RegionSize);
25 virtual ~AliEMCALTriggerBoard();
26
27 virtual void SlidingWindow(L1TriggerType_t type, Int_t Threshold);
28
29 virtual void ZeroRegion();
30
31 virtual void Scan();
32 virtual void Reset();
33
34 virtual void PatchSize(TVector2& Size) const {Size = *fPatchSize;}
35 virtual TVector2* PatchSize( ) const { return fPatchSize;}
36 virtual void RegionSize(TVector2& Size) const {Size = *fRegionSize;}
37 virtual TVector2* RegionSize( ) const { return fRegionSize;}
38 virtual void SubRegionSize(TVector2& Size) const {Size = *fSubRegionSize;}
39 virtual TVector2* SubRegionSize( ) const { return fSubRegionSize;}
40
41 virtual const TClonesArray& Patches() const {return *fPatches;}
42
43 virtual void SetRegionSize(const TVector2& Size) { *fRegionSize = Size;}
44 virtual void SetPatchSize(const TVector2& Size) { *fPatchSize = Size;}
45 virtual void SetSubRegionSize(const TVector2& Size) { *fSubRegionSize = Size;}
46
47 virtual Int_t** Region() {return fRegion;}
48 virtual Int_t** Map() {return fMap;}
49 virtual void Map(Int_t arr[][64], const TVector2& Size) {for (Int_t i=0;i<Size.X();i++) for (Int_t j=0;j<Size.Y();j++) arr[i][j] = fMap[i][j];}
50
51private:
52
53 AliEMCALTriggerBoard(const AliEMCALTriggerBoard& rhs); // NOT implemented
54 AliEMCALTriggerBoard& operator=(const AliEMCALTriggerBoard& rhs); // NOT implemented
55
56protected:
57
58 Int_t** fRegion; //!
59 Int_t** fMap; //! Map the position to digit index (which eq. to ADC channel)
60 TVector2* fRegionSize; //! in FastOR unit
61 TVector2* fSubRegionSize; //! in FastOR unit
62 TVector2* fPatchSize; //! in subregion unit
63 TClonesArray* fPatches; //!
64
65 ClassDef(AliEMCALTriggerBoard,1)
66};
67
68#endif