]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/CALO/AliHLTCaloMapper.h
merging with svn
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloMapper.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTCALOMapper.h 34264 2009-08-14 18:29:23Z odjuvsla $
3
4 #ifndef ALIHLTCALOMAPPER_H
5 #define ALIHLTCALOMAPPER_H
6
7
8 /**************************************************************************
9  * This file is property of and copyright by the Experimental Nuclear     *
10  * Physics Group, Dep. of Physics                                         *
11  * University of Oslo, Norway, 2006                                       *
12  *                                                                        * 
13  * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project.  *
14  * Contributors are mentioned in the code where appropriate.              *
15  * Please report bugs to perthi@fys.uio.no                                * 
16  *                                                                        *
17  * Permission to use, copy, modify and distribute this software and its   *
18  * documentation strictly for non-commercial purposes is hereby granted   *
19  * without fee, provided that the above copyright notice appears in all   *
20  * copies and that both the copyright notice and this permission notice   *
21  * appear in the supporting documentation. The authors make no claims     *
22  * about the suitability of this software for any purpose. It is          *
23  * provided "as is" without express or implied warranty.                  *
24  **************************************************************************/
25
26
27 #include "AliHLTCaloConstants.h"
28 #include "Rtypes.h"
29 #include "AliHLTLogging.h"
30
31 using namespace CaloHLTConst;
32
33
34 class AliHLTCaloCoordinate;
35
36 class AliHLTCaloMapper : public AliHLTLogging
37 {
38 public:
39   AliHLTCaloMapper(const unsigned long speficication);
40   virtual ~AliHLTCaloMapper();
41   virtual void InitAltroMapping( const unsigned long specification ) = 0; 
42   virtual void InitDDLSpecificationMapping() = 0;
43   bool GetIsInitializedMapping();
44   char* GetFilePath();
45   int GetDDLFromSpec( const AliHLTUInt32_t spec );
46   static unsigned long GetSpecFromDDLIndex( const int ddlindex );
47   //  UInt_t  GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd);
48   int  GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd);
49   static void ChannelId2Coordinate(const int channelId,    AliHLTCaloCoordinate &channelCoord);
50
51   // static void GetLocalCoord(const int channelId, Float_t* localCoord) = 0; 
52   
53   virtual void GetLocalCoord(const int channelId, Float_t* localCoord) const = 0; 
54
55  struct fAltromap{ 
56     char fZRow; // Coordinate in Z direction (beam direction) relatve to one Module
57     char fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve to one Module
58     char fGain; // Gain (high gain = 1, low gain = 0)
59   };
60   
61   struct fDDLSpecificationMap{ 
62     char fModId; 
63   };
64   
65
66   fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address 
67
68   char fFilepath[1024];
69
70 protected:
71   float fCellSize;
72   int fSpecification;
73   bool fIsInitializedMapping;
74   fDDLSpecificationMap* fSpecificationMapPtr;
75   
76  private:
77   AliHLTCaloMapper();
78   AliHLTCaloMapper(const AliHLTCaloMapper & );
79   AliHLTCaloMapper & operator = (const AliHLTCaloMapper &);
80   
81 };
82
83 #endif