Possibility to set external mapping files. TO be used in order to remove the exsting...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 Nov 2007 16:03:06 +0000 (16:03 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 Nov 2007 16:03:06 +0000 (16:03 +0000)
TPC/AliTPCRawStream.cxx
TPC/AliTPCRawStream.h

index 51ee29e..1383980 100644 (file)
@@ -36,7 +36,7 @@
 ClassImp(AliTPCRawStream)
 
 //_____________________________________________________________________________
-AliTPCRawStream::AliTPCRawStream(AliRawReader* rawReader) :
+AliTPCRawStream::AliTPCRawStream(AliRawReader* rawReader, AliAltroMapping **mapping) :
   AliAltroRawStream(rawReader),
   fSector(-1),
   fPrevSector(-1),
@@ -44,22 +44,29 @@ AliTPCRawStream::AliTPCRawStream(AliRawReader* rawReader) :
   fPrevRow(-1),
   fPad(-1),
   fPrevPad(-1),
-  fIsMapOwner(kTRUE)
+  fIsMapOwner(kFALSE)
 {
   // create an object to read TPC raw digits
 
   SelectRawData("TPC");
 
-  TString path = gSystem->Getenv("ALICE_ROOT");
-  path += "/TPC/mapping/Patch";
-  TString path2;
-  for(Int_t i = 0; i < 6; i++) {
-    path2 = path;
-    path2 += i;
-    path2 += ".data";
-    fMapping[i] = new AliTPCAltroMapping(path2.Data());
+  if (mapping = NULL) {
+    TString path = gSystem->Getenv("ALICE_ROOT");
+    path += "/TPC/mapping/Patch";
+    TString path2;
+    for(Int_t i = 0; i < 6; i++) {
+      path2 = path;
+      path2 += i;
+      path2 += ".data";
+      fMapping[i] = new AliTPCAltroMapping(path2.Data());
+    }
+    fIsMapOwner = kTRUE;
   }
-
+  else {
+    for(Int_t i = 0; i < 6; i++)
+      fMapping[i] = mapping[i];
+  }
+    
   fNoAltroMapping = kFALSE;
 }
 
index fe149f2..e314189 100644 (file)
@@ -16,7 +16,7 @@ class AliAltroMapping;
 
 class AliTPCRawStream: public AliAltroRawStream {
   public :
-    AliTPCRawStream(AliRawReader* rawReader);
+    AliTPCRawStream(AliRawReader* rawReader, AliAltroMapping **mapping = NULL);
     virtual ~AliTPCRawStream();
 
     virtual void             Reset();