]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCHWCFSpacePointContainer.h
removing old CF configurations, ids redirected to HWCF; global tracking option enable...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCHWCFSpacePointContainer.h
index fb7b500e0d386dbdd11c39a5bc597b4e93a406ae..700b81ee4b6e75557df408d9807cea696817962b 100644 (file)
@@ -17,6 +17,7 @@
 #include "AliHLTSpacePointContainer.h"
 #include "AliHLTTPCHWCFData.h"
 #include <map>
+#include <vector>
 using namespace std;
 
 /**
@@ -29,7 +30,7 @@ class AliHLTTPCHWCFSpacePointContainer : public AliHLTSpacePointContainer
 {
  public:
   /// standard constructor
-  AliHLTTPCHWCFSpacePointContainer();
+  AliHLTTPCHWCFSpacePointContainer(int mode=0);
   /// copy constructor
   AliHLTTPCHWCFSpacePointContainer(const AliHLTTPCHWCFSpacePointContainer& c);
   /// assignment operator
@@ -37,6 +38,12 @@ class AliHLTTPCHWCFSpacePointContainer : public AliHLTSpacePointContainer
   /// destructor
   ~AliHLTTPCHWCFSpacePointContainer();
 
+  enum {
+    kModeSingle = 0x1,
+    kModeCreateMap = 0x2,
+    kModeDifferentialPadTime = 0x4
+  };
+
   virtual bool Check(AliHLTUInt32_t clusterID) const;
   virtual int GetClusterIDs(vector<AliHLTUInt32_t>& tgt) const;
   virtual const vector<AliHLTUInt32_t>* GetClusterIDs(AliHLTUInt32_t mask);
@@ -47,11 +54,17 @@ class AliHLTTPCHWCFSpacePointContainer : public AliHLTSpacePointContainer
   virtual float GetZ(AliHLTUInt32_t clusterID) const;
   virtual float GetZWidth(AliHLTUInt32_t clusterID) const;
   virtual float GetCharge(AliHLTUInt32_t clusterID) const;
+  virtual float GetQMax(AliHLTUInt32_t clusterID) const;
   virtual float GetPhi(AliHLTUInt32_t clusterID) const;
 
   /// add input block to the collection
   virtual int AddInputBlock(const AliHLTComponentBlockData* pDesc);
 
+  virtual int PopulateAccessGrid(AliHLTSpacePointPropertyGrid* pGrid, AliHLTUInt32_t mask) const;
+  int PopulateAccessGrid(AliHLTSpacePointPropertyGrid* pGrid, AliHLTTPCHWCFData* pDecoder, int slice, int partition) const;
+  virtual const AliHLTSpacePointPropertyGrid* GetSpacePointPropertyGrid(AliHLTUInt32_t mask) const;
+  virtual int SetSpacePointPropertyGrid(AliHLTUInt32_t mask, AliHLTSpacePointPropertyGrid*);
+
   /// clear the object and reset pointer references
   virtual void Clear(Option_t * option ="");
 
@@ -82,6 +95,25 @@ class AliHLTTPCHWCFSpacePointContainer : public AliHLTSpacePointContainer
                    vector<AliHLTComponentBlockData>& outputBlocks,
                    AliHLTDataDeflater* pDeflater,
                    const char* option="") const;
+  virtual int Write(AliHLTUInt8_t* outputPtr, AliHLTUInt32_t size, AliHLTUInt32_t offset,
+                   vector<AliHLTComponentBlockData>& outputBlocks,
+                   AliHLTDataDeflater* pDeflater,
+                   const char* option="") const;
+
+  int WriteSorted(AliHLTUInt8_t* outputPtr, AliHLTUInt32_t size, AliHLTUInt32_t offset,
+                 vector<AliHLTComponentBlockData>& outputBlocks,
+                 AliHLTDataDeflater* pDeflater,
+                 const char* option="") const;
+
+  int WriteSorted(AliHLTUInt8_t* outputPtr, AliHLTUInt32_t size, AliHLTUInt32_t offset,
+                 AliHLTTPCHWCFData* pDecoder, AliHLTSpacePointPropertyGrid* pGrid,
+                 AliHLTUInt32_t mask,
+                 vector<AliHLTComponentBlockData>&  outputBlocks,
+                 AliHLTDataDeflater* pDeflater,
+                 const char* option) const;
+
+  /// allocate index grid, one single point to define the dimensions
+  static AliHLTSpacePointPropertyGrid* AllocateIndexGrid();
 
   class AliHLTTPCHWCFSpacePointProperties {
   public:
@@ -111,6 +143,33 @@ class AliHLTTPCHWCFSpacePointContainer : public AliHLTSpacePointContainer
     int fMCId; //! MC id
   };
 
+  class AliHLTTPCHWCFSpacePointBlock {
+  public:
+    AliHLTTPCHWCFSpacePointBlock(AliHLTUInt32_t id=0, AliHLTTPCHWCFData* pDecoder=NULL, AliHLTSpacePointPropertyGrid* pGrid=NULL)
+      : fDecoder(pDecoder), fGrid(pGrid), fId(id) {}
+    AliHLTTPCHWCFSpacePointBlock(const AliHLTTPCHWCFSpacePointBlock& s) 
+      : fDecoder(s.fDecoder), fGrid(s.fGrid), fId(s.fId) {}
+    AliHLTTPCHWCFSpacePointBlock& operator=(const AliHLTTPCHWCFSpacePointBlock& s) {
+      if (this==&s) return *this;
+      fDecoder=s.fDecoder; fGrid=s.fGrid; fId=s.fId; return *this;
+    }
+    ~AliHLTTPCHWCFSpacePointBlock() {}
+
+    int GetNofSpacepoints() const {return fDecoder?fDecoder->GetNumberOfClusters():0;}
+    AliHLTUInt32_t GetId() const {return fId;}
+    void SetId(AliHLTUInt32_t id) {fId=id;}
+    AliHLTTPCHWCFData* GetDecoder() const {return fDecoder;} 
+    void SetDecoder(AliHLTTPCHWCFData* pDecoder) {fDecoder=pDecoder;}
+    AliHLTSpacePointPropertyGrid* GetGrid() const {return fGrid;}
+    void SetGrid(AliHLTSpacePointPropertyGrid* pGrid) {fGrid=pGrid;}
+
+  protected:
+  private:
+    AliHLTTPCHWCFData* fDecoder; //!
+    AliHLTSpacePointPropertyGrid* fGrid; //!
+    AliHLTUInt32_t fId; //!
+  };
+
  protected:
 
  private:
@@ -121,7 +180,16 @@ class AliHLTTPCHWCFSpacePointContainer : public AliHLTSpacePointContainer
   std::map<AliHLTUInt32_t, vector<AliHLTUInt32_t>*> fSelections; //!
 
   /// array of decoders
-  std::vector<AliHLTTPCHWCFData*> fDecoders; //!
+  std::map<AliHLTUInt32_t, AliHLTTPCHWCFSpacePointBlock> fBlocks; //!
+
+  /// the one instance for mode single (=1)
+  AliHLTTPCHWCFSpacePointBlock fSingleBlock;
+
+  /// mode
+  int fMode; //!
+
+  /// vector of cluster ids for writing
+  vector<AliHLTUInt32_t>* fWrittenClusterIds; //!
 
   ClassDef(AliHLTTPCHWCFSpacePointContainer, 0)
 };