1 // $Id: AliHLTCalorimeterMapper.cxx 34622 2009-09-04 13:22:01Z odjuvsla $
3 /**************************************************************************
4 * This file is property of and copyright by the Experimental Nuclear *
5 * Physics Group, Dep. of Physics *
6 * University of Oslo, Norway, 2006 *
8 * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project. *
9 * Contributors are mentioned in the code where appropriate. *
10 * Please report bugs to perthi@fys.uio.no *
12 * Permission to use, copy, modify and distribute this software and its *
13 * documentation strictly for non-commercial purposes is hereby granted *
14 * without fee, provided that the above copyright notice appears in all *
15 * copies and that both the copyright notice and this permission notice *
16 * appear in the supporting documentation. The authors make no claims *
17 * about the suitability of this software for any purpose. It is *
18 * provided "as is" without express or implied warranty. *
19 **************************************************************************/
22 // Mapping class fro mapping
23 // from hardware address to geometrical address
27 #include "AliHLTCaloMapper.h"
28 #include "AliHLTLogging.h"
32 #include "AliHLTCaloCoordinate.h"
34 using namespace CaloHLTConst;
36 //ClassImp(AliHLTCaloMapper)
38 AliHLTCaloMapper::AliHLTCaloMapper() :
41 fIsInitializedMapping(false),
42 fSpecificationMapPtr(0)
44 //see header file for class documentation
48 AliHLTCaloMapper::~AliHLTCaloMapper()
50 // See header file for documentation
51 delete [] fHw2geomapPtr;
56 //void AliHLTCaloMapper::InitAltroMapping(){
60 //void AliHLTCaloMapper::InitDDLSpecificationMapping() {
67 AliHLTCaloMapper::GetIsInitializedMapping()
69 // See header file for documentation
70 return fIsInitializedMapping;
75 AliHLTCaloMapper::GetFilePath()
77 // See header file for documentation
83 //AliHLTPHOSMapper::GetChannelCoord(const UShort_t channelId, &AliHLTPHOSCoordinate channelCoord)
84 AliHLTCaloMapper::ChannelId2Coordinate(const UShort_t channelId, AliHLTCaloCoordinate &channelCoord)
86 // TODO: change format to facilitate for EMCal (more modules)
87 channelCoord.fX = channelId&0x3f;
88 channelCoord.fZ = (channelId >> 6)&0x3f;
89 channelCoord.fGain = (channelId >> 12)&0x1;
90 channelCoord.fModuleId = (channelId >> 13)&0x1f;
91 // printf("Channel ID: 0x%X Coordinates: x = %d, z = %d, gain = %d\n", channelId, channelCoord[0], channelCoord[1], channelCoord[2]);