//-*- Mode: C++ -*-
-// $Id: AliHLTCaloMapper.h 34264 2009-08-14 18:29:23Z odjuvsla $
+// $Id: AliHLTCALOMapper.h 34264 2009-08-14 18:29:23Z odjuvsla $
#ifndef ALIHLTCALOMAPPER_H
#define ALIHLTCALOMAPPER_H
* provided "as is" without express or implied warranty. *
**************************************************************************/
-//#include "AliHLTCaloBase.h"
#include "AliHLTCaloConstants.h"
-
-using namespace CaloHLTConst;
-
#include "Rtypes.h"
#include "AliHLTLogging.h"
+#include "AliHLTCaloConstantsHandler.h"
-//#include "AliPHOSEMCAGeometry.h"
+#define FILEPATHMAXLENGTH 1024
class AliHLTCaloCoordinate;
-class AliHLTCaloMapper : public AliHLTLogging
-//class AliHLTCaloMapper
+class AliHLTCaloMapper : public AliHLTCaloConstantsHandler, public AliHLTLogging
{
- public:
- AliHLTCaloMapper();
+public:
+
+ AliHLTCaloMapper(const unsigned long specification, TString det);
virtual ~AliHLTCaloMapper();
-
- virtual void InitAltroMapping() = 0;
+ virtual Bool_t InitAltroMapping( const unsigned long specification ) = 0;
virtual void InitDDLSpecificationMapping() = 0;
-
bool GetIsInitializedMapping();
- char* GetFilePath();
- const virtual int GetDDLFromSpec( const AliHLTUInt32_t spec )=0;
- const virtual int GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd) = 0;
- void ChannelId2Coordinate(const UShort_t channelId, AliHLTCaloCoordinate &channelCoord);
- // UShort_t GetChannelID(Int_t specification, Int_t hwAddress);
- // static void GetChannelCoord(UShort_t channelId, UShort_t* channelCoord);
- // static void GetLocalCoord(UShort_t channelId, Float_t* localCoord);
- // int GetDDLFromSpec(Int_t specification);
-
- 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)
- };
+ virtual char* GetFilePath();
+
+ virtual int GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd);
+ static void GetChannelCoord(const UShort_t channelId, UShort_t* channelCoord);
+ static void ChannelId2Coordinate(const int channelId, AliHLTCaloCoordinate &channelCoord);
+ virtual void GetLocalCoord(const int channelId, Float_t* localCoord) const;
+ int GetDDLFromSpec( const AliHLTUInt32_t spec );
+ int GetModuleFromSpec(UInt_t specification);
+ static unsigned long GetSpecFromDDLIndex( const int ddlindex );
+
+ struct fAltromap{
+ char fZRow; // Coordinate in Z direction (beam direction) relatve to one Module
+ char fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve to one Module
+ char 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 fRcuZOffset;
int fModId;
};
+
+// struct fDDLSpecificationMap{
+// char fModId;
+// };
+
fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address
-
- char fFilepath[1024];
+ char fFilepath[FILEPATHMAXLENGTH];
protected:
+ float fCellSize;
+ int fSpecification;
bool fIsInitializedMapping;
fDDLSpecificationMap* fSpecificationMapPtr;
-
-
+ TString fCaloDet;
+
private:
+ AliHLTCaloMapper();
AliHLTCaloMapper(const AliHLTCaloMapper & );
AliHLTCaloMapper & operator = (const AliHLTCaloMapper &);
- //AliPHOSEMCAGeometry fPHOSGeometry;
- //static const Float_t fCellStep = 2.2;//2.*fPHOSGeometry.GetAirCellHalfSize()[0];
+
+
+ ClassDef(AliHLTCaloMapper, 1);
+
};
#endif