///////////////////////////////////////////////////////////////////
#include "AliITSDDLModuleMapSDD.h"
+#include "AliLog.h"
ClassImp(AliITSDDLModuleMapSDD)
}
}
//______________________________________________________________________
+void AliITSDDLModuleMapSDD::FindInDDLMap(Int_t modIndex, Int_t &iDDL, Int_t &iCarlos) const {
+ // finds DDL and carlos number for a given module
+ for(Int_t iddl=0;iddl<kDDLsNumber;iddl++){
+ for(Int_t ichan=0; ichan<kModulesPerDDL; ichan++){
+ if(fDDLModuleMap[iddl][ichan]==modIndex){
+ iDDL=iddl;
+ iCarlos=ichan;
+ return;
+ }
+ }
+ }
+ AliWarning("Module not found in DDL map");
+ iDDL=-1;
+ iCarlos=-1;
+ return;
+}
+//______________________________________________________________________
void AliITSDDLModuleMapSDD::ReadDDLModuleMap(Char_t *ddlmapfile){
// Fill DDL map from ASCCI data file
FILE *fil;
///////////////////////////////////////////////////////////////////
#include<TObject.h>
+#include<AliITSgeomTGeo.h>
class AliITSDDLModuleMapSDD : public TObject {
void ReadDDLModuleMap(Char_t *ddlmapfile);
Int_t GetModuleNumber(UInt_t iDDL, UInt_t iChan) const {return fDDLModuleMap[iDDL][iChan];}
+ void FindInDDLMap(Int_t modIndex, Int_t &iDDL, Int_t &iCarlos) const;
+ void FindInDDLMap(Int_t lay, Int_t lad, Int_t det, Int_t &iDDL, Int_t &iCarlos) const {
+ FindInDDLMap(AliITSgeomTGeo::GetModuleIndex(lay,lad,det),iDDL,iCarlos);
+ }
static Int_t GetNDDLs(){return kDDLsNumber;}
static Int_t GetNModPerDDL(){return kModulesPerDDL;}