From 96bda103806b63d894a623f577c592424aed2c9e Mon Sep 17 00:00:00 2001 From: richterm Date: Mon, 2 Apr 2007 23:24:07 +0000 Subject: [PATCH] coding conventions and documentation --- HLT/BASE/AliHLTModuleAgent.h | 6 +- HLT/BASE/util/AliHLTAgentUtil.h | 1 + .../util/AliHLTRootFileWriterComponent.cxx | 2 +- HLT/SampleLib/AliHLTAgentSample.h | 1 + HLT/TPCLib/AliHLTTPCCATrackerComponent.cxx | 70 ++++++++++++++----- HLT/TPCLib/AliHLTTPCCATrackerComponent.h | 46 +++++++++--- .../AliHLTTPCClusterFinderComponent.cxx | 16 ++--- HLT/TPCLib/AliHLTTPCDefinitions.cxx | 21 ++++-- HLT/TPCLib/AliHLTTPCDefinitions.h | 33 +++++---- HLT/TPCLib/AliHLTTPCEsdWriterComponent.cxx | 4 +- HLT/TPCLib/AliHLTTPCGlobalMergerComponent.cxx | 57 +++++++++++---- HLT/TPCLib/AliHLTTPCGlobalMergerComponent.h | 57 ++++++++++++--- .../AliHLTTPCRawDataUnpackerComponent.cxx | 8 +-- HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx | 14 ++-- HLT/TPCLib/AliHLTTPCVertexFinderComponent.cxx | 6 +- 15 files changed, 241 insertions(+), 101 deletions(-) diff --git a/HLT/BASE/AliHLTModuleAgent.h b/HLT/BASE/AliHLTModuleAgent.h index 4e08e5f5660..d12fff386a5 100644 --- a/HLT/BASE/AliHLTModuleAgent.h +++ b/HLT/BASE/AliHLTModuleAgent.h @@ -68,8 +68,8 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { * AliHLTConfigurationHandler. The agent can adapt the configurations * to be registered to the current AliRoot setup by checking the * runloader. - * @param handler[in] the configuration handler - * @param runloader[in] AliRoot runloader + * @param handler [in] the configuration handler + * @param runloader [in] AliRoot runloader * @return neg. error code if failed */ virtual int CreateConfigurations(AliHLTConfigurationHandler* handler, @@ -81,7 +81,7 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { * described by the last configuration(s) in the chain. * The agent can adapt the configurations to be registered to the current * AliRoot setup by checking the runloader. - * @param runloader[in] AliRoot runloader + * @param runloader [in] AliRoot runloader * @return string containing the top configurations separated by blanks */ virtual const char* GetTopConfigurations(AliRunLoader* runloader=NULL) const; diff --git a/HLT/BASE/util/AliHLTAgentUtil.h b/HLT/BASE/util/AliHLTAgentUtil.h index cc98a213e50..f5159b47f90 100644 --- a/HLT/BASE/util/AliHLTAgentUtil.h +++ b/HLT/BASE/util/AliHLTAgentUtil.h @@ -34,6 +34,7 @@ class AliHLTAgentUtil : public AliHLTModuleAgent { * AliHLTConfigurationHandler. The agent can adapt the configurations * to be registered to the current AliRoot setup by checking the * runloader. + * @param handler the configuration handler * @param runloader AliRoot runloader * @return neg. error code if failed */ diff --git a/HLT/BASE/util/AliHLTRootFileWriterComponent.cxx b/HLT/BASE/util/AliHLTRootFileWriterComponent.cxx index 87146df317a..e102ff7b859 100644 --- a/HLT/BASE/util/AliHLTRootFileWriterComponent.cxx +++ b/HLT/BASE/util/AliHLTRootFileWriterComponent.cxx @@ -86,7 +86,7 @@ int AliHLTRootFileWriterComponent::ScanArgument(int argc, const char** argv) if (argc==0 && argv==NULL) { // this is just to get rid of the warning "unused parameter" } - int iResult=-EPROTO; + int iResult=-EINVAL; return iResult; } diff --git a/HLT/SampleLib/AliHLTAgentSample.h b/HLT/SampleLib/AliHLTAgentSample.h index bc4a3d3423d..cb5ffabb1f5 100644 --- a/HLT/SampleLib/AliHLTAgentSample.h +++ b/HLT/SampleLib/AliHLTAgentSample.h @@ -34,6 +34,7 @@ class AliHLTAgentSample : public AliHLTModuleAgent { * AliHLTConfigurationHandler. The agent can adapt the configurations * to be registered to the current AliRoot setup by checking the * runloader. + * @param handler the configuration handler * @param runloader AliRoot runloader * @return neg. error code if failed */ diff --git a/HLT/TPCLib/AliHLTTPCCATrackerComponent.cxx b/HLT/TPCLib/AliHLTTPCCATrackerComponent.cxx index 88e107c9a45..02dd46da20d 100644 --- a/HLT/TPCLib/AliHLTTPCCATrackerComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCCATrackerComponent.cxx @@ -39,6 +39,7 @@ using namespace std; #include "AliHLTTPCTrackSegmentData.h" #include "AliHLTTPCTrackArray.h" #include "AliHLTTPCTrackletDataFormat.h" +#include "AliHLTTPCDefinitions.h" //#include "AliHLTTPC.h" #include #include @@ -53,13 +54,36 @@ AliHLTTPCCATrackerComponent gAliHLTTPCCATrackerComponent; ClassImp(AliHLTTPCCATrackerComponent) AliHLTTPCCATrackerComponent::AliHLTTPCCATrackerComponent() - { - fTracker = NULL; - fVertex = NULL; - } + : + fTracker(NULL), + fVertex(NULL) +{ + // see header file for class documentation + // or + // refer to README to build package + // or + // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt +} + +AliHLTTPCCATrackerComponent::AliHLTTPCCATrackerComponent(const AliHLTTPCCATrackerComponent&) + : + fTracker(NULL), + fVertex(NULL) +{ + // see header file for class documentation + HLTFatal("copy constructor untested"); +} + +AliHLTTPCCATrackerComponent& AliHLTTPCCATrackerComponent::operator=(const AliHLTTPCCATrackerComponent&) +{ + // see header file for class documentation + HLTFatal("assignment operator untested"); + return *this; +} AliHLTTPCCATrackerComponent::~AliHLTTPCCATrackerComponent() { + // see header file for class documentation } // Public functions to implement AliHLTComponent's interface. @@ -67,23 +91,27 @@ AliHLTTPCCATrackerComponent::~AliHLTTPCCATrackerComponent() const char* AliHLTTPCCATrackerComponent::GetComponentID() { + // see header file for class documentation return "TPCCATracker"; } -void AliHLTTPCCATrackerComponent::GetInputDataTypes( vector& list) +void AliHLTTPCCATrackerComponent::GetInputDataTypes( vector& list) { + // see header file for class documentation list.clear(); - list.push_back( AliHLTTPCDefinitions::gkClustersDataType ); - list.push_back( AliHLTTPCDefinitions::gkVertexDataType ); + list.push_back( AliHLTTPCDefinitions::fgkClustersDataType ); + list.push_back( AliHLTTPCDefinitions::fgkVertexDataType ); } -AliHLTComponent_DataType AliHLTTPCCATrackerComponent::GetOutputDataType() +AliHLTComponentDataType AliHLTTPCCATrackerComponent::GetOutputDataType() { - return AliHLTTPCDefinitions::gkTrackSegmentsDataType; + // see header file for class documentation + return AliHLTTPCDefinitions::fgkTrackSegmentsDataType; } void AliHLTTPCCATrackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) { + // see header file for class documentation // XXX TODO: Find more realistic values. constBase = 0; inputMultiplier = 0.2; @@ -91,11 +119,13 @@ void AliHLTTPCCATrackerComponent::GetOutputDataSize( unsigned long& constBase, d AliHLTComponent* AliHLTTPCCATrackerComponent::Spawn() { + // see header file for class documentation return new AliHLTTPCCATrackerComponent; } int AliHLTTPCCATrackerComponent::DoInit( int argc, const char** argv ) { + // see header file for class documentation Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "DoInit", "DoInit()" ); if ( fTracker || fVertex ) @@ -142,6 +172,7 @@ int AliHLTTPCCATrackerComponent::DoInit( int argc, const char** argv ) int AliHLTTPCCATrackerComponent::DoDeinit() { + // see header file for class documentation if ( fTracker ) delete fTracker; fTracker = NULL; @@ -151,10 +182,11 @@ int AliHLTTPCCATrackerComponent::DoDeinit() return 0; } -int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponent_EventData& evtData, const AliHLTComponent_BlockData* blocks, - AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr, - AliHLTUInt32_t& size, vector& outputBlocks ) +int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, + AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, vector& outputBlocks ) { + // see header file for class documentation Logging( kHLTLogDebug, "HLT::TPCCATracker::DoEvent", "DoEvent", "DoEvent()" ); if ( evtData.fBlockCnt<=0 ) { @@ -162,11 +194,11 @@ int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponent_EventData& evtDa return 0; } - const AliHLTComponent_BlockData* iter = NULL; + const AliHLTComponentBlockData* iter = NULL; unsigned long ndx; AliHLTTPCClusterData* inPtrSP; AliHLTTPCVertexData* inPtrV = NULL; - const AliHLTComponent_BlockData* vertexIter=NULL; + const AliHLTComponentBlockData* vertexIter=NULL; AliHLTTPCTrackletData* outPtr; AliHLTUInt8_t* outBPtr; @@ -223,7 +255,7 @@ int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponent_EventData& evtDa else *slCntIter++; - if ( iter->fDataType == AliHLTTPCDefinitions::gkVertexDataType ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkVertexDataType ) { inPtrV = (AliHLTTPCVertexData*)(iter->fPtr); vertexIter = iter; @@ -231,7 +263,7 @@ int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponent_EventData& evtDa fVertex->Read( inPtrV ); vertexSlice = slice; } - if ( iter->fDataType == AliHLTTPCDefinitions::gkClustersDataType ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType ) { patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter ); if ( minPatch>patch ) @@ -288,7 +320,7 @@ int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponent_EventData& evtDa for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { iter = blocks+ndx; - if ( iter->fDataType == AliHLTTPCDefinitions::gkVertexDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkVertexDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) { inPtrV = (AliHLTTPCVertexData*)(iter->fPtr); vertexIter = iter; @@ -310,7 +342,7 @@ int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponent_EventData& evtDa { iter = blocks+ndx; - if ( iter->fDataType == AliHLTTPCDefinitions::gkClustersDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) { patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter ); pIter = patchIndices.begin(); @@ -369,7 +401,7 @@ int AliHLTTPCCATrackerComponent::DoEvent( const AliHLTComponent_EventData& evtDa tSize += mysize+sizeof(AliHLTTPCTrackletData); outBPtr += mysize+sizeof(AliHLTTPCTrackletData); - AliHLTComponent_BlockData bd; + AliHLTComponentBlockData bd; FillBlockData( bd ); bd.fOffset = offset; bd.fSize = tSize; diff --git a/HLT/TPCLib/AliHLTTPCCATrackerComponent.h b/HLT/TPCLib/AliHLTTPCCATrackerComponent.h index bb3ca1b81b7..171b1048667 100644 --- a/HLT/TPCLib/AliHLTTPCCATrackerComponent.h +++ b/HLT/TPCLib/AliHLTTPCCATrackerComponent.h @@ -9,44 +9,70 @@ */ #include "AliHLTProcessor.h" -#include "AliHLTTPCDefinitions.h" class AliHLTTPCCATracker; class AliHLTTPCVertex; +/** + * @class AliHLTTPCCATrackerComponent + * The Cellular Automaton tracker component. + */ class AliHLTTPCCATrackerComponent : public AliHLTProcessor { public: + /** standard constructor */ AliHLTTPCCATrackerComponent(); + /** not a valid copy constructor, defined according to effective C++ style */ + AliHLTTPCCATrackerComponent(const AliHLTTPCCATrackerComponent&); + /** not a valid assignment op, but defined according to effective C++ style */ + AliHLTTPCCATrackerComponent& operator=(const AliHLTTPCCATrackerComponent&); + /** standard destructor */ virtual ~AliHLTTPCCATrackerComponent(); // Public functions to implement AliHLTComponent's interface. // These functions are required for the registration process + /** @see component interface @ref AliHLTComponent::GetComponentID */ const char* GetComponentID(); - void GetInputDataTypes( vector& list); - AliHLTComponent_DataType GetOutputDataType(); + + /** @see component interface @ref AliHLTComponent::GetInputDataTypes */ + void GetInputDataTypes( vector& list); + + /** @see component interface @ref AliHLTComponent::GetOutputDataType */ + AliHLTComponentDataType GetOutputDataType(); + + /** @see component interface @ref AliHLTComponent::GetOutputDataSize */ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); + + /** @see component interface @ref AliHLTComponent::Spawn */ AliHLTComponent* Spawn(); - + protected: // Protected functions to implement AliHLTComponent's interface. // These functions provide initialization as well as the actual processing // capabilities of the component. + /** @see component interface @ref AliHLTComponent::DoInit */ int DoInit( int argc, const char** argv ); + + /** @see component interface @ref AliHLTComponent::DoDeinit */ int DoDeinit(); - int DoEvent( const AliHLTComponent_EventData& evtData, const AliHLTComponent_BlockData* blocks, - AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr, - AliHLTUInt32_t& size, vector& outputBlocks ); + + /** @see component interface @ref AliHLTProcessor::DoEvent */ + int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, + AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, vector& outputBlocks ); private: - AliHLTTPCCATracker* fTracker; - AliHLTTPCVertex* fVertex; + /** the tracker object */ + AliHLTTPCCATracker* fTracker; //! transient + /** the virtexer object */ + AliHLTTPCVertex* fVertex; //! transient - Double_t fBField; + /** magnetic field */ + Double_t fBField; // see above ClassDef(AliHLTTPCCATrackerComponent, 0) diff --git a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx index 137ff4686cf..00472806f01 100644 --- a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx @@ -17,7 +17,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/** @file AliHLTTPCSliceTrackerComponent.cxx +/** @file AliHLTTPCClusterFinderComponent.cxx @author Timm Steinbeck, Matthias Richter, Jochen Thaeder @date @brief The TPC cluster finder processing component @@ -103,15 +103,15 @@ void AliHLTTPCClusterFinderComponent::GetInputDataTypes( vectorfDataType, tmp1 ); - DataType2Text( AliHLTTPCDefinitions::gkDDLPackedRawDataType, tmp2 ); + DataType2Text( AliHLTTPCDefinitions::fgkDDLPackedRawDataType, tmp2 ); Logging( kHLTLogDebug, "HLT::TPCClusterFinder::DoEvent", "Event received", "Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", evtData.fEventID, evtData.fEventID, tmp1, tmp2 ); - if ( iter->fDataType != AliHLTTPCDefinitions::gkDDLPackedRawDataType ) continue; + if ( iter->fDataType != AliHLTTPCDefinitions::fgkDDLPackedRawDataType ) continue; } else { char tmp1[14], tmp2[14]; DataType2Text( iter->fDataType, tmp1 ); - DataType2Text( AliHLTTPCDefinitions::gkUnpackedRawDataType, tmp2 ); + DataType2Text( AliHLTTPCDefinitions::fgkUnpackedRawDataType, tmp2 ); Logging( kHLTLogDebug, "HLT::TPCClusterFinder::DoEvent", "Event received", "Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", evtData.fEventID, evtData.fEventID, tmp1, tmp2 ); - if ( iter->fDataType != AliHLTTPCDefinitions::gkUnpackedRawDataType ) continue; + if ( iter->fDataType != AliHLTTPCDefinitions::fgkUnpackedRawDataType ) continue; } diff --git a/HLT/TPCLib/AliHLTTPCDefinitions.cxx b/HLT/TPCLib/AliHLTTPCDefinitions.cxx index d8f21d95889..2cdbb151119 100644 --- a/HLT/TPCLib/AliHLTTPCDefinitions.cxx +++ b/HLT/TPCLib/AliHLTTPCDefinitions.cxx @@ -25,22 +25,29 @@ #include "AliHLTTPCDefinitions.h" +/** ROOT macro for the implementation of ROOT specific class methods */ ClassImp(AliHLTTPCDefinitions) -const AliHLTComponentDataType AliHLTTPCDefinitions::gkDDLPackedRawDataType = { sizeof(AliHLTComponentDataType), {'D','D','L','_','R','W','P','K'},{'T','P','C',' '}};; -const AliHLTComponentDataType AliHLTTPCDefinitions::gkPackedRawDataType = { sizeof(AliHLTComponentDataType), {'R','A','W','P','A','K','E','D'},{'T','P','C',' '}};; -const AliHLTComponentDataType AliHLTTPCDefinitions::gkUnpackedRawDataType = { sizeof(AliHLTComponentDataType), {'R','A','W','U','N','P','A','K'},{'T','P','C',' '}};; -const AliHLTComponentDataType AliHLTTPCDefinitions::gkClustersDataType = { sizeof(AliHLTComponentDataType), {'C','L','U','S','T','E','R','S'},{'T','P','C',' '}};; -const AliHLTComponentDataType AliHLTTPCDefinitions::gkVertexDataType = { sizeof(AliHLTComponentDataType), {'V','E','R','T','E','X',' ',' '},{'T','P','C',' '}};; -const AliHLTComponentDataType AliHLTTPCDefinitions::gkTrackSegmentsDataType = { sizeof(AliHLTComponentDataType), {'T','R','A','K','S','E','G','S'},{'T','P','C',' '}};; -const AliHLTComponentDataType AliHLTTPCDefinitions::gkTracksDataType = { sizeof(AliHLTComponentDataType), {'T','R','A','C','K','S',' ',' '},{'T','P','C',' '}};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkDDLPackedRawDataType = { sizeof(AliHLTComponentDataType), {'D','D','L','_','R','W','P','K'},{'T','P','C',' '}};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkPackedRawDataType = { sizeof(AliHLTComponentDataType), {'R','A','W','P','A','K','E','D'},{'T','P','C',' '}};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkUnpackedRawDataType = { sizeof(AliHLTComponentDataType), {'R','A','W','U','N','P','A','K'},{'T','P','C',' '}};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkClustersDataType = { sizeof(AliHLTComponentDataType), {'C','L','U','S','T','E','R','S'},{'T','P','C',' '}};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkVertexDataType = { sizeof(AliHLTComponentDataType), {'V','E','R','T','E','X',' ',' '},{'T','P','C',' '}};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkTrackSegmentsDataType = { sizeof(AliHLTComponentDataType), {'T','R','A','K','S','E','G','S'},{'T','P','C',' '}};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkTracksDataType = { sizeof(AliHLTComponentDataType), {'T','R','A','C','K','S',' ',' '},{'T','P','C',' '}};; AliHLTTPCDefinitions::AliHLTTPCDefinitions() { + // see header file for class documentation + // or + // refer to README to build package + // or + // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt } AliHLTTPCDefinitions::~AliHLTTPCDefinitions() { + // see header file for class documentation } diff --git a/HLT/TPCLib/AliHLTTPCDefinitions.h b/HLT/TPCLib/AliHLTTPCDefinitions.h index 2c2bc2dfdca..3d4e9a47a4d 100644 --- a/HLT/TPCLib/AliHLTTPCDefinitions.h +++ b/HLT/TPCLib/AliHLTTPCDefinitions.h @@ -10,11 +10,11 @@ */ #include "AliHLTDataTypes.h" -#include "TObject.h" +#include "Rtypes.h" class AliHLTTPCDefinitions - { - public: +{ +public: AliHLTTPCDefinitions(); virtual ~AliHLTTPCDefinitions(); @@ -59,18 +59,23 @@ class AliHLTTPCDefinitions return ((maxSliceNr & 0xFF) << 24) | ((minSliceNr & 0xFF) << 16) | ((maxPatchNr & 0xFF) << 8) | ((minPatchNr & 0xFF)); } - static const AliHLTComponentDataType gkDDLPackedRawDataType; - static const AliHLTComponentDataType gkPackedRawDataType; - static const AliHLTComponentDataType gkUnpackedRawDataType; - static const AliHLTComponentDataType gkClustersDataType; - /** track segments in local coordinates */ - static const AliHLTComponentDataType gkTrackSegmentsDataType; - /** tracks in global koordinates */ - static const AliHLTComponentDataType gkTracksDataType; - static const AliHLTComponentDataType gkVertexDataType; + /** DDL packed RAW data */ + static const AliHLTComponentDataType fgkDDLPackedRawDataType; // see above + /** packed RAW data */ + static const AliHLTComponentDataType fgkPackedRawDataType; // see above + /** unpacked RAW data */ + static const AliHLTComponentDataType fgkUnpackedRawDataType; // see above + /** cluster data */ + static const AliHLTComponentDataType fgkClustersDataType; // see above + /** track segments in local coordinates */ + static const AliHLTComponentDataType fgkTrackSegmentsDataType; // see above + /** tracks in global koordinates */ + static const AliHLTComponentDataType fgkTracksDataType; // see above + /** vertex data structure */ + static const AliHLTComponentDataType fgkVertexDataType; // see above - ClassDef(AliHLTTPCDefinitions, 0) + ClassDef(AliHLTTPCDefinitions, 0); - }; +}; #endif diff --git a/HLT/TPCLib/AliHLTTPCEsdWriterComponent.cxx b/HLT/TPCLib/AliHLTTPCEsdWriterComponent.cxx index 413c4d141af..e04e7a3c21e 100644 --- a/HLT/TPCLib/AliHLTTPCEsdWriterComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCEsdWriterComponent.cxx @@ -106,8 +106,8 @@ int AliHLTTPCEsdWriterComponent::DumpEvent( const AliHLTComponentEventData& evtD for (int ndx=0; ndx<(int)evtData.fBlockCnt && iResult>=0; ndx++) { iter = blocks+ndx; - if ( (bIsTrackSegs=(iter->fDataType == AliHLTTPCDefinitions::gkTrackSegmentsDataType))==1 || - iter->fDataType == AliHLTTPCDefinitions::gkTracksDataType ) { + if ( (bIsTrackSegs=(iter->fDataType == AliHLTTPCDefinitions::fgkTrackSegmentsDataType))==1 || + iter->fDataType == AliHLTTPCDefinitions::fgkTracksDataType ) { Int_t minslice=AliHLTTPCDefinitions::GetMinSliceNr(iter->fSpecification); Int_t maxslice=AliHLTTPCDefinitions::GetMaxSliceNr(iter->fSpecification); if (bIsTrackSegs==0) { diff --git a/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.cxx b/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.cxx index 47f9263b881..a7e42125654 100644 --- a/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.cxx @@ -16,7 +16,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/** @file AliHLTTPCGlobalMergerComponent.h +/** @file AliHLTTPCGlobalMergerComponent.cxx @author Timm Steinbeck, Matthias Richter @date @brief HLT TPC global merger component. @@ -36,6 +36,7 @@ using namespace std; #include "AliHLTTPCTrackletDataFormat.h" #include "AliHLTTPCSpacePointData.h" #include "AliHLTTPCClusterDataFormat.h" +#include "AliHLTTPCDefinitions.h" #include #include @@ -45,37 +46,64 @@ AliHLTTPCGlobalMergerComponent gAliHLTTPCGlobalMergerComponent; ClassImp(AliHLTTPCGlobalMergerComponent) AliHLTTPCGlobalMergerComponent::AliHLTTPCGlobalMergerComponent() - { - fGlobalMerger = NULL; - fVertex = NULL; - } + : + fGlobalMerger(NULL), + fVertex(NULL) +{ + // see header file for class documentation + // or + // refer to README to build package + // or + // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt +} + +AliHLTTPCGlobalMergerComponent::AliHLTTPCGlobalMergerComponent(const AliHLTTPCGlobalMergerComponent&) + : + fGlobalMerger(NULL), + fVertex(NULL) +{ + // see header file for class documentation + HLTFatal("copy constructor untested"); +} + +AliHLTTPCGlobalMergerComponent& AliHLTTPCGlobalMergerComponent::operator=(const AliHLTTPCGlobalMergerComponent&) +{ + // see header file for class documentation + HLTFatal("assignment operator untested"); + return *this; +} AliHLTTPCGlobalMergerComponent::~AliHLTTPCGlobalMergerComponent() - { - } +{ + // see header file for class documentation +} // Public functions to implement AliHLTComponent's interface. // These functions are required for the registration process const char* AliHLTTPCGlobalMergerComponent::GetComponentID() { + // see header file for class documentation return "TPCGlobalMerger"; } void AliHLTTPCGlobalMergerComponent::GetInputDataTypes( vector& list) { + // see header file for class documentation list.clear(); - list.push_back( AliHLTTPCDefinitions::gkTrackSegmentsDataType ); - list.push_back( AliHLTTPCDefinitions::gkVertexDataType ); + list.push_back( AliHLTTPCDefinitions::fgkTrackSegmentsDataType ); + list.push_back( AliHLTTPCDefinitions::fgkVertexDataType ); } AliHLTComponentDataType AliHLTTPCGlobalMergerComponent::GetOutputDataType() { - return AliHLTTPCDefinitions::gkTracksDataType; + // see header file for class documentation + return AliHLTTPCDefinitions::fgkTracksDataType; } void AliHLTTPCGlobalMergerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) { + // see header file for class documentation // XXX TODO: Find more realistic values. constBase = 0; inputMultiplier = 1.0; @@ -83,16 +111,19 @@ void AliHLTTPCGlobalMergerComponent::GetOutputDataSize( unsigned long& constBase AliHLTComponent* AliHLTTPCGlobalMergerComponent::Spawn() { + // see header file for class documentation return new AliHLTTPCGlobalMergerComponent; } void AliHLTTPCGlobalMergerComponent::SetMergerParameters(Double_t maxy,Double_t maxz,Double_t maxkappa,Double_t maxpsi,Double_t maxtgl) { + // see header file for class documentation fGlobalMerger->SetParameter( maxy, maxz, maxkappa, maxpsi, maxtgl ); } int AliHLTTPCGlobalMergerComponent::DoInit( int argc, const char** argv ) { + // see header file for class documentation if ( fGlobalMerger || fVertex ) return EINPROGRESS; fGlobalMerger = new AliHLTTPCGlobalMerger(); @@ -103,6 +134,7 @@ int AliHLTTPCGlobalMergerComponent::DoInit( int argc, const char** argv ) int AliHLTTPCGlobalMergerComponent::DoDeinit() { + // see header file for class documentation if ( fGlobalMerger ) delete fGlobalMerger; fGlobalMerger = NULL; @@ -116,6 +148,7 @@ int AliHLTTPCGlobalMergerComponent::DoEvent( const AliHLTComponentEventData& evt AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector& outputBlocks ) { + // see header file for class documentation const AliHLTComponentBlockData* iter = NULL; const AliHLTComponentBlockData* lastVertexBlock = NULL; unsigned long ndx; @@ -160,7 +193,7 @@ int AliHLTTPCGlobalMergerComponent::DoEvent( const AliHLTComponentEventData& evt } if ( sdIter->fSlice == slice ) { - if ( iter->fDataType == AliHLTTPCDefinitions::gkTrackSegmentsDataType ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkTrackSegmentsDataType ) { if ( !sdIter->fTrackletBlock ) { @@ -174,7 +207,7 @@ int AliHLTTPCGlobalMergerComponent::DoEvent( const AliHLTComponentEventData& evt slice, evtData.fEventID, evtData.fEventID, sdIter->fTrackletBlockIndex, ndx ); } } - if ( iter->fDataType == AliHLTTPCDefinitions::gkVertexDataType ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkVertexDataType ) { lastVertexBlock = iter; if ( !sdIter->fVertexBlock ) diff --git a/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.h b/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.h index a21a9df2024..0a09d0b50a4 100644 --- a/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.h +++ b/HLT/TPCLib/AliHLTTPCGlobalMergerComponent.h @@ -13,28 +13,51 @@ */ #include "AliHLTProcessor.h" -#include "AliHLTTPCDefinitions.h" class AliHLTTPCGlobalMerger; class AliHLTTPCVertex; +/** + * @class AliHLTTPCGlobalMergerComponent + * The TPC global merger component + * The component is the interface to the AliHLTGlobalMerger processing + * class. + */ class AliHLTTPCGlobalMergerComponent : public AliHLTProcessor { public: - AliHLTTPCGlobalMergerComponent(); - virtual ~AliHLTTPCGlobalMergerComponent(); + /** standard constructor */ + AliHLTTPCGlobalMergerComponent(); + /** not a valid copy constructor, defined according to effective C++ style */ + AliHLTTPCGlobalMergerComponent(const AliHLTTPCGlobalMergerComponent&); + /** not a valid assignment op, but defined according to effective C++ style */ + AliHLTTPCGlobalMergerComponent& operator=(const AliHLTTPCGlobalMergerComponent&); + /** standard destructor */ + virtual ~AliHLTTPCGlobalMergerComponent(); // Public functions to implement AliHLTComponent's interface. // These functions are required for the registration process + /** @see component interface @ref AliHLTComponent::GetComponentID */ const char* GetComponentID(); + + /** @see component interface @ref AliHLTComponent::GetInputDataTypes */ void GetInputDataTypes( vector& list); + + /** @see component interface @ref AliHLTComponent::GetOutputDataType */ AliHLTComponentDataType GetOutputDataType(); + + /** @see component interface @ref AliHLTComponent::GetOutputDataSize */ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); + + /** @see component interface @ref AliHLTComponent::Spawn */ AliHLTComponent* Spawn(); protected: + /** + * Set the parameters + */ void SetMergerParameters(Double_t maxy=2.0,Double_t maxz=3.0,Double_t maxkappa=0.003, Double_t maxpsi=0.1,Double_t maxtgl=0.05); @@ -42,25 +65,37 @@ class AliHLTTPCGlobalMergerComponent : public AliHLTProcessor // These functions provide initialization as well as the actual processing // capabilities of the component. + + /** @see component interface @ref AliHLTComponent::DoInit */ int DoInit( int argc, const char** argv ); + + /** @see component interface @ref AliHLTComponent::DoDeinit */ int DoDeinit(); + + /** @see component interface @ref AliHLTProcessor::DoEvent */ int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector& outputBlocks ); private: + /** the global merger object */ AliHLTTPCGlobalMerger* fGlobalMerger; //! + /** the vertexer object */ AliHLTTPCVertex* fVertex; //! - struct SliceData - { - int fSlice; - const AliHLTComponentBlockData* fVertexBlock; - unsigned fVertexBlockIndex; - const AliHLTComponentBlockData* fTrackletBlock; - unsigned fTrackletBlockIndex; - }; + struct SliceData { + /** slice no */ + int fSlice; // see above + /** block descriptor for the vertex data block */ + const AliHLTComponentBlockData* fVertexBlock; //! transient + /** index of the vertex data block */ + unsigned fVertexBlockIndex; // see above + /** block descriptor for the tracklet data block */ + const AliHLTComponentBlockData* fTrackletBlock; //! transient + /** index of the tracklet data block */ + unsigned fTrackletBlockIndex; // see above + }; ClassDef(AliHLTTPCGlobalMergerComponent, 0) diff --git a/HLT/TPCLib/AliHLTTPCRawDataUnpackerComponent.cxx b/HLT/TPCLib/AliHLTTPCRawDataUnpackerComponent.cxx index 402dddc7d05..4163bb8b9f6 100644 --- a/HLT/TPCLib/AliHLTTPCRawDataUnpackerComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCRawDataUnpackerComponent.cxx @@ -62,12 +62,12 @@ const char* AliHLTTPCRawDataUnpackerComponent::GetComponentID() void AliHLTTPCRawDataUnpackerComponent::GetInputDataTypes( vector& list) { list.clear(); - list.push_back( AliHLTTPCDefinitions::gkDDLPackedRawDataType ); + list.push_back( AliHLTTPCDefinitions::fgkDDLPackedRawDataType ); } AliHLTComponentDataType AliHLTTPCRawDataUnpackerComponent::GetOutputDataType() { - return AliHLTTPCDefinitions::gkUnpackedRawDataType; + return AliHLTTPCDefinitions::fgkUnpackedRawDataType; } void AliHLTTPCRawDataUnpackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) @@ -159,11 +159,11 @@ int AliHLTTPCRawDataUnpackerComponent::DoEvent( const AliHLTComponentEventData& iter = blocks+ndx; char tmp1[14], tmp2[14]; DataType2Text( iter->fDataType, tmp1 ); - DataType2Text( AliHLTTPCDefinitions::gkDDLPackedRawDataType, tmp2 ); + DataType2Text( AliHLTTPCDefinitions::fgkDDLPackedRawDataType, tmp2 ); Logging( kHLTLogDebug, "HLT::TPCRawDataUnpackerSubscriber::DoEvent", "Event received", "Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", evtData.fEventID, evtData.fEventID, tmp1, tmp2 ); - if ( iter->fDataType != AliHLTTPCDefinitions::gkDDLPackedRawDataType ) + if ( iter->fDataType != AliHLTTPCDefinitions::fgkDDLPackedRawDataType ) { continue; } diff --git a/HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx b/HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx index 2d066acdbd8..8ac1150cba0 100644 --- a/HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx @@ -112,13 +112,13 @@ const char* AliHLTTPCSliceTrackerComponent::GetComponentID() void AliHLTTPCSliceTrackerComponent::GetInputDataTypes( vector& list) { list.clear(); - list.push_back( AliHLTTPCDefinitions::gkClustersDataType ); - list.push_back( AliHLTTPCDefinitions::gkVertexDataType ); + list.push_back( AliHLTTPCDefinitions::fgkClustersDataType ); + list.push_back( AliHLTTPCDefinitions::fgkVertexDataType ); } AliHLTComponentDataType AliHLTTPCSliceTrackerComponent::GetOutputDataType() { - return AliHLTTPCDefinitions::gkTrackSegmentsDataType; + return AliHLTTPCDefinitions::fgkTrackSegmentsDataType; } void AliHLTTPCSliceTrackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) @@ -549,7 +549,7 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt else *slCntIter++; - if ( iter->fDataType == AliHLTTPCDefinitions::gkVertexDataType ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkVertexDataType ) { inPtrV = (AliHLTTPCVertexData*)(iter->fPtr); vertexIter = iter; @@ -557,7 +557,7 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt fVertex->Read( inPtrV ); vertexSlice = slice; } - if ( iter->fDataType == AliHLTTPCDefinitions::gkClustersDataType ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType ) { patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter ); if ( minPatch>patch ) @@ -614,7 +614,7 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { iter = blocks+ndx; - if ( iter->fDataType == AliHLTTPCDefinitions::gkVertexDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkVertexDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) { inPtrV = (AliHLTTPCVertexData*)(iter->fPtr); vertexIter = iter; @@ -635,7 +635,7 @@ int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evt { iter = blocks+ndx; - if ( iter->fDataType == AliHLTTPCDefinitions::gkClustersDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) + if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) { patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter ); pIter = patchIndices.begin(); diff --git a/HLT/TPCLib/AliHLTTPCVertexFinderComponent.cxx b/HLT/TPCLib/AliHLTTPCVertexFinderComponent.cxx index fe23aa85c1f..27e9b33fb70 100644 --- a/HLT/TPCLib/AliHLTTPCVertexFinderComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCVertexFinderComponent.cxx @@ -60,12 +60,12 @@ const char* AliHLTTPCVertexFinderComponent::GetComponentID() void AliHLTTPCVertexFinderComponent::GetInputDataTypes( vector& list) { list.clear(); - list.push_back( AliHLTTPCDefinitions::gkClustersDataType ); + list.push_back( AliHLTTPCDefinitions::fgkClustersDataType ); } AliHLTComponentDataType AliHLTTPCVertexFinderComponent::GetOutputDataType() { - return AliHLTTPCDefinitions::gkVertexDataType; + return AliHLTTPCDefinitions::fgkVertexDataType; } void AliHLTTPCVertexFinderComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) @@ -118,7 +118,7 @@ int AliHLTTPCVertexFinderComponent::DoEvent( const AliHLTComponentEventData& evt iter = blocks+ndx; mysize = 0; offset = tSize; - if ( iter->fDataType != AliHLTTPCDefinitions::gkClustersDataType ) + if ( iter->fDataType != AliHLTTPCDefinitions::fgkClustersDataType ) { continue; } -- 2.39.3