* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
+
#include "AliHLTEMCALMapper.h"
-#include "AliHLTEMCALConstant.h"
-#include "assert.h"
+//#include "AliHLTEMCALConstant.h"
+// #include "AliHLTCaloConstant.h"
-using namespace EmcalHLTConst;
+#include "assert.h"
+//using namespace EmcalHLTConst;
+#include "AliHLTCaloConstants.h"
+using EMCAL::NXCOLUMNSMOD;
+using EMCAL::NZROWSMOD;
+using EMCAL::NMODULES;
+using EMCAL::NRCUSPERMODULE;
+using EMCAL::NRCUSPERSECTOR;
AliHLTEMCALMapper::AliHLTEMCALMapper(const unsigned long specification ) : AliHLTCaloMapper(specification, "EMCAL")
{
fCellSize = 6;
InitAltroMapping(specification);
InitDDLSpecificationMapping();
- fIsInitializedMapping = true; //CRAP PTH, must check is the initilization actually went ok
+ fIsInitializedMapping = true; //CRAP PTH, must check if the initilization actually went ok
}
}
-
-// channelCoord[0] = (static_cast<Float_t>(channelId&0x3f) - NXCOLUMNSMOD/2)* fCellStep;
-// channelCoord[1] = (static_cast<Float_t>((channelId >> 6)&0x3f) - NZROWSMOD/2) * fCellStep;
-
void
AliHLTEMCALMapper::GetLocalCoord(const int channelId, Float_t* localCoord) const
{
if(base !=0)
{
- // int tmpddlindex = GetDDLFromSpec( specification )%2;
-
sprintf(fFilepath, "%s/EMCAL/mapping/%s", base, DDL2RcuMapFileName( GetDDLFromSpec( specification ) ) );
sprintf(fFilepath, "%s/EMCAL/mapping/%s", base, DDL2RcuMapFileName( GetDDLFromSpec( specification ) ) );
- // assert("DDL spec is %d", GetDDLFromSpec( specification ) );
-
- ////cout << __FILE__ <<":"<< __LINE__ <<"DDL spec is " << GetDDLFromSpec( specification ) << endl;
- //cout << __FILE__ <<":"<< __LINE__ <<"mapping filename is " << fFilepath << endl;
- // sprintf(fFilepath,"%s/PHOS/mapping/RCU0.data", base);
FILE *fp = fopen(fFilepath, "r");
if(fp != 0)
{
{
res = fscanf(fp, "%d %d %d %d\n", &tmpHwaddr, &tmpXCol, &tmpZRow, &tmpGain);
- // //cout << __FILE__ << __LINE__ << " tmpHwaddr = " << tmpHwaddr << ", tmpXCol = " << (int)tmpXCol << ", tmpZRow = "<< (int)tmpZRow << ", tmpGain= "<< (int)tmpGain << endl;
-
if(tmpGain < 2)
{
fHw2geomapPtr[tmpHwaddr].fXCol = (char)tmpXCol;
}
else
{
- //cout << __FUNCTION__ << ":"<<__FILE__<<":"<< __LINE__ << "ERROR, could not open mapping file %s" << fFilepath << endl;
fIsInitializedMapping = false;
}
}
void
AliHLTEMCALMapper::InitDDLSpecificationMapping()
{
- fSpecificationMapPtr = new fDDLSpecificationMap[EmcalHLTConst::NMODULES*EmcalHLTConst::NRCUSPERMODULE];
+ fSpecificationMapPtr = new fDDLSpecificationMap[NMODULES*NRCUSPERMODULE];
- for(Int_t ddl = 0; ddl < EmcalHLTConst::NMODULES*EmcalHLTConst::NRCUSPERMODULE; ddl++)
+ for(Int_t ddl = 0; ddl < NMODULES*NRCUSPERMODULE; ddl++)
{
- fSpecificationMapPtr[ddl].fModId = ddl/(EmcalHLTConst::NRCUSPERMODULE);
+ fSpecificationMapPtr[ddl].fModId = ddl/( NRCUSPERMODULE );
}
}