Coding conventions
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2007 16:54:56 +0000 (16:54 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2007 16:54:56 +0000 (16:54 +0000)
13 files changed:
HLT/BASE/AliHLTComponentHandler.cxx
HLT/BASE/AliHLTComponentHandler.h
HLT/BASE/AliHLTDataBuffer.h
HLT/BASE/util/AliHLTFileWriter.cxx
HLT/BASE/util/AliHLTFileWriter.h
HLT/BASE/util/AliHLTRootFileWriterComponent.h
HLT/TPCLib/AliHLTTPCClusterDataFormat.h
HLT/TPCLib/AliHLTTPCClusterFinderComponent.h
HLT/TPCLib/AliHLTTPCDigitReaderUnpacked.cxx
HLT/TPCLib/AliHLTTPCDigitReaderUnpacked.h
HLT/TPCLib/AliHLTTPCLog.cxx
HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx
HLT/TPCLib/AliHLTTPCSliceTrackerComponent.h

index 28a829399f0169f756cf6479ed113d722ee588dd..b6e8a3eb77c9329e069070124b171998b9cd9249 100644 (file)
@@ -31,11 +31,12 @@ using namespace std;
 //#include <Riostream.h>
 #include <TSystem.h>
 #endif //HAVE_DLFCN_H
-#include "AliHLTStdIncludes.h"
+//#include "AliHLTStdIncludes.h"
 #include "AliHLTComponentHandler.h"
 #include "AliHLTComponent.h"
 #include "AliHLTDataTypes.h"
-#include "AliHLTSystem.h"
+//#include "AliHLTSystem.h"
+#include "TString.h"
 
 // the standard components
 // #include "AliHLTFilePublisher.h"
@@ -86,6 +87,25 @@ AliHLTComponentHandler::AliHLTComponentHandler(AliHLTComponentEnvironment* pEnv)
   AddStandardComponents();
 }
 
+AliHLTComponentHandler::AliHLTComponentHandler(const AliHLTComponentHandler&)
+  :
+  fComponentList(),
+  fScheduleList(),
+  fLibraryList(),
+  fEnvironment(),
+  fStandardList()
+{
+  // see header file for class documentation
+  HLTFatal("copy constructor untested");
+}
+
+AliHLTComponentHandler& AliHLTComponentHandler::operator=(const AliHLTComponentHandler&)
+{ 
+  // see header file for class documentation
+  HLTFatal("assignment operator untested");
+  return *this;
+}
+
 AliHLTComponentHandler::~AliHLTComponentHandler()
 {
   // see header file for class documentation
@@ -135,8 +155,10 @@ Int_t AliHLTComponentHandler::RegisterComponent(AliHLTComponent* pSample)
 int AliHLTComponentHandler::DeregisterComponent( const char* componentID )
 {
   // see header file for class documentation
+
   int iResult=0;
   if (componentID) {
+    HLTWarning("not yet implemented, please notify the developers if you need this function");
   } else {
     iResult=-EINVAL;
   }
@@ -262,7 +284,7 @@ int AliHLTComponentHandler::LoadLibrary( const char* libraryPath )
     const char* loadtype="";
 #ifdef HAVE_DLFCN_H
     // use interface to the dynamic linking loader
-    hLib.handle=dlopen(libraryPath, RTLD_NOW);
+    hLib.fHandle=dlopen(libraryPath, RTLD_NOW);
     loadtype="dlopen";
 #else
     // use ROOT dynamic loader
@@ -270,23 +292,23 @@ int AliHLTComponentHandler::LoadLibrary( const char* libraryPath )
     // 'failure' if the library was already loaded
     AliHLTLibHandle* pLib=FindLibrary(libraryPath);
     if (pLib) {
-       int* pRootHandle=reinterpret_cast<int*>(pLib->handle);
+       int* pRootHandle=reinterpret_cast<int*>(pLib->fHandle);
        (*pRootHandle)++;
        HLTDebug("instance %d of library %s loaded", (*pRootHandle), libraryPath);
-       hLib.handle=pRootHandle;
+       hLib.fHandle=pRootHandle;
     }
     
-    if (hLib.handle==NULL && gSystem->Load(libraryPath)==0) {
+    if (hLib.fHandle==NULL && gSystem->Load(libraryPath)==0) {
       int* pRootHandle=new int;
       if (pRootHandle) *pRootHandle=1;
-      hLib.handle=pRootHandle;
+      hLib.fHandle=pRootHandle;
       //HLTDebug("library %s loaded via gSystem", libraryPath);
     }
     loadtype="gSystem";
 #endif //HAVE_DLFCN_H
-    if (hLib.handle!=NULL) {
+    if (hLib.fHandle!=NULL) {
       // create TString object to store library path and use pointer as handle 
-      hLib.name=new TString(libraryPath);
+      hLib.fName=new TString(libraryPath);
       HLTInfo("library %s loaded (%s)", libraryPath, loadtype);
       fLibraryList.insert(fLibraryList.begin(), hLib);
       iResult=RegisterScheduledComponents();
@@ -315,7 +337,7 @@ int AliHLTComponentHandler::UnloadLibrary( const char* libraryPath )
   if (libraryPath) {
     vector<AliHLTLibHandle>::iterator element=fLibraryList.begin();
     while (element!=fLibraryList.end()) {
-      TString* pName=reinterpret_cast<TString*>((*element).name);
+      TString* pName=reinterpret_cast<TString*>((*element).fName);
       if (pName->CompareTo(libraryPath)==0) {
        UnloadLibrary(*element);
        fLibraryList.erase(element);
@@ -334,11 +356,11 @@ int AliHLTComponentHandler::UnloadLibrary(AliHLTComponentHandler::AliHLTLibHandl
   // see header file for class documentation
   int iResult=0;
   fgAliLoggingFunc=NULL;
-  TString* pName=reinterpret_cast<TString*>(handle.name);
+  TString* pName=reinterpret_cast<TString*>(handle.fName);
 #ifdef HAVE_DLFCN_H
-  dlclose(handle.handle);
+  dlclose(handle.fHandle);
 #else
-  int* pCount=reinterpret_cast<int*>(handle.handle);
+  int* pCount=reinterpret_cast<int*>(handle.fHandle);
   if (--(*pCount)==0) {
     if (pName) {
       /** Matthias 26.04.2007
@@ -366,8 +388,8 @@ int AliHLTComponentHandler::UnloadLibrary(AliHLTComponentHandler::AliHLTLibHandl
     delete pCount;
   }
 #endif //HAVE_DLFCN_H
-  handle.name=NULL;
-  handle.handle=NULL;
+  handle.fName=NULL;
+  handle.fHandle=NULL;
   if (pName) {
     HLTDebug("unload library %s", pName->Data());
     delete pName;
@@ -398,9 +420,9 @@ void* AliHLTComponentHandler::FindSymbol(const char* library, const char* symbol
   if (hLib==NULL) return NULL;
   void* pFunc=NULL;
 #ifdef HAVE_DLFCN_H
-  pFunc=dlsym(hLib->handle, symbol);
+  pFunc=dlsym(hLib->fHandle, symbol);
 #else
-  TString* name=reinterpret_cast<TString*>(hLib->name);
+  TString* name=reinterpret_cast<TString*>(hLib->fName);
   pFunc=gSystem->DynFindSymbol(name->Data(), symbol);
 #endif
   return pFunc;
@@ -412,7 +434,7 @@ AliHLTComponentHandler::AliHLTLibHandle* AliHLTComponentHandler::FindLibrary(con
   AliHLTLibHandle* hLib=NULL;
   vector<AliHLTLibHandle>::iterator element=fLibraryList.begin();
   while (element!=fLibraryList.end()) {
-    TString* name=reinterpret_cast<TString*>((*element).name);
+    TString* name=reinterpret_cast<TString*>((*element).fName);
     if (name->CompareTo(library)==0) {
       hLib=&(*element);
       break;
@@ -457,7 +479,7 @@ int AliHLTComponentHandler::DeleteStandardComponents()
   int iResult=0;
   vector<AliHLTComponent*>::iterator element=fStandardList.begin();
   while (element!=fStandardList.end()) {
-    DeregisterComponent((*element)->GetComponentID());
+    //DeregisterComponent((*element)->GetComponentID());
     delete(*element);
     fStandardList.erase(element);
     element=fStandardList.begin();
index 6e0288d8f30323c1c1b62df41d84055f30ab060a..12862ebbd1da816e1d253c165532c228802e9ddb 100644 (file)
@@ -15,7 +15,7 @@
    
 
 #include <vector>
-#include "TObject.h"
+//#include "TObject.h"
 #include "AliHLTDataTypes.h"
 #include "AliHLTLogging.h"
 
@@ -35,6 +35,10 @@ class AliHLTComponentHandler : public AliHLTLogging {
   AliHLTComponentHandler();
   /** constructor */
   AliHLTComponentHandler(AliHLTComponentEnvironment* pEnv);
+  /** not a valid copy constructor, defined according to effective C++ style */
+  AliHLTComponentHandler(const AliHLTComponentHandler&);
+  /** not a valid assignment op, but defined according to effective C++ style */
+  AliHLTComponentHandler& operator=(const AliHLTComponentHandler&);
   /** destructor */
   virtual ~AliHLTComponentHandler();
 
@@ -210,11 +214,11 @@ class AliHLTComponentHandler : public AliHLTLogging {
    * Compount descriptor for component libraries
    */
   struct AliHLTLibHandle {
-    AliHLTLibHandle() : handle(NULL), name(NULL) {}
+    AliHLTLibHandle() : fHandle(NULL), fName(NULL) {}
     /** dlopen handle */
-    void* handle;                                                  //! transient
+    void* fHandle;                                                 //! transient
     /** name of the library, casted to TString* before use */
-    void* name;                                                    //! transient
+    void* fName;                                                   //! transient
   };
 
   /**
index b503acb2fd041f87ffc9dadb821b5bb4b7cd59de..3d037f13027fdef2073807f84b5972af40cf5835 100644 (file)
@@ -15,9 +15,7 @@
 #include <vector>
 #include "AliHLTLogging.h"
 #include "AliHLTDataTypes.h"
-//#include "AliHLTDefinitions.h"
 #include "TObject.h"
-//#include "TList.h"
 
 class AliHLTComponent;
 class AliHLTConsumerDescriptor;
@@ -193,6 +191,8 @@ class AliHLTDataBuffer : public TObject, public AliHLTLogging
    * @brief  Descriptor of a data segment within the buffer.
    */
   class AliHLTDataSegment {
+  friend class AliHLTDataBuffer;
+  friend class AliHLTConsumerDescriptor;
   public:
     AliHLTDataSegment()
       :
@@ -212,6 +212,7 @@ class AliHLTDataBuffer : public TObject, public AliHLTLogging
     {
       memset(&fDataType, 0, sizeof(AliHLTComponentDataType));
     }
+  private:
     /** the data type of this segment */
     AliHLTComponentDataType fDataType;                             // see above
     /** offset in byte within the data buffer */
@@ -227,15 +228,17 @@ class AliHLTDataBuffer : public TObject, public AliHLTLogging
    * @brief  Descriptor of the raw data buffer which can host several segments.
    */
   class AliHLTRawBuffer {
+  friend class AliHLTDataBuffer;
   public:
     /** standard constructor */
     AliHLTRawBuffer() : fSize(0), fTotalSize(0), fPtr(NULL) {}
     /** not a valid copy constructor, defined according to effective C++ style */
     AliHLTRawBuffer(const AliHLTRawBuffer&) : fSize(0), fTotalSize(0), fPtr(NULL) {}
     /** not a valid assignment op, but defined according to effective C++ style */
-      AliHLTRawBuffer& operator=(const AliHLTRawBuffer&) {return *this;}
+    AliHLTRawBuffer& operator=(const AliHLTRawBuffer&) {return *this;}
     /** standard destructor */
     virtual ~AliHLTRawBuffer() {}
+  private:
     /** size of the currently occupied partition of the buffer */
     AliHLTUInt32_t fSize;                                          // see above
     /** total size of the buffer, including safety margin */
index e0cfd10b9b4ee10892e3b950273050de2f0477f5..24dfaa9c87adf16d4a1a9efacc56cfa92b8df46b 100644 (file)
@@ -27,8 +27,8 @@ using namespace std;
 #include "AliHLTFileWriter.h"
 #include <TObjArray.h>
 #include <TObjString.h>
-#include <TMath.h>
-#include <TFile.h>
+//#include <TMath.h>
+//#include <TFile.h>
 
 /** the global object for component registration */
 AliHLTFileWriter gAliHLTFileWriter;
@@ -171,6 +171,12 @@ int AliHLTFileWriter::DoInit( int argc, const char** argv )
 int AliHLTFileWriter::InitWriter()
 {
   // see header file for class documentation
+  
+  // fCurrentFileName is used in dump event, just touched her to avoid
+  // coding convention violation RC11. The function can not be declared
+  // const since it is just the default implementation, overloaded
+  // virtual function might not be const
+  fCurrentFileName="";
   return 0; // note: this doesn't mean 'error'
 }
 
@@ -182,6 +188,11 @@ int AliHLTFileWriter::ScanArgument(int argc, const char** argv)
   if (argc==0 && argv==NULL) {
     // this is just to get rid of the warning "unused parameter"
   }
+  // fCurrentFileName is used in dump event, just touched her to avoid
+  // coding convention violation RC11. The function can not be declared
+  // const since it is just the default implementation, overloaded
+  // virtual function might not be const
+  fCurrentFileName="";
   return -EINVAL;
 }
 
@@ -196,6 +207,12 @@ int AliHLTFileWriter::DoDeinit()
 int AliHLTFileWriter::CloseWriter()
 {
   // see header file for class documentation
+
+  // fCurrentFileName is used in dump event, just touched her to avoid
+  // coding convention violation RC11. The function can not be declared
+  // const since it is just the default implementation, overloaded
+  // virtual function might not be const
+  fCurrentFileName="";
   return 0; // note: this doesn't mean 'error'
 }
 
@@ -295,7 +312,7 @@ int AliHLTFileWriter::ClearMode(Short_t mode)
   return fMode;
 }
 
-int AliHLTFileWriter::CheckMode(Short_t mode)
+int AliHLTFileWriter::CheckMode(Short_t mode) const
 {
   // see header file for class documentation
 
index bd994c75abab6975a5611a7e1cfda53c310ebf69..b116baa8b5762b61d5ce68227851046b2d20ebde 100644 (file)
@@ -12,7 +12,8 @@
 */
 
 #include "AliHLTDataSink.h"
-#include <TList.h>
+#include <TString.h>
+//#include <TList.h>
 
 /**
  * @class AliHLTFileWriter
@@ -148,7 +149,7 @@ class AliHLTFileWriter : public AliHLTDataSink  {
    * Check a mode flag.
    * @return 1 if flag is set, 0 if not
    */
-  int CheckMode(Short_t mode);
+  int CheckMode(Short_t mode) const;
 
   /**
    * Working modes of the writer
index 9f9a0ff821e9d482e005e1929317df10c0bef0ad..e02ea1948c39e832b42cc3079b1bfd512df89862 100644 (file)
@@ -13,7 +13,7 @@
 
                                                                           */
 #include "AliHLTFileWriter.h"
-#include "TObject.h" 
+//#include "TObject.h" 
 
 class TFile;
 
@@ -34,7 +34,7 @@ class AliHLTRootFileWriterComponent : public AliHLTFileWriter
   /** not a valid assignment op, but defined according to effective C++ style */
   AliHLTRootFileWriterComponent& operator=(const AliHLTRootFileWriterComponent&);
   /** destructor */
-  ~AliHLTRootFileWriterComponent();
+  virtual ~AliHLTRootFileWriterComponent();
 
   /**
    * The id of the component.
index 0dbc384b893c4b1a9374b8976421679d9fb14339..c46233820804adcc67f0814570006c2abde40d44 100644 (file)
@@ -4,9 +4,10 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
+#include "AliHLTTPCSpacePointData.h"
+
 /* AliHLTTPCClusterData
  */
-
 struct AliHLTTPCClusterData
     {
        AliHLTUInt32_t fSpacePointCnt;
index 6e922ef8e221d6ba9121112a8fae2aab4f45d7b8..03c8fa9adc289ea730a3e3494e9aef3b57190e11 100644 (file)
@@ -57,11 +57,16 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
        // Public functions to implement AliHLTComponent's interface.
        // These functions are required for the registration process
 
-       const char* GetComponentID();
-       void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
-       AliHLTComponentDataType GetOutputDataType();
-       virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
-       AliHLTComponent* Spawn();
+  /** interface function, see @ref AliHLTComponent for description */
+  const char* GetComponentID();
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponentDataType GetOutputDataType();
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponent* Spawn();
 
     protected:
        
index a15efb64184d4c3da35d39b2610704e1694a6830..16c7f149a8b00a413001ab0405c5586977bfee73 100644 (file)
@@ -47,6 +47,11 @@ AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked()
   fFirstRow(0),
   fLastRow(0)
 {
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
 }
 
 AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked(const AliHLTTPCDigitReaderUnpacked& src)
@@ -61,11 +66,13 @@ AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked(const AliHLTTPCDigitR
   fFirstRow(0),
   fLastRow(0)
 {
+  // see header file for class documentation
   HLTFatal("copy constructor not for use");
 }
 
 AliHLTTPCDigitReaderUnpacked& AliHLTTPCDigitReaderUnpacked::operator=(const AliHLTTPCDigitReaderUnpacked& src)
 {
+  // see header file for class documentation
   fDigitRowData=NULL;
   fActRowData=NULL;
   fData=NULL;
@@ -80,10 +87,12 @@ AliHLTTPCDigitReaderUnpacked& AliHLTTPCDigitReaderUnpacked::operator=(const AliH
 }
 
 AliHLTTPCDigitReaderUnpacked::~AliHLTTPCDigitReaderUnpacked(){
+  // see header file for class documentation
 }
 
 int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice){
-  AliHLTTPCUnpackedRawData *tmpptr;
+  // see header file for class documentation
+  AliHLTTPCUnpackedRawData *tmpptr=NULL;
   fPtr = ptr;
   fSize = size;
 
@@ -105,6 +114,7 @@ int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t
 }
 
 bool AliHLTTPCDigitReaderUnpacked::Next(){
+  // see header file for class documentation
   bool rreadvalue = true;
 
   fBin++;
@@ -144,24 +154,28 @@ bool AliHLTTPCDigitReaderUnpacked::Next(){
 }
 
 int AliHLTTPCDigitReaderUnpacked::GetRow(){
+  // see header file for class documentation
   int rrow;
   rrow = fRow;
   return rrow;
 }
 
 int AliHLTTPCDigitReaderUnpacked::GetPad(){
+  // see header file for class documentation
   int rpad;
   rpad = (int)fData[fBin].fPad;
   return rpad   ;
 }
 
 int AliHLTTPCDigitReaderUnpacked::GetSignal(){ 
+  // see header file for class documentation
   int rsignal;
   rsignal = (int)fData[fBin].fCharge;
   return rsignal;
 }
 
 int AliHLTTPCDigitReaderUnpacked::GetTime(){
+  // see header file for class documentation
   int rtime;
   rtime = (int)fData[fBin].fTime;
   return rtime;
index c015d0e27c5ba82e7010b8ef22264d709e3de43c..2c30aeb5a47e951ee16133af265d20bf737efd75 100644 (file)
@@ -33,27 +33,70 @@ public:
   AliHLTTPCDigitReaderUnpacked& operator=(const AliHLTTPCDigitReaderUnpacked&);
   /** destructor */
   virtual ~AliHLTTPCDigitReaderUnpacked();
-  
+
+  /**
+   * Init the reader
+   * @param ptr    pointer to input buffer
+   * @param size   size of the input buffer
+   * @param patch  readout partition
+   * @param slice  sector no
+   */  
   int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice);
+
+  /**
+   * place the reader at the next signal
+   * @return 1 if there was a nest signal, 0 if not
+   */
   bool Next();
+
+  /**
+   * Get row number of the current signal
+   * @return row number of the current signal
+   */
   int GetRow();
+
+  /**
+   * Get pad number of the current signal
+   * @return pad number of the current signal
+   */
   int GetPad();
+
+  /**
+   * Get signal
+   * @return ADC signal
+   */
   int GetSignal();
+
+  /**
+   * Get time of the current signal
+   * @return time of the current signal
+   */
   int GetTime();
   
 protected:
 
 
 private:
+  /** intermediate row data structure (pointer in fPtr buffer) */
   AliHLTTPCDigitRowData *fDigitRowData; //!
+  /** current row data structure (pointer in fPtr buffer) */
   AliHLTTPCDigitRowData *fActRowData; //!
+  /** the current digit data */
   AliHLTTPCDigitData *fData; //!
+
+  /** input buffer */
   void* fPtr; //!
-  unsigned long fSize;
-  Int_t fBin;
-  Int_t fRow;
-  Int_t fFirstRow;
-  Int_t fLastRow;
+  /** size of the input buffer */
+  unsigned long fSize;                                             // see above
+
+  /** current bin */
+  Int_t fBin;                                                      // see above
+  /** current row */
+  Int_t fRow;                                                      // see above
+  /** first row */
+  Int_t fFirstRow;                                                 // see above
+  /** last row */
+  Int_t fLastRow;                                                  // see above
 
   ClassDef(AliHLTTPCDigitReaderUnpacked, 0)
 };
index ee03d378fe48eaef2989344cc4572b5444d7efe7..ecc8c6b66595471f7a6503aa5e4ff6156c7f9b4a 100644 (file)
@@ -20,6 +20,7 @@ AliHLTLogging AliHLTTPCLog::fgHLTLogging;
 
 const char* AliHLTTPCLog::Flush()
 {
+  // see header file for class documentation
   int severity=0;
   string origin("");
   string keyword("");
index 8ac1150cba072497ae021877d3f0af5393e57f6b..49b82ca57078a59562e178d358f1bbd301be2523 100644 (file)
@@ -30,7 +30,6 @@ using namespace std;
 #include "AliHLTTPCTransform.h"
 #include "AliHLTTPCConfMapper.h"
 #include "AliHLTTPCVertex.h"
-#include "AliHLTTPCSpacePointData.h"
 #include "AliHLTTPCVertexData.h"
 #include "AliHLTTPCClusterDataFormat.h"
 #include "AliHLTTPCTransform.h"
@@ -39,13 +38,15 @@ using namespace std;
 #include "AliHLTTPCTrackletDataFormat.h"
 #include "AliHLTTPCInterMerger.h"
 #include "AliHLTTPCMemHandler.h"
+#include "AliHLTTPCDefinitions.h"
 //#include "AliHLTTPC.h"
-#include <stdlib.h>
-#include <errno.h>
+//#include <stdlib.h>
+//#include <cerrno>
 
 // this is a global object used for automatic component registration, do not use this
 AliHLTTPCSliceTrackerComponent gAliHLTTPCSliceTrackerComponent;
 
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCSliceTrackerComponent)
 
 AliHLTTPCSliceTrackerComponent::AliHLTTPCSliceTrackerComponent()
@@ -98,6 +99,7 @@ AliHLTTPCSliceTrackerComponent& AliHLTTPCSliceTrackerComponent::operator=(const
 
 AliHLTTPCSliceTrackerComponent::~AliHLTTPCSliceTrackerComponent()
 {
+  // see header file for class documentation
 }
 
 // Public functions to implement AliHLTComponent's interface.
@@ -105,12 +107,14 @@ AliHLTTPCSliceTrackerComponent::~AliHLTTPCSliceTrackerComponent()
 
 const char* AliHLTTPCSliceTrackerComponent::GetComponentID()
 {
+  // see header file for class documentation
 
   return "TPCSliceTracker";
 }
 
 void AliHLTTPCSliceTrackerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
 {
+  // see header file for class documentation
   list.clear();
   list.push_back( AliHLTTPCDefinitions::fgkClustersDataType );
   list.push_back( AliHLTTPCDefinitions::fgkVertexDataType );
@@ -118,11 +122,13 @@ void AliHLTTPCSliceTrackerComponent::GetInputDataTypes( vector<AliHLTComponentDa
 
 AliHLTComponentDataType AliHLTTPCSliceTrackerComponent::GetOutputDataType()
 {
+  // see header file for class documentation
   return AliHLTTPCDefinitions::fgkTrackSegmentsDataType;
 }
 
 void AliHLTTPCSliceTrackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
 {
+  // see header file for class documentation
   // XXX TODO: Find more realistic values.
   constBase = 0;
   inputMultiplier = 0.2;
@@ -130,6 +136,7 @@ void AliHLTTPCSliceTrackerComponent::GetOutputDataSize( unsigned long& constBase
 
 AliHLTComponent* AliHLTTPCSliceTrackerComponent::Spawn()
 {
+  // see header file for class documentation
   return new AliHLTTPCSliceTrackerComponent;
 }
 
@@ -141,6 +148,7 @@ void AliHLTTPCSliceTrackerComponent::SetTrackerParam(Int_t phiSegments, Int_t et
                                   Double_t goodHitChi2, Double_t trackChi2Cut,
                                   Int_t maxdist, Double_t maxphi,Double_t maxeta, bool vertexConstraints )
     {
+  // see header file for class documentation
     //fTracker->SetClusterFinderParam( fXYClusterError, fZClusterError, kTRUE ); // ??
     //Set parameters input to the tracker
     //If no arguments are given, default parameters will be used
@@ -362,6 +370,7 @@ void AliHLTTPCSliceTrackerComponent::SetTrackerParam( bool doPP, int multiplicit
        
 int AliHLTTPCSliceTrackerComponent::DoInit( int argc, const char** argv )
     {
+  // see header file for class documentation
     Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "DoInit", "DoInit()" );
 
     if ( fTracker || fVertex )
@@ -474,6 +483,7 @@ int AliHLTTPCSliceTrackerComponent::DoInit( int argc, const char** argv )
 
 int AliHLTTPCSliceTrackerComponent::DoDeinit()
 {
+  // see header file for class documentation
   if ( fTracker )
     delete fTracker;
   fTracker = NULL;
@@ -491,6 +501,7 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt
                                              AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
                                              AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
     {
+  // see header file for class documentation
     Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "DoEvent", "DoEvent()" );
     if ( evtData.fBlockCnt<=0 )
       {
@@ -706,7 +717,8 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt
       fpInterMerger->Merge();
     } 
     ntracks0=0;
-    mysize = fTracker->GetTracks()->WriteTracks( ntracks0, outPtr->fTracklets );
+    AliHLTTPCTrackArray* pArray=fTracker->GetTracks();
+    mysize = pArray->WriteTracks( ntracks0, outPtr->fTracklets );
     outPtr->fTrackletCnt = ntracks0;
 
     Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracks",
@@ -736,4 +748,12 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt
     return 0;
     }
 
+void AliHLTTPCSliceTrackerComponent::SetTrackerParam1()
+{
+  SetTrackerParam( 10, 20, 5, 10, 2,2,
+                  0, 1.31, 5, 100,
+                  50, 100, 50, 0.1, 0.1,
+                  true );
+}
+
        
index c4ab9484008a62988a999fef7cf27c5d67efdcf4..e9aa595f9bd7b622534525f38b8cd1b35310d990 100644 (file)
@@ -13,7 +13,6 @@
 */
 
 #include "AliHLTProcessor.h"
-#include "AliHLTTPCDefinitions.h"
 
 class AliHLTTPCConfMapper;
 class AliHLTTPCVertex;
@@ -43,44 +42,63 @@ public:
   /** destructor */
   virtual ~AliHLTTPCSliceTrackerComponent();
 
-       // Public functions to implement AliHLTComponent's interface.
-       // These functions are required for the registration process
+  // Public functions to implement AliHLTComponent's interface.
+  // These functions are required for the registration process
 
-       const char* GetComponentID();
-       void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
-       AliHLTComponentDataType GetOutputDataType();
-       virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
-       AliHLTComponent* Spawn();
+  /** interface function, see @ref AliHLTComponent for description */
+  const char* GetComponentID();
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponentDataType GetOutputDataType();
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponent* Spawn();
 
 protected:
-       
-       void SetTrackerParam(Int_t phiSegments=50,Int_t etaSegments=100,
-                            Int_t trackletlength=3,Int_t tracklength=5,
-                            Int_t rowscopetracklet=2,Int_t rowscopetrack=3,
-                            Double_t minPtFit=0,Double_t maxangle=1.31,
-                            Double_t goodDist=5,Double_t hitChi2Cut=10,
-                            Double_t goodHitChi2=20,Double_t trackChi2Cut=50,
-                            Int_t maxdist=50,Double_t maxphi=0.1,Double_t maxeta=0.1,
-                            bool vertexconstraint=true);
-       void SetTrackerParam( bool doPP, int multiplicity, double bField );
-       void SetTrackerParam1()
-               {
-               SetTrackerParam( 10, 20, 5, 10, 2,2,
-                                0, 1.31, 5, 100,
-                                50, 100, 50, 0.1, 0.1,
-                                true );
-               }
-
-       // Protected functions to implement AliHLTComponent's interface.
-       // These functions provide initialization as well as the actual processing
-       // capabilities of the component. 
-
-       int DoInit( int argc, const char** argv );
-       int DoDeinit();
-       int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
-                    AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
-                    AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
-       
+
+  /**
+   * Set Tracker parameters
+   * Knowledge on that has been lost, so somebody has to insert more
+   * documentation.
+   */  
+  void SetTrackerParam(Int_t phiSegments=50,Int_t etaSegments=100,
+                      Int_t trackletlength=3,Int_t tracklength=5,
+                      Int_t rowscopetracklet=2,Int_t rowscopetrack=3,
+                      Double_t minPtFit=0,Double_t maxangle=1.31,
+                      Double_t goodDist=5,Double_t hitChi2Cut=10,
+                      Double_t goodHitChi2=20,Double_t trackChi2Cut=50,
+                      Int_t maxdist=50,Double_t maxphi=0.1,Double_t maxeta=0.1,
+                      bool vertexconstraint=true);
+
+  /**
+   * Set Tracker parameters
+   * Knowledge on that has been lost, so somebody has to insert more
+   * documentation.
+   */
+  void SetTrackerParam( bool doPP, int multiplicity, double bField );
+
+  /**
+   * Set default tracker parameters
+   * Knowledge on that has been lost, so somebody has to insert more
+   * documentation.
+   */
+  void SetTrackerParam1();
+
+  // Protected functions to implement AliHLTComponent's interface.
+  // These functions provide initialization as well as the actual processing
+  // capabilities of the component. 
+
+  /** interface function, see @ref AliHLTComponent for description */
+  int DoInit( int argc, const char** argv );
+  /** interface function, see @ref AliHLTComponent for description */
+  int DoDeinit();
+  /** interface function, see @ref AliHLTComponent for description */
+  int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
+              AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
+              AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+  
 private:
 
   /** instance of the tracker */