]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSMapper.h
- adding possibility to cut on time in the digit maker
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSMapper.h
index 8d9b8bda03569e5fe9e000aed1cc7fe7add1df32..a33454cba18cfff221f8f1688d9386a9fab8c019 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 "AliHLTCaloMapper.h"
+#include "AliPHOSEMCAGeometry.h"
+
+class AliHLTCaloCoordinate;
+class AliHLTPHOSCoordinate;
+
+class AliHLTPHOSMapper : public AliHLTCaloMapper
 {
  public:
+
   AliHLTPHOSMapper();
   virtual ~AliHLTPHOSMapper();
-  void InitAltroMapping(); 
   
+  Bool_t InitAltroMapping(const unsigned long specification); 
+  void InitDDLSpecificationMapping();
+  bool GetIsInitializedMapping();
+  //  char* GetFilePath(const int ddlId);
+  
+  Int_t GetChannelID(Int_t hwAddress);
+  Int_t GetChannelID(AliHLTUInt32_t specification, Int_t hwAddress);
 
-  struct altromap{ 
-    //    int mod;
-    int row;
-    int col;
-    int gain;
-    //    int rcu;
-    //    int branch;
-    //    int card;
-    //    int chip;
-    //    int chan;
-    //    int csp;
-    //    int num;
-    //    int hid;
-  };
-
-
-altromap *hw2geomapPtr;
-
-
-  /*
-  struct FEE_CSP_MAP{ 
-    int row;
-    int col;
-    int gain;
-    int csp;
-    int num;
-  };
-  */
-
-  /*
-  struct ALTRO_GEO_MAP{ 
-    int mod;
-    int gain;
-    int row;
-    int col;
-    int rcu;
-    int branch;
-    int card;
-    int chip;
-    int chan;
-    int csp;
-    int num;
-    int hid;
-  };
-  */
-
-  //  void AddCsp(int csp, int chip, int chHi, int chLo, int numHi, int numLo);
-
-  //Function to generate Active Channel List (ACL)for each of the four readout partitions
-  //Of the Phos Module. The ACL register is 256x16 bit big.
-  //  void GenerateACL(int startZ, int endZ, int startX, int endX, int mID, int acl[RCUS_PER_MODULE][256], unsigned long int afl[RCUS_PER_MODULE]);
-
-  //  void InitAltroCspMapping();
-
-  /*
-  inline int Geo2hid(int mod, int gain, int row, int col);
-  inline int Hid2mod(int hid);
-  inline int Hid2gain(int hid);
-  inline int Hid2row(int hid);
-  inline int Hid2col(int hid);
-  inline int ExtractHid(char *objName);  
-
-  inline void InitAltroMapping(int saveMapping);
-  inline void PrintHistMapInfo(char *objName);
-  */
-
-  /*
-  int Geo2hid(int mod, int gain, int row, int col);
-  int Hid2mod(int hid);
-  int Hid2gain(int hid);
-  int Hid2row(int hid);
-  int Hid2col(int hid);
-  int ExtractHid(char *objName);  
-
-  void InitAltroMapping(int saveMapping);
-  void PrintHistMapInfo(char *objName);
-
-  FEE_CSP_MAP CSP_MAP[N_ALTROS][N_ALTROCHANNELS];
-  ALTRO_GEO_MAP ALTRO_MAP[N_MODULES*N_RCUS*N_BRANCHES*N_FEECS*N_ALTROS*N_ALTROCHANNELS];  
-  int hdw2geo[N_MODULES][N_RCUS][N_BRANCHES][N_FEECS][N_ALTROS][N_ALTROCHANNELS];
-  int geo2hdw[N_MODULES][N_GAINS][ N_XCOLUMNS_MOD][N_ZROWS_MOD]; 
-  */
+  //static void GetChannelCoord(const Int_t channelId, UShort_t* channelCoord);
+  //static void ChannelId2Coordinate(const Int_t channelId, AliHLTCaloCoordinate &channelCoord );
+  //static void GetLocalCoord(const Int_t channelId, Float_t* localCoord);
+  int GetDDLFromSpec(AliHLTUInt32_t specification);
+  int GetModuleFromSpec(AliHLTUInt32_t specification);
+
+//   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 
 
- private:
 
+  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];
+  
+  Int_t fModuleId;
+    int fDDLId;
 };
 
 #endif