+//-*- 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"
+
+struct AliHLTCaloCoordinate;
+struct AliHLTPHOSCoordinate;
+
+class AliHLTPHOSMapper : public AliHLTCaloMapper
{
public:
+
AliHLTPHOSMapper();
virtual ~AliHLTPHOSMapper();
- void InitAltroMapping();
-
- 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;
- };
-
-
-altromap *hw2geomapPtr;
+
+ 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);
+
+ //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
+
+
+ char fFilepath[1024];
+
+ private:
+ bool fIsInitializedMapping;
+
+ /** Flag for initialised DDL map */
+ bool fDDLMapInitialised;
+ AliHLTPHOSMapper(const AliHLTPHOSMapper & );
+ AliHLTPHOSMapper & operator = (const AliHLTPHOSMapper &);
+
+ // fDDLSpecificationMap* fSpecificationMapPtr;
+ //AliPHOSEMCAGeometry fPHOSGeometry;
+
+ Int_t fModuleId;
+ int fDDLId;
};
#endif