]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/EMCALUtils/AliEMCALTriggerMapping.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / EMCAL / EMCALUtils / AliEMCALTriggerMapping.h
1 #ifndef ALIEMCALTRIGGERMAPPING_H
2 #define ALIEMCALTRIGGERMAPPING_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /*
7  
8 Mapping ABC 
9 Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3
10 */
11 #ifndef ROOT_TObject
12 #  include "TObject.h"
13 #endif
14
15 class AliEMCALGeometry;
16
17 class AliEMCALTriggerMapping : public TObject 
18 {
19 public:
20            AliEMCALTriggerMapping() : fNTRU(0), fGeometry(0x0) {}
21            AliEMCALTriggerMapping(const Int_t ntru, const AliEMCALGeometry* geo) : fNTRU(ntru), fGeometry(geo) {}
22   virtual ~AliEMCALTriggerMapping() {}
23   
24   virtual Bool_t GetAbsFastORIndexFromTRU(const Int_t iTRU, const Int_t iADC, Int_t& id)                             const = 0;
25   virtual Bool_t GetAbsFastORIndexFromPositionInTRU(const Int_t iTRU, const Int_t iEta, const Int_t iPhi, Int_t& id) const = 0;
26   virtual Bool_t GetAbsFastORIndexFromPositionInSM(const Int_t  iSM, const Int_t iEta, const Int_t iPhi, Int_t& id)  const = 0;
27   virtual Bool_t GetAbsFastORIndexFromPositionInEMCAL(const Int_t iEta, const Int_t iPhi, Int_t& id)                 const = 0;
28   virtual Bool_t GetTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iADC)                                  const = 0;
29   virtual Bool_t GetPositionInTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iEta, Int_t& iPhi)           const = 0;
30   virtual Bool_t GetPositionInSMFromAbsFastORIndex(const Int_t id, Int_t& iSM, Int_t& iEta, Int_t& iPhi)             const = 0;
31   virtual Bool_t GetPositionInEMCALFromAbsFastORIndex(const Int_t id, Int_t& iEta, Int_t& iPhi)                      const = 0;
32   virtual Bool_t GetFastORIndexFromCellIndex(const Int_t id, Int_t& idx)                                             const = 0;
33   virtual Bool_t GetCellIndexFromFastORIndex(const Int_t id, Int_t idx[4])                                           const = 0;
34   virtual Bool_t GetTRUIndexFromSTUIndex(const Int_t id, Int_t& idx)                                                 const = 0;
35   virtual Bool_t GetTRUIndexFromOnlineIndex(const Int_t id, Int_t& idx)                                              const = 0;
36   virtual Bool_t GetOnlineIndexFromTRUIndex(const Int_t id, Int_t& idx)                                              const = 0;
37   virtual Bool_t GetFastORIndexFromL0Index(const Int_t iTRU, const Int_t id, Int_t idx[], const Int_t size)          const = 0;
38
39   virtual Int_t  GetTRUIndexFromSTUIndex(   const Int_t id)                                                          const = 0;
40   virtual Int_t  GetTRUIndexFromOnlineIndex(const Int_t id)                                                          const = 0;
41   virtual Int_t  GetOnlineIndexFromTRUIndex(const Int_t id)                                                          const = 0;
42   
43   virtual void  GetNTRU(Int_t& n) {n = fNTRU;}
44   virtual Int_t GetNTRU() {return fNTRU;}
45   
46 protected:  
47   Int_t fNTRU;
48   const AliEMCALGeometry* fGeometry;
49   
50 private:
51   AliEMCALTriggerMapping(const AliEMCALTriggerMapping& rhs);
52   AliEMCALTriggerMapping& operator=(const AliEMCALTriggerMapping& rhs);
53   
54   ClassDef(AliEMCALTriggerMapping,1)
55 };
56  
57 #endif
58