Update on trigger code (Rachid)
[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
de39a0ff 12#include "AliEMCALTriggerTypes.h"
13
916f1e76 14#include "TVector2.h"
15
16class TClonesArray;
916f1e76 17
916f1e76 18class AliEMCALTriggerBoard : public TObject
19{
20
21public:
22 AliEMCALTriggerBoard();
fff39dd1 23 AliEMCALTriggerBoard(const TVector2& RegionSize);
916f1e76 24 virtual ~AliEMCALTriggerBoard();
25
de39a0ff 26 virtual void SlidingWindow(TriggerType_t type, Int_t Threshold, Int_t time = -1);
916f1e76 27
28 virtual void ZeroRegion();
29
30 virtual void Scan();
31 virtual void Reset();
32
33 virtual void PatchSize(TVector2& Size) const {Size = *fPatchSize;}
34 virtual TVector2* PatchSize( ) const { return fPatchSize;}
35 virtual void RegionSize(TVector2& Size) const {Size = *fRegionSize;}
36 virtual TVector2* RegionSize( ) const { return fRegionSize;}
37 virtual void SubRegionSize(TVector2& Size) const {Size = *fSubRegionSize;}
38 virtual TVector2* SubRegionSize( ) const { return fSubRegionSize;}
39
40 virtual const TClonesArray& Patches() const {return *fPatches;}
41
42 virtual void SetRegionSize(const TVector2& Size) { *fRegionSize = Size;}
43 virtual void SetPatchSize(const TVector2& Size) { *fPatchSize = Size;}
44 virtual void SetSubRegionSize(const TVector2& Size) { *fSubRegionSize = Size;}
de39a0ff 45
46 virtual void SetRegion(Int_t arr[][64]) {for (Int_t i = 0; i < fRegionSize->X(); i++) for (Int_t j = 0; j < fRegionSize->Y(); j++) fRegion[i][j] = arr[i][j];}
916f1e76 47
48 virtual Int_t** Region() {return fRegion;}
49 virtual Int_t** Map() {return fMap;}
de39a0ff 50 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];}
916f1e76 51
52private:
53
54 AliEMCALTriggerBoard(const AliEMCALTriggerBoard& rhs); // NOT implemented
55 AliEMCALTriggerBoard& operator=(const AliEMCALTriggerBoard& rhs); // NOT implemented
56
57protected:
58
59 Int_t** fRegion; //!
60 Int_t** fMap; //! Map the position to digit index (which eq. to ADC channel)
61 TVector2* fRegionSize; //! in FastOR unit
62 TVector2* fSubRegionSize; //! in FastOR unit
63 TVector2* fPatchSize; //! in subregion unit
64 TClonesArray* fPatches; //!
65
66 ClassDef(AliEMCALTriggerBoard,1)
67};
68
69#endif