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