ClassImp(AliTPCmapper)
//______________________________________________________________
-AliTPCmapper::AliTPCmapper() :
+AliTPCmapper::AliTPCmapper(const char * dirname) :
fNside(0),
fNsector(0),
fNrcu(0),
fTpcDdlOffset(0),
fROC(NULL)
{
+ //
// Constructor
- Init();
+ //
+ // dirname - specify the directory with the ascii Altro mapping files
+ //
+ Init(dirname);
}
//______________________________________________________________
}
//______________________________________________________________
-void AliTPCmapper::Init()
+void AliTPCmapper::Init(const char *dirname)
{
// Initialize all
fNside = 2;
// Load and read mapping files. AliTPCAltroMapping contains the mapping for
// each patch (rcu).
- TString path = gSystem->Getenv("ALICE_ROOT");
- path += "/TPC/mapping/Patch";
+ TString path;
+ if (dirname==0){
+ path =gSystem->Getenv("ALICE_ROOT");
+ path += "/TPC/mapping/Patch";
+ }else{
+ path = dirname;
+ path +="Patch";
+ }
+
TString path2;
for(Int_t i = 0; i < fNrcu; i++) {
path2 = path;
public:
- AliTPCmapper();
+ AliTPCmapper(const char * dirname=0);
virtual ~AliTPCmapper();
AliTPCmapper& operator = (const AliTPCmapper& mapper);
AliTPCmapper(const AliTPCmapper& mapper);
- void Init();
+ void Init(const char * dirname);
+ //
+ AliTPCAltroMapping **GetAltroMapping(){ return fMapping;};
// ALTRO mapping functions
Int_t GetPad(Int_t patch, Int_t hwAddress) const;