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