]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSMapper.h
- data member was shadowed (fTree)
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSMapper.h
index 592d10a89876819845835c4b0ecaeeb41f81e75a..a79937281eba4c82a77d7b12e79c3234ec684d86 100644 (file)
@@ -1,6 +1,10 @@
+//-*- Mode: C++ -*-
+// $Id$
+
 #ifndef ALIHLTPHOSMAPPER_H
 #define ALIHLTPHOSMAPPER_H
 
+
 /**************************************************************************
  * This file is property of and copyright by the Experimental Nuclear     *
  * Physics Group, Dep. of Physics                                         *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-//#include "PhosFeeClient.h"
-
-//#include "stdio.h"
-//#include <iostream>
-#include <cstdlib>
-#include <assert.h>
-//#include "AliHLTPHOSCommonDefs.h"
-//#include "AliHLTPHOSConstants.h"
-#include "AliHLTPHOSBase.h"
-    
-//            PhosHLTConst
-using namespace std;
-using namespace PhosHLTConst;
-
-class AliHLTPHOSMapper : public AliHLTPHOSBase
+//#include "AliHLTPHOSBase.h"
+
+//using namespace PhosHLTConst;
+#include "Rtypes.h"
+#include "AliHLTLogging.h"
+
+#include "AliPHOSEMCAGeometry.h"
+
+class AliHLTPHOSCoordinate;
+
+class AliHLTPHOSMapper : public AliHLTLogging
+//class AliHLTPHOSMapper 
 {
  public:
   AliHLTPHOSMapper();
   virtual ~AliHLTPHOSMapper();
   void InitAltroMapping(); 
+  void InitDDLSpecificationMapping();
+  bool GetIsInitializedMapping();
+  char* GetFilePath();
+
+  UShort_t GetChannelID(Int_t specification, Int_t hwAddress);
+  static void GetChannelCoord(const UShort_t channelId, UShort_t* channelCoord);
+  static void ChannelId2Coordinate(const UShort_t channelId, AliHLTPHOSCoordinate &channelCoord );
+  static void GetLocalCoord(const UShort_t channelId, Float_t* localCoord);
+  int GetDDLFromSpec(Int_t specification);
+  int GetModuleFromSpec(Int_t specification);
 
-  struct altromap{ 
-    //    int mod;
-    int zRow;
-    int xCol;
-    int gain;
-    //    int rcu;
-    //    int branch;
-    //    int card;
-    //    int chip;
-    //    int chan;
-    //    int csp;
-    //    int num;
-    //    int hid;
+  struct fAltromap{ 
+    int fZRow; // Coordinate in Z direction (beam direction) relatve too one RCU
+    int fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
+    int fGain; // Gain (high gain = 1, low gain = 0)
   };
+  
+  struct fDDLSpecificationMap{ 
+    UInt_t fRcuX; // Coordinate in Z direction (beam direction) relatve too one RCU
+    UInt_t fRcuZ; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
+    UInt_t fRcuXOffset;
+    UInt_t fRcuZOffset;
+    int fModId; 
+  };
+
+  fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address 
 
 
-altromap *hw2geomapPtr;
+  char fFilepath[1024];
 
+ private:
+  bool fIsInitializedMapping;
+  AliHLTPHOSMapper(const AliHLTPHOSMapper & );
+  AliHLTPHOSMapper & operator = (const AliHLTPHOSMapper &);
+  
+  fDDLSpecificationMap* fSpecificationMapPtr;
+  //AliPHOSEMCAGeometry fPHOSGeometry;
+  static const Float_t fCellStep = 2.2;//2.*fPHOSGeometry.GetAirCellHalfSize()[0];
 };
 
 #endif