reduced size of TRD cluster for data exchange, make use of new speed improvements...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jul 2010 13:00:24 +0000 (13:00 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jul 2010 13:00:24 +0000 (13:00 +0000)
16 files changed:
HLT/AliHLTTRDLinkDef.h
HLT/TRD/AliHLTTRDCluster.cxx
HLT/TRD/AliHLTTRDCluster.h
HLT/TRD/AliHLTTRDClusterizer.cxx
HLT/TRD/AliHLTTRDClusterizer.h
HLT/TRD/AliHLTTRDClusterizerComponent.cxx
HLT/TRD/AliHLTTRDTrack.cxx
HLT/TRD/AliHLTTRDTrack.h
HLT/TRD/AliHLTTRDTrackerV1Component.cxx
HLT/TRD/AliHLTTRDTracklet.cxx
HLT/TRD/AliHLTTRDTracklet.h
HLT/TRD/AliHLTTRDUtils.cxx
HLT/TRD/AliHLTTRDUtils.h
HLT/TRD/macros/CMakeLists.txt
HLT/TRD/macros/aliHLTTRDrun.cxx
HLT/TRD/macros/rec-hlt-trd.cxx

index a2a00e6..2c07137 100644 (file)
 #pragma link C++ class AliHLTTRDCalibFitComponent;
 #pragma link C++ class AliHLTTRDCalibHistoComponent;
 #pragma link C++ class AliHLTTRDUtils;
+#pragma link C++ class AliHLTTRDOfflineClusterizerComponent;
+#pragma link C++ class AliHLTTRDOfflineTrackerV1Component;
 #pragma link C++ class AliHLTTRDClusterHistoComponent;
 #pragma link C++ class AliHLTTRDTrackHistoComponent;
 #pragma link C++ class AliHLTTRDHistoMergerComponent;
-#pragma link C++ class AliHLTTRDOfflineClusterizerComponent;
-#pragma link C++ class AliHLTTRDOfflineTrackerV1Component;
 #endif
 
index 0dda8d8..8d06955 100644 (file)
@@ -1,16 +1,35 @@
+// $Id$
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors:                                                               *
+ *          for The ALICE HLT Project.                                    *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//  @file   AliHLTTRDCluster.cxx
+//  @author Theodor Rascanu
+//  @date   
+//  @brief  A datacontainer for clusters fitting component for the HLT. 
+// 
+
 #include "AliHLTTRDCluster.h"
+#include <cstring>
 
 /**
  * Default Constructor
  */
 //============================================================================
 AliHLTTRDCluster::AliHLTTRDCluster():
-  fX(0),
-  fY(0),
-  fZ(0),
-  fDetector(-1),
-  fLocalTimeBin(0),
-  fClusterMasking(0),
+  fSignals(0),
   fPadCol(0),
   fPadRow(0),
   fPadTime(0),
@@ -23,55 +42,113 @@ AliHLTTRDCluster::AliHLTTRDCluster():
  */
 //============================================================================
 AliHLTTRDCluster::AliHLTTRDCluster(const AliTRDcluster* const inCluster):
-  fX (inCluster->GetX()),
-  fY (inCluster->GetY()),
-  fZ (inCluster->GetZ()),
-  fDetector (inCluster->fDetector),
-  fLocalTimeBin (inCluster->fLocalTimeBin),
-  fClusterMasking (inCluster->fClusterMasking),
-  fPadCol (inCluster->fPadCol),
-  fPadRow (inCluster->fPadRow),
-  fPadTime (inCluster->fPadTime),
+  fSignals(0),
+  fPadCol(inCluster->fPadCol),
+  fPadRow(inCluster->fPadRow),
+  fPadTime(inCluster->fPadTime),
   fBits(0)
 {
 
-  for(int i=0; i<3; i++)
-    fSignals[i]=inCluster->fSignals[i+2];
+  fSignals = inCluster->fSignals[2];
+  fSignals|= inCluster->fSignals[3]<<10;
+  fSignals|= inCluster->fSignals[4]<<20;
 
   fBits = UInt_t(inCluster->TestBits(-1)) >> 14; 
 }
 
-
 /**
  * Copy data to the output TRDcluster
  */
 //============================================================================
 void AliHLTTRDCluster::ExportTRDCluster(AliTRDcluster* const outCluster) const
 {
-  outCluster->SetX(fX);
-  outCluster->SetY(fY);
-  outCluster->SetZ(fZ);
-  outCluster->fDetector=fDetector;
-  outCluster->fLocalTimeBin=fLocalTimeBin;
-  outCluster->fClusterMasking=fClusterMasking;
   outCluster->fPadCol=fPadCol;
   outCluster->fPadRow=fPadRow;
   outCluster->fPadTime=fPadTime;
+  
+  outCluster->fSignals[2] = 0x3ff & fSignals;
+  outCluster->fSignals[3] = 0x3ff & fSignals>>10;
+  outCluster->fSignals[4] = 0x3ff & fSignals>>20;
 
   for(int i=0; i<3; i++){
-    outCluster->fSignals[i+2]=fSignals[i];
-    outCluster->fQ+=fSignals[i];
+    outCluster->fQ+=outCluster->fSignals[i];
   }
 
   outCluster->SetBit(UInt_t(fBits)<<14);
 }
 
+
+/**
+ * Default Constructor
+ */
+//============================================================================
+AliHLTTRDExtCluster::AliHLTTRDExtCluster():
+  AliHLTTRDCluster(),
+  fX(0),
+  fY(0),
+  fZ(0)
+{
+}
+
+/**
+ * Main Constructor
+ */
+//============================================================================
+AliHLTTRDExtCluster::AliHLTTRDExtCluster(const AliTRDcluster* const inCluster):
+  AliHLTTRDCluster(inCluster),
+  fX(inCluster->GetX()),
+  fY(inCluster->GetY()),
+  fZ(inCluster->GetZ())
+{
+}
+
+
+/**
+ * Copy data to the output TRDcluster
+ */
+//============================================================================
+void AliHLTTRDExtCluster::ExportTRDCluster(AliTRDcluster* const outCluster) const
+{
+  AliHLTTRDCluster::ExportTRDCluster(outCluster);
+  outCluster->SetX(fX);
+  outCluster->SetY(fY);
+  outCluster->SetZ(fZ);
+}
+
 /**
  * Prints main info about cluster
  */
 //============================================================================
-void AliHLTTRDCluster::Print() const
+void AliHLTTRDExtCluster::Print() const
 {
   printf("   --hltCluster-- addr %p; sizeof(*this) %i\n", (void*)this, (int)sizeof(*this));
   printf("     fX %f; fY %f; fZ %f\n",fX,fY,fZ);
 }
+
+/**
+ * Save cluster at block position
+ */
+//============================================================================
+AliHLTUInt32_t AliHLTTRDCluster::SaveAt(AliHLTUInt8_t *const block, const AliTRDcluster* const inClust)
+{
+  AliHLTUInt32_t size=0;
+
+  memcpy(block,inClust,sizeof(AliTRDcluster));
+  size+=sizeof(AliTRDcluster);
+
+  return size;
+}
+
+/**
+ * Read cluster from block
+ */
+//============================================================================
+AliHLTUInt32_t AliHLTTRDCluster::LoadFrom(AliTRDcluster *const outClust, const AliHLTUInt8_t *const block)
+{
+  AliHLTUInt32_t size=0;
+
+  memcpy(((AliHLTUInt8_t*)outClust)+sizeof(void*),block+sizeof(void*),sizeof(AliTRDcluster)-sizeof(void*));
+  size+=sizeof(AliTRDcluster);
+
+  return size;
+}
index e7a93de..7c9b932 100644 (file)
@@ -7,38 +7,69 @@
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* See cxx source for full Copyright notice                               *
 
+/** @file   AliHLTTRDCluster.h
+    @author Thedoor Rascanu
+    @date   
+    @brief  A datacontainer for clusters fitting component for the HLT. 
+*/
+
 #include "AliTRDcluster.h"
 #include "AliHLTDataTypes.h"
 
 class AliHLTTRDCluster
 {
- public:
+public:
   AliHLTTRDCluster();
   AliHLTTRDCluster(const AliTRDcluster* const inCluster);
   void ExportTRDCluster(AliTRDcluster* const outCluster) const;
-  void Print() const;
+  static AliHLTUInt32_t SaveAt(AliHLTUInt8_t *const block, const AliTRDcluster* const inClust);
+  static AliHLTUInt32_t LoadFrom(AliTRDcluster *const outClust, const AliHLTUInt8_t *const block);
   
- private:
-  // From AliCluster
-  Float_t  fX;             // X of the cluster in the tracking c.s.
-  Float_t  fY;             // Y of the cluster in the tracking c.s.
-  Float_t  fZ;             // Z of the cluster in the tracking c.s.
-
+private:
   // From AliTRDcluster
-  Short_t  fSignals[3];     // Signals in the cluster
-  Short_t  fDetector;       // TRD detector number 
-  Char_t   fLocalTimeBin;   // T0-calibrated time bin number
-  UChar_t  fClusterMasking; // Bit field containing cluster status information
+  UInt_t   fSignals;        // Signals in the cluster
 
   UChar_t  fPadCol;         // Central pad number in column direction 
   UChar_t  fPadRow;         // Central pad number in row direction 
   UChar_t  fPadTime;        // Uncalibrated time bin number 
-
   UChar_t  fBits;           // Bits of the cluster
+};
+
+class AliHLTTRDExtCluster: public AliHLTTRDCluster
+{
+ public:
+  AliHLTTRDExtCluster();
+  AliHLTTRDExtCluster(const AliTRDcluster* const inCluster);
+  void ExportTRDCluster(AliTRDcluster* const outCluster) const;
+  void Print() const;
 
+ private:
+  // From AliCluster
+  Float_t  fX;             // X of the cluster in the tracking c.s.
+  Float_t  fY;             // Y of the cluster in the tracking c.s.
+  Float_t  fZ;             // Z of the cluster in the tracking c.s.
+
+  // UChar_t  fClusterMasking; // Bit field containing cluster status information
+  // Char_t   fLocalTimeBin;   // T0-calibrated time bin number
   // UChar_t  fNPads;          //  Number of pads in cluster 
   // Float_t  fCenter;         //  Center of the cluster relative to the pad  
 
 };
 
+struct AliHLTTRDClustersArray {
+#ifdef HAVE_NOT_ALITRD_RECOPARAM_r41621
+  typedef AliHLTTRDExtCluster cluster_type;
+#else
+  typedef AliHLTTRDCluster cluster_type;
+#endif
+  AliHLTTRDClustersArray(Int_t det):fDetector(det),fCount(0){}
+  Short_t  fDetector;
+  UShort_t fCount;
+#if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
+  cluster_type fCluster[1];
+#else
+  cluster_type fCluster[];
+#endif
+};
+
 #endif
index f4c6d67..310d8c0 100644 (file)
@@ -20,6 +20,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "AliHLTTRDClusterizer.h"
+#include "AliHLTTRDCluster.h"
 #include "AliTRDgeometry.h"
 #include "AliTRDcluster.h"
 #include "AliTRDReconstructor.h"
@@ -33,6 +34,9 @@ AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliTRDReconstructor *const rec)
   ,fClMemBlock(NULL)
   ,fTrMemBlock(NULL)
   ,fTrMemCurrPtr(NULL)
+  ,fLastDet(-1)
+  ,fClusters(NULL)
+  ,fAddedSize(0)
 {
   //
   // AliHLTTRDClusterizer default constructor
@@ -45,6 +49,9 @@ AliHLTTRDClusterizer::AliHLTTRDClusterizer(const Text_t *const name, const Text_
   ,fClMemBlock(NULL)
   ,fTrMemBlock(NULL)
   ,fTrMemCurrPtr(NULL)
+  ,fLastDet(-1)
+  ,fClusters(NULL)
+  ,fAddedSize(0)
 {
   //
   // AliHLTTRDClusterizer constructor
@@ -57,6 +64,9 @@ AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliHLTTRDClusterizer& c)
   ,fClMemBlock(NULL)
   ,fTrMemBlock(NULL)
   ,fTrMemCurrPtr(NULL)
+  ,fLastDet(-1)
+  ,fClusters(NULL)
+  ,fAddedSize(0)
 {
   //
   // AliHLTTRDClusterizer copy constructor
@@ -88,14 +98,20 @@ void AliHLTTRDClusterizer::Copy(TObject& c) const
 }
 
 //_____________________________________________________________________________
-void AliHLTTRDClusterizer::AddClusterToArray(AliTRDcluster *cluster)
+void AliHLTTRDClusterizer::AddClusterToArray(AliTRDcluster* cluster)
 {
   //
   // Add a cluster to the array
   //
 
-  AliHLTTRDCluster *ptr = &(((AliHLTTRDCluster*)GetClMemBlock())[fNoOfClusters]);
-  new(ptr) AliHLTTRDCluster(cluster);
+  if(fLastDet!=cluster->GetDetector()){
+    fLastDet = cluster->GetDetector();
+    fClusters = new(GetClMemBlock()+fAddedSize) AliHLTTRDClustersArray(fLastDet);
+    fAddedSize += sizeof(AliHLTTRDClustersArray);
+  }
+  new(&fClusters->fCluster[fClusters->fCount]) AliHLTTRDClustersArray::cluster_type(cluster);
+  fClusters->fCount++;
+  fAddedSize += sizeof(AliHLTTRDClustersArray::cluster_type);
 }
 
 //_____________________________________________________________________________
index 4525294..5de4fd6 100644 (file)
 
 #include "AliTRDclusterizer.h"
 #include "AliTRDReconstructor.h"
-#include "AliHLTTRDCluster.h"
 #include "AliHLTDataTypes.h"
 #include "AliHLTTRDTrackletWordArray.h"
 
+class AliHLTTRDClustersArray;
 class AliHLTTRDClusterizer : public AliTRDclusterizer
 {
  public:
@@ -37,15 +37,18 @@ class AliHLTTRDClusterizer : public AliTRDclusterizer
       fClMemBlock=ptr;
     }
     fNoOfClusters=0;
+    fAddedSize=0;
+    fLastDet=-1;
+    fClusters=NULL;
   }
   AliHLTUInt8_t*  GetClMemBlock(){return fClMemBlock;}
   AliHLTUInt8_t*  GetTrMemBlock(){return fTrMemBlock;}
-  UInt_t          GetAddedClSize(){return fNoOfClusters*sizeof(AliHLTTRDCluster);}
+  UInt_t          GetAddedClSize(){return fAddedSize;}
   UInt_t          GetAddedTrSize(){return (AliHLTUInt8_t*)fTrMemCurrPtr-(AliHLTUInt8_t*)fTrMemBlock;}
   UInt_t          GetTrMemBlockSize(){return 30*(sizeof(AliHLTTRDTrackletWordArray)+512*sizeof(UInt_t));}
 
  protected:
-  void            AddClusterToArray(AliTRDcluster *cluster);
+  void            AddClusterToArray(AliTRDcluster* cluster);
   void            AddTrackletsToArray();
 
   TClonesArray*   RecPoints(){return 0x0;}       //these are functions in the parents class and must not be used in hlt!
@@ -55,6 +58,9 @@ class AliHLTTRDClusterizer : public AliTRDclusterizer
   AliHLTUInt8_t*  fClMemBlock;
   AliHLTUInt8_t*  fTrMemBlock;
   AliHLTUInt8_t*  fTrMemCurrPtr;
+  Int_t           fLastDet;
+  AliHLTTRDClustersArray* fClusters;
+  AliHLTUInt32_t  fAddedSize;
 
   ClassDef(AliHLTTRDClusterizer, 1)
 };
index fdc1aac..cd09e93 100644 (file)
@@ -573,15 +573,31 @@ int AliHLTTRDClusterizerComponent::SetParams()
     HLTInfo("RecoParam already set!");
   }else{
     if(fRecoParamType == 0){
-      HLTDebug("Low flux params init.");
-      fRecoParam = AliTRDrecoParam::GetLowFluxParam();
+#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621
+      if(fHLTflag){
+       HLTInfo("Low flux HLT params init.");
+       fRecoParam = AliTRDrecoParam::GetLowFluxHLTParam();
+      }else
+#endif
+       {
+         HLTInfo("Low flux params init.");
+         fRecoParam = AliTRDrecoParam::GetLowFluxParam();
+       }
     }
     if(fRecoParamType == 1){
-      HLTDebug("High flux params init.");
-      fRecoParam = AliTRDrecoParam::GetHighFluxParam();
+#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621
+      if(fHLTflag){
+       HLTInfo("High flux HLT params init.");
+       fRecoParam = AliTRDrecoParam::GetHighFluxHLTParam();
+      }else
+#endif
+       {
+         HLTInfo("High flux params init.");
+         fRecoParam = AliTRDrecoParam::GetHighFluxParam();
+       }
     }
     if(fRecoParamType == 2){
-      HLTDebug("Cosmic Test params init.");
+      HLTInfo("Cosmic Test params init.");
       fRecoParam = AliTRDrecoParam::GetCosmicTestParam();
     }
   }
index c8706a2..3bfaba6 100644 (file)
@@ -1,7 +1,29 @@
+// $Id$
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors:                                                               *
+ *          for The ALICE HLT Project.                                    *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//  @file   AliHLTTRDTracklet.cxx
+//  @author Theodor Rascanu
+//  @date   
+//  @brief  A datacontainer for tracklets for the HLT. 
+// 
+
 #include "AliHLTTRDTrack.h"
 #include "AliHLTTRDTracklet.h"
 
-
 /**
  * Default Constructor
  */
@@ -102,7 +124,7 @@ void AliHLTTRDTrack::CopyDataMembers(const AliTRDtrackV1* const inTrack)
 void AliHLTTRDTrack::ExportTRDTrack(AliTRDtrackV1* const outTrack) const
 {
   //outTrack->Reset(); we always use a new fresh trdtrack as input, so this is useless
-  outTrack->SetBit(AliTRDtrackV1::kOwner);  
+  outTrack->SetBit(AliTRDtrackV1::kOwner);
 
   outTrack->fDE=fDE;
   outTrack->fFakeRatio=fFakeRatio;
@@ -211,23 +233,46 @@ void AliHLTTRDTrack::Print(Bool_t printTracklets) const
 }
 
 /**
- * Read tracklets from the memory. 
- * Number of tracklets should be already known
+ * Save track at block position
  */
 //============================================================================
-// void AliHLTTRDTrack::ReadTrackletsFromMemory(void* input)
-// {
-//   AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*) input;
-//   AliHLTTRDTracklet* hltTracklet = NULL;
-  
-//   for (Int_t iTracklet = 0; iTracklet < AliTRDtrackV1::kNplane; iTracklet++){
-//     if (fTracklet[iTracklet]){
-//       hltTracklet = (AliHLTTRDTracklet*) iterPtr;
-//       //hltTracklet->ReadClustersFromMemory(iterPtr+sizeof(AliHLTTRDTracklet));
-//       fTracklet[iTracklet] = hltTracklet;
-//       iterPtr += hltTracklet->GetSize();
-//       //hltTracklet->Print(kFALSE);
-//     }
-//   }
-// }
+AliHLTUInt32_t AliHLTTRDTrack::SaveAt(AliHLTUInt8_t *const block, const AliTRDtrackV1* const inTrack)
+{
+  AliHLTUInt32_t size=0;
+
+  memcpy(block,inTrack,sizeof(AliTRDtrackV1));
+  size+=sizeof(AliTRDtrackV1);
+
+  for(int i=0; i<AliTRDtrackV1::kNplane; i++){
+    AliTRDseedV1* inTracklet = inTrack->GetTracklet(i);
+    if(inTracklet) size+=AliHLTTRDTracklet::SaveAt(block+size, inTracklet);
+  }
+
+  return size;
+}
 
+/**
+ * Read track from block
+ */
+//============================================================================
+AliHLTUInt32_t AliHLTTRDTrack::LoadFrom(AliTRDtrackV1 *const outTrack, const AliHLTUInt8_t *const block)
+{
+  AliHLTUInt32_t size=0;
+
+  memcpy(((AliHLTUInt8_t*)outTrack)+sizeof(void*),block+sizeof(void*),sizeof(AliTRDtrackV1)-sizeof(void*));
+  size+=sizeof(AliTRDtrackV1);
+
+  for(int i=0; i<AliTRDtrackV1::kNplane; i++){
+    if(outTrack->GetTracklet(i)){
+      AliTRDseedV1 *const outTracklet = new AliTRDseedV1;
+      outTrack->fTracklet[i]=outTracklet;
+      size+=AliHLTTRDTracklet::LoadFrom(outTracklet, block+size);
+    }
+  }
+
+  outTrack->SetBit(AliTRDtrackV1::kOwner);
+  outTrack->fBackupTrack=NULL;
+  outTrack->fTrackLow=NULL;
+  outTrack->fTrackHigh=NULL;
+  return size;
+}
index 83e12ae..975da97 100644 (file)
@@ -25,8 +25,9 @@ class AliHLTTRDTrack
     { return ((AliHLTUInt8_t *) this + fSize); };
   AliHLTUInt32_t GetSize() const {return fSize;};
   void Print(Bool_t printTracklets = kTRUE) const;
-  // void ReadTrackletsFromMemory(void* );
-  
+  static AliHLTUInt32_t SaveAt(AliHLTUInt8_t *const block, const AliTRDtrackV1* const inTrack);
+  static AliHLTUInt32_t LoadFrom(AliTRDtrackV1 *const outTrack, const AliHLTUInt8_t *const block);
+
  private:
   AliHLTTRDTrack(const AliHLTTRDTrack& inTrack);
   AliHLTTRDTrack& operator=(const AliHLTTRDTrack& inTrack);
index 293ec6a..f394947 100644 (file)
@@ -537,15 +537,31 @@ int AliHLTTRDTrackerV1Component::SetParams()
     HLTInfo("RecoParam already set!");
   }else{
     if(fRecoParamType == 0){
-      HLTDebug("Low flux params init.");
-      fRecoParam = AliTRDrecoParam::GetLowFluxParam();
+#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621
+      if(fHLTflag){
+       HLTInfo("Low flux HLT params init.");
+       fRecoParam = AliTRDrecoParam::GetLowFluxHLTParam();
+      }else
+#endif
+       {
+         HLTInfo("Low flux params init.");
+         fRecoParam = AliTRDrecoParam::GetLowFluxParam();
+       }
     }
     if(fRecoParamType == 1){
-      HLTDebug("High flux params init.");
-      fRecoParam = AliTRDrecoParam::GetHighFluxParam();
+#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621
+      if(fHLTflag){
+       HLTInfo("High flux HLT params init.");
+       fRecoParam = AliTRDrecoParam::GetHighFluxHLTParam();
+      }else
+#endif
+       {
+         HLTInfo("High flux params init.");
+         fRecoParam = AliTRDrecoParam::GetHighFluxParam();
+       }
     }
     if(fRecoParamType == 2){
-      HLTDebug("Cosmic Test params init.");
+      HLTInfo("Cosmic Test params init.");
       fRecoParam = AliTRDrecoParam::GetCosmicTestParam();
     }
   }
index 1f05042..44ad8de 100644 (file)
@@ -1,3 +1,26 @@
+// $Id$
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors:                                                               *
+ *          for The ALICE HLT Project.                                    *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//  @file   AliHLTTRDTracklet.cxx
+//  @author Theodor Rascanu
+//  @date   
+//  @brief  A datacontainer for tracklets for the HLT. 
+// 
+
 #include "AliHLTTRDTracklet.h"
 
 /**
@@ -25,7 +48,7 @@ AliHLTTRDTracklet::AliHLTTRDTracklet():
   fBits(0),
   fCount(0),
 #if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
-  fSize(sizeof(AliHLTTRDTracklet)-sizeof(AliHLTTRDCluster)),
+  fSize(sizeof(AliHLTTRDTracklet)-sizeof(fClusters[0])),
 #else
   fSize(sizeof(AliHLTTRDTracklet))
 #endif
@@ -58,7 +81,7 @@ AliHLTTRDTracklet::AliHLTTRDTracklet(const AliTRDseedV1* const inTracklet):
   fBits(0),
   fCount(0),
 #if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
-  fSize(sizeof(AliHLTTRDTracklet)-sizeof(AliHLTTRDCluster)),
+  fSize(sizeof(AliHLTTRDTracklet)-sizeof(fClusters[0])),
 #else
   fSize(sizeof(AliHLTTRDTracklet))
 #endif
@@ -105,9 +128,9 @@ void AliHLTTRDTracklet::CopyDataMembers(const AliTRDseedV1* const inTracklet)
     AliTRDcluster* trdCluster = inTracklet->GetClusters(iTimeBin);
     if (trdCluster){
       fPos[fCount] = iTimeBin;
-      new (&fClusters[fCount]) AliHLTTRDCluster(trdCluster);
+      new (&fClusters[fCount]) AliHLTTRDExtCluster(trdCluster);
       fCount++;
-      fSize += sizeof(AliHLTTRDCluster);
+      fSize += sizeof(fClusters[0]);
     }
   }  
   //if((void*)&fClusters[fCount]!=(void*)GetEndPointer()){printf("ERRR");return;}
@@ -173,6 +196,7 @@ void AliHLTTRDTracklet::ExportTRDTracklet(AliTRDseedV1* const outTracklet) const
   for(Int_t iCluster=0; iCluster < fCount; iCluster++){
     AliTRDcluster *trdCluster = new AliTRDcluster();
     fClusters[iCluster].ExportTRDCluster(trdCluster);
+    trdCluster->SetDetector(fDet);
     outTracklet->fClusters[fPos[iCluster]] = trdCluster;
     outTracklet->fIndexes[fPos[iCluster]] = iCluster;
   }
@@ -213,24 +237,44 @@ void AliHLTTRDTracklet::Print(Bool_t printClusters) const
 }
 
 /**
- * Read clusters to TRDtracklet from the memory
+ * Save tracklet at block position
  */
 //============================================================================
-// void AliHLTTRDTracklet::ReadClustersFromMemory(void *input)
-// {
-//   AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*) input;
-//   AliHLTTRDCluster* hltCluster = NULL;
-  
-//   for (Int_t iCluster = 0; iCluster < AliTRDseedV1::kNclusters; iCluster++){
-//     // if we had something in the fClusters[iCluster] before copying,
-//     // then this entry in the array should not be empty. Fill it.
-//     if (fClusters[iCluster]){
-//       hltCluster = (AliHLTTRDCluster*) iterPtr;
-//       fClusters[iCluster] = hltCluster;
-//       iterPtr += hltCluster->GetSize();
-//       //hltCluster->Print();
-//     }
-    
-//   }
-// }
+AliHLTUInt32_t AliHLTTRDTracklet::SaveAt(AliHLTUInt8_t *const block, const AliTRDseedV1* const inTracklet)
+{
+  AliHLTUInt32_t size=0;
+
+  memcpy(block,inTracklet,sizeof(AliTRDseedV1));
+  size+=sizeof(AliTRDseedV1);
+
+  for(int i=0; i<AliTRDseedV1::kNclusters; i++){
+    AliTRDcluster* inClust = inTracklet->GetClusters(i);
+    if(inClust) size+=AliHLTTRDCluster::SaveAt(block+size, inClust);
+  }
+
+  return size;
+}
+
+/**
+ * Read tracklet from block
+ */
+//============================================================================
+AliHLTUInt32_t AliHLTTRDTracklet::LoadFrom(AliTRDseedV1 *const outTracklet, const AliHLTUInt8_t *const block)
+{
+  AliHLTUInt32_t size=0;
+
+  memcpy(((AliHLTUInt8_t*)outTracklet)+sizeof(void*),block+sizeof(void*),sizeof(AliTRDseedV1)-sizeof(void*));
+  size+=sizeof(AliTRDseedV1);
 
+  for(int i=0; i<AliTRDseedV1::kNclusters; i++){
+    if(outTracklet->GetClusters(i)){
+      AliTRDcluster *const outClust = new AliTRDcluster;
+      outTracklet->fClusters[i]=outClust;
+      size+=AliHLTTRDCluster::LoadFrom(outClust, block+size);
+    }
+  }
+
+  outTracklet->SetBit(AliTRDseedV1::kOwner);
+
+  return size;
+}
index 67436bd..374e432 100644 (file)
@@ -24,7 +24,8 @@ class AliHLTTRDTracklet
     { return ((AliHLTUInt8_t *)this + fSize); };
   AliHLTUInt32_t GetSize() const { return fSize; };
   void Print(Bool_t printClusters = kTRUE) const;
-  // void ReadClustersFromMemory(void *input);
+  static AliHLTUInt32_t SaveAt(AliHLTUInt8_t *const block, const AliTRDseedV1* const inTracklet);
+  static AliHLTUInt32_t LoadFrom(AliTRDseedV1 *const outTracklet, const AliHLTUInt8_t *const block);
   
  private:
   AliHLTTRDTracklet(const AliHLTTRDTracklet&);
@@ -71,9 +72,9 @@ class AliHLTTRDTracklet
   AliHLTUInt32_t fSize;                  // Size of the tracklet with clusters in the memory
 
 #if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
-  AliHLTTRDCluster fClusters[1];                         // Open array of clusters
+  AliHLTTRDExtCluster fClusters[1];                         // Open array of clusters
 #else
-  AliHLTTRDCluster fClusters[0];                         // Open array of clusters
+  AliHLTTRDExtCluster fClusters[0];                         // Open array of clusters
 #endif
 
 };
index 5c74574..8ad5b39 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+//  @file   AliHLTTRDUtils.cxx
+//  @author Theodor Rascanu
+//  @date   
+//  @brief  Utilities needed the HLT::TRD code.
+// 
+
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
-// HLT TRD Utillities Class                                                  //
+// HLT TRD Utilities Class                                                   //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "AliHLTTRDTracklet.h"
 #include "AliHLTTRDCluster.h"
 #include "AliHLTExternalTrackParam.h"
+#include "AliTRDtransform.h"
 #include "AliESDEvent.h"
 #include "AliESDtrack.h"
 #include "AliPID.h"
 
 ClassImp(AliHLTTRDUtils)
 
-AliHLTUInt32_t AliHLTTRDUtils::AddClustersToOutput(TClonesArray* inClusterArray, AliHLTUInt8_t* outBlockPtr, Int_t nTimeBins)
+AliHLTUInt32_t AliHLTTRDUtils::AddClustersToOutput(const TClonesArray *const inClusterArray, AliHLTUInt8_t *const outBlockPtr, Int_t nTimeBins)
 {
   AliTRDcluster* cluster = 0;
   AliHLTUInt32_t addedSize = 0;
-  //  == OUTdatatype pointer
-  AliHLTTRDCluster* outPtr = (AliHLTTRDCluster*)outBlockPtr;
-  
+  Int_t lastDet = -1;
+
   if (inClusterArray){
-    Int_t nbEntries  = inClusterArray->GetEntries();
+    AliHLTTRDClustersArray* clsArr = NULL;
+    Int_t nbEntries = inClusterArray->GetEntries();
     for (Int_t iCluster = 0; iCluster<nbEntries; iCluster++){
-      //cout << "Geting cluster #" << iCluster << endl;
-      
       cluster = (AliTRDcluster*)(inClusterArray->At(iCluster));
-
-      AliHLTTRDCluster *hltCluster = new (outPtr) AliHLTTRDCluster(cluster);
-      //cout << Form("cluster added at 0x%x (%i)\n",outPtr,outPtr);
-
-      addedSize += sizeof(*hltCluster);
-      outBlockPtr += sizeof(*hltCluster);
-      outPtr = (AliHLTTRDCluster*)outBlockPtr;
+      if(lastDet!=cluster->GetDetector()){
+       lastDet=cluster->GetDetector();
+       clsArr = new(outBlockPtr+addedSize) AliHLTTRDClustersArray(lastDet);
+       addedSize += sizeof(AliHLTTRDClustersArray);
+      }
+      
+      new (&clsArr->fCluster[clsArr->fCount]) AliHLTTRDClustersArray::cluster_type(cluster);
+      clsArr->fCount++;
+      addedSize += sizeof(AliHLTTRDClustersArray::cluster_type);
     }
   }
 
-  Int_t *TBptr = (Int_t*)outPtr;
+  Int_t *TBptr = (Int_t*)(outBlockPtr+addedSize);
   *TBptr = nTimeBins;
   
   addedSize += sizeof(*TBptr);
-  outBlockPtr += sizeof(*TBptr);
 
   return addedSize;
   
 }
 
-AliHLTUInt32_t AliHLTTRDUtils::AddTracksToOutput(TClonesArray* inTrackArray, AliHLTUInt8_t* output, Int_t nTimeBins)
+AliHLTUInt32_t AliHLTTRDUtils::AddTracksToOutput(const TClonesArray *const inTrackArray, AliHLTUInt8_t *const output, Int_t nTimeBins)
 {
-  //cout << "\nWriting tracks to the Memory\n ============= \n";
 
   Int_t *TBptr = (Int_t*)output;
   *TBptr = nTimeBins;
 
   AliTRDtrackV1* track = 0;
   AliHLTUInt32_t addedSize = sizeof(*TBptr);
-  AliHLTUInt8_t* iterPtr = output+addedSize;
-  AliHLTTRDTrack* outPtr = (AliHLTTRDTrack*)iterPtr;
 
   if (inTrackArray){
     Int_t nbTracks  = inTrackArray->GetEntries();
@@ -83,56 +86,77 @@ AliHLTUInt32_t AliHLTTRDUtils::AddTracksToOutput(TClonesArray* inTrackArray, Ali
       AliHLTUInt32_t trackSize=0;
       
       track = (AliTRDtrackV1*)(inTrackArray->At(iTrack));
-      //track->Print();
       
-      AliHLTTRDTrack *hltTrack = new (outPtr) AliHLTTRDTrack(track);
+      AliHLTTRDTrack *hltTrack = new (output+addedSize) AliHLTTRDTrack(track);
       trackSize = hltTrack->GetSize();
       addedSize += trackSize;
-      //HLTDebug("addedSize %i, trackSize %i", addedSize, trackSize);
-      
-      iterPtr += trackSize;
-      outPtr = (AliHLTTRDTrack*)iterPtr;
     }
   }
   return addedSize;
   
 }
 
+AliHLTUInt32_t AliHLTTRDUtils::AddTracksToOutputAlt(const TClonesArray *const inTrackArray, AliHLTUInt8_t *const block, Int_t nTimeBins)
+{
+  AliHLTUInt32_t addedSize = 0;
+
+  AliHLTUInt64_t *TBptr = (AliHLTUInt64_t*)block;
+  *TBptr = nTimeBins;
+
+  addedSize += sizeof(AliHLTUInt64_t);
+
+  if(!inTrackArray) return addedSize;
+
+  Int_t nbTracks  = inTrackArray->GetEntriesFast();
+  for (Int_t i = 0; i<nbTracks; i++){
+    AliTRDtrackV1* inTrack = (AliTRDtrackV1*)(inTrackArray->At(i));
+    if(inTrack)addedSize+=AliHLTTRDTrack::SaveAt(block+addedSize, inTrack);
+  }
+
+  return addedSize;
+  
+}
+
 /**
  * Read cluster to the TClonesArray from the memory 
  */
 //============================================================================
-AliHLTUInt32_t AliHLTTRDUtils::ReadClusters(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins)
+AliHLTUInt32_t AliHLTTRDUtils::ReadClusters(TClonesArray *const outArray, const void *const inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins)
 {
-  //HLTDebug("\nReading clusters from the Memory\n ============= \n");
-  AliHLTTRDCluster * curCluster;
-  UInt_t clusterSize = sizeof(AliHLTTRDCluster), curSize = 0;
-  Int_t counter=outArray->GetEntriesFast();
+  const AliHLTUInt8_t* inPtr = (AliHLTUInt8_t*)inputPtr;
+  UInt_t curSize = 0;
+  Int_t counter = outArray->GetEntriesFast();
 
   if(nTimeBins){
-    *nTimeBins=*(Int_t*)(((AliHLTUInt8_t*)inputPtr)+size-sizeof(Int_t));
-    //HLTDebug("Reading number of time bins from input block: %d", *nTimeBins);
+    *nTimeBins=*(Int_t*)(inPtr+size-sizeof(*nTimeBins));
   }
   size-=sizeof(*nTimeBins);
-
-  curCluster = (AliHLTTRDCluster*) inputPtr;
+#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621
+  AliTRDtransform trans;
+#endif
   while (curSize < size)
     {
-      //HLTDebug(" fX = %f; fY = %f; fZ = %f", curCluster->fX, curCluster->fY, curCluster->fZ);
-
-      AliTRDcluster* curTRDCluster = new((*outArray)[counter]) AliTRDcluster();
-      curCluster->ExportTRDCluster(curTRDCluster);
-      //HLTDebug(" fX = %f; fY = %f; fZ = %f", curTRDCluster->GetX(), curTRDCluster->GetY(), curTRDCluster->GetZ());
-      curSize += clusterSize; 
-      counter++;
-      curCluster++;
-      //cout << " current readed size is " << curSize << "/" << size << endl;
+      AliHLTTRDClustersArray* clsArr = (AliHLTTRDClustersArray*)(inPtr+curSize);
+      curSize+=sizeof(AliHLTTRDClustersArray);
+#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621
+      trans.SetDetector(clsArr->fDetector);
+#endif
+      for(Int_t iCluster = 0; iCluster<clsArr->fCount; iCluster++){
+       AliTRDcluster* curTRDCluster = new((*outArray)[counter]) AliTRDcluster();
+       clsArr->fCluster[iCluster].ExportTRDCluster(curTRDCluster);
+       curTRDCluster->SetDetector(clsArr->fDetector);
+#ifndef HAVE_NOT_ALITRD_RECOPARAM_r41621
+       trans.Transform(curTRDCluster);
+#endif
+       curSize += sizeof(AliHLTTRDClustersArray::cluster_type); 
+       counter++;
+      }
     }
   
   return counter;
 }
 
-AliHLTUInt32_t AliHLTTRDUtils::ReadTracks(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins)
+AliHLTUInt32_t AliHLTTRDUtils::ReadTracks(TClonesArray *const outArray, const void *const inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins)
 {
   if(nTimeBins){
     *nTimeBins=*(Int_t*)inputPtr;
@@ -170,6 +194,31 @@ AliHLTUInt32_t AliHLTTRDUtils::ReadTracks(TClonesArray *outArray, void* inputPtr
   return counter;
 }
 
+ AliHLTUInt32_t AliHLTTRDUtils::ReadTracksAlt(TClonesArray *const outArray, const void *const inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins)
+ {
+   const AliHLTUInt8_t *const block = ((AliHLTUInt8_t*)inputPtr);
+   AliHLTUInt32_t readSize = 0;
+
+   if(nTimeBins){
+     *nTimeBins=*(AliHLTUInt64_t*)block;
+     //HLTDebug("Reading number of time bins from input block: %d", *nTimeBins);
+   }
+
+   readSize += sizeof(AliHLTUInt64_t);
+
+   if(!outArray) return readSize;
+
+   Int_t counter=outArray->GetEntriesFast();
+   while(readSize<size){
+     AliTRDtrackV1 *const outTrack = new((*outArray)[counter]) AliTRDtrackV1;
+     readSize+=AliHLTTRDTrack::LoadFrom(outTrack, block+readSize);
+     counter++;
+   }
+
+   return counter;
+
+ }
+
 AliHLTUInt32_t AliHLTTRDUtils::AddESDToOutput(const AliESDEvent* const esd, AliHLTUInt8_t* const outBlockPtr)
 {
   AliESDtrack* esdTrack = 0;
@@ -219,7 +268,7 @@ AliHLTUInt32_t AliHLTTRDUtils::AddESDToOutput(const AliESDEvent* const esd, AliH
 
 void AliHLTTRDUtils::EmulateHLTClusters(TClonesArray* clusterArray)
 {
-  AliHLTUInt32_t estimatedSize = (clusterArray->GetEntriesFast()+1)*sizeof(AliHLTTRDCluster);
+  AliHLTUInt32_t estimatedSize = (clusterArray->GetEntriesFast()+1)*sizeof(AliHLTTRDClustersArray::cluster_type);
   AliHLTUInt8_t* pBlock = (AliHLTUInt8_t*)malloc(estimatedSize);
   AliHLTUInt32_t size = AddClustersToOutput(clusterArray, pBlock);
   clusterArray->Delete();
@@ -229,7 +278,7 @@ void AliHLTTRDUtils::EmulateHLTClusters(TClonesArray* clusterArray)
 
 void AliHLTTRDUtils::EmulateHLTTracks(TClonesArray* trackArray)
 {
-  AliHLTUInt32_t estimatedSize = (trackArray->GetEntriesFast()+1)*(sizeof(AliHLTTRDTrack)+6*(sizeof(AliHLTTRDTracklet)+30*sizeof(AliHLTTRDCluster)));
+  AliHLTUInt32_t estimatedSize = (trackArray->GetEntriesFast()+1)*(sizeof(AliHLTTRDTrack)+6*(sizeof(AliHLTTRDTracklet)+30*sizeof(AliHLTTRDClustersArray::cluster_type)));
   AliHLTUInt8_t* pBlock = (AliHLTUInt8_t*)malloc(estimatedSize);
   AliHLTUInt32_t size = AddTracksToOutput(trackArray, pBlock);
   trackArray->Delete();
index d9350b5..a61bdb7 100644 (file)
 
 class TClonesArray;
 class AliESDEvent;
+class AliTRDtransform;
 class AliHLTTRDUtils
 {
 public:
   virtual ~AliHLTTRDUtils(){}
-  static AliHLTUInt32_t AddClustersToOutput(TClonesArray* inClusterArray, AliHLTUInt8_t* outBlockPtr, Int_t nTimeBins=24);
-  static AliHLTUInt32_t AddTracksToOutput(TClonesArray* inTrackArray, AliHLTUInt8_t* output, Int_t nTimeBins=24);
-  static AliHLTUInt32_t ReadClusters(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins=0x0);
-  static AliHLTUInt32_t ReadTracks(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins=0x0);
+  static AliHLTUInt32_t AddClustersToOutput(const TClonesArray *const inClusterArray, AliHLTUInt8_t *const outBlockPtr, Int_t nTimeBins=24);
+  static AliHLTUInt32_t AddTracksToOutput(const TClonesArray *const inTrackArray, AliHLTUInt8_t *const output, Int_t nTimeBins=24);
+  static AliHLTUInt32_t ReadClusters(TClonesArray *const outArray, const void *const inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins=0x0);
+  static AliHLTUInt32_t ReadTracks(TClonesArray *const outArray, const void *const inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins=0x0);
   static AliHLTUInt32_t AddESDToOutput(const AliESDEvent* const esd, AliHLTUInt8_t* const outBlockPtr);
   static void EmulateHLTClusters(TClonesArray *clusterArray);
   static void EmulateHLTTracks(TClonesArray *trackArray);
   static AliHLTUInt32_t GetSM(AliHLTUInt32_t spec);
+  static AliHLTUInt32_t AddTracksToOutputAlt(const TClonesArray *const inTrackArray, AliHLTUInt8_t *const output, Int_t nTimeBins=24);
+  static AliHLTUInt32_t ReadTracksAlt(TClonesArray *const outArray, const void *const inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins=0x0);
 
   ClassDef(AliHLTTRDUtils, 0)
 
-
 };
 
 #endif
index 792b050..d454f33 100644 (file)
@@ -43,9 +43,9 @@ LINK_DIRECTORIES (${ROOTLIBDIR} ${ALILIBDIR})
 MESSAGE ("[i] ALILIBDIR is ${ALILIBDIR}")
 #MESSAGE ("[i] ALIHLTLIBDIR is ${ALIHLTLIBDIR}")
 
-SET (ROOTLIBLINK dl Core Cint RIO Net Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Physics MathCore freetype Gui VMC EG Geom Minuit XMLParser)
+SET (ROOTLIBLINK dl Core Cint RIO Net Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Physics MathCore freetype Gui VMC EG Geom Minuit XMLParser XMLIO)
 SET (ROOTLIBLINK ${ROOTLIBLINK} MLP Proof Thread ProofPlayer TreePlayer)
-SET (ALILIBLINK STEERBase STEER CDB ESD AliHLTTRD RAWDatabase RAWDatarec TRDbase TRDsim TRDrec HLTbase AliHLTGlobal AliHLTUtil AOD TRDbase TPCrec TPCbase PHOSUtils STAT)
+SET (ALILIBLINK STEERBase STEER CDB ESD AliHLTTRD RAWDatabase RAWDatarec TRDbase TRDrec HLTbase AliHLTGlobal AliHLTUtil AOD TRDbase TPCrec TPCbase PHOSUtils STAT)
 SET (ALILIBLINK ${ALILIBLINK} MUONbase MUONmapping MUONcalib MUONtrigger MUONgeometry MUONraw MUONcore RAWDatasim)
 
 #--------------- EXECS
index 6d7b788..b637952 100644 (file)
@@ -87,7 +87,7 @@ void aliHLTTRDrun(const TString inDir)
 
   gHLT.LoadComponentLibraries("libAliHLTUtil.so libAliHLTTRD.so libAliHLTMUON.so libAliHLTGlobal.so libAliHLTTrigger.so");
 
-  InitGRP("local://$ALICE_ROOT/OCDB","local:///software/data/ppbench"/*inDir.Data()*/);
+  InitGRP("local://$ALICE_ROOT/OCDB",Form("local://%s",inDir.Data()));
   //TString sGeomPath = " -geometry "+inDir+"/geometry.root";
   TString inFolder = inDir+"/raw", inFile = "/TRD_", inExt = ".ddl";
   TString sinput = " -datatype 'DDL_RAW ' 'TRD '";
index 7668161..a93fbf4 100644 (file)
@@ -238,10 +238,12 @@ int rec_hlt_trd(const TString filename, TString outPath)
   AliCDBManager * man = AliCDBManager::Instance();
   Int_t run = 0;
   if(bRealData){
-    man->SetDefaultStorage("alien://folder=/alice/data/2009/OCDB");
+    //alien://folder=/alice/data/2010/OCDB?user=username?cacheF=yourDirectory?cacheS=yourSize
+    man->SetDefaultStorage("alien://folder=/alice/data/2009/OCDB?cacheFolder=/tmp/alice/data/2010/OCDB");
     //man->SetDefaultStorage("alien://folder=/alice/data/2009/OCDB?cacheFold=/lustre/alice/local/alice/data/2009/OCDB"); 
+    man->SetSpecificStorage("GRP/GRP/Data","alien://folder=/alice/data/2010/OCDB?cacheFolder=/tmp/alice/data/2010/OCDB");
     //man->SetSpecificStorage("GRP/GRP/Data","alien://folder=/alice/data/2009/OCDB?cacheFold=/lustre/alice/local/alice/data/2009/OCDB");
-    man->SetSpecificStorage("HLT/*","local://$ALICE_ROOT/OCDB");
+    man->SetSpecificStorage("HLT/*","local://$ALICE_ROOT/OCDB?cacheFolder=/tmp/alice/data/2010/OCDB");
     run = ExtractRunNumber(filename);
   }else{
     man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); 
@@ -269,12 +271,12 @@ int rec_hlt_trd(const TString filename, TString outPath)
       
       printf("ioj[%d]\n", iobj); trg_class->Print(0x0);
 
-      // cosmic run 2009                                                                                                                                                                                       
-      // if(TString(trg_class->GetName()).Contains("TRD")){                                                                                                                                                    
-      //        triggerconfs.push_back(trg_class->GetMask());                                                                                                                                                  
-      // }                                                                                                                                                                                                     
+      // cosmic run 2009
+      // if(TString(trg_class->GetName()).Contains("TRD")){
+      //        triggerconfs.push_back(trg_class->GetMask());
+      // }
 
-      // pp run 2009                                                                                                                                                                                           
+      // pp run 2009
       if(TString(trg_class->GetName()).Contains("CINT1B-ABCE-NOPF-ALL")){
         triggerconfs.push_back(trg_class->GetMask());
       }