]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing coding violations and getting rid of warnings.
authorszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 14 Nov 2007 19:53:38 +0000 (19:53 +0000)
committerszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 14 Nov 2007 19:53:38 +0000 (19:53 +0000)
Also got rid of global objects used for component registration in favour of registration of components in the AliHLTMUONAgent::RegisterComponents method.

18 files changed:
HLT/MUON/AliHLTMUONConstants.cxx
HLT/MUON/AliHLTMUONDataTypes.h
HLT/MUON/AliHLTMUONUtils.cxx
HLT/MUON/AliHLTMUONUtils.h
HLT/MUON/OfflineInterface/AliHLTMUONAgent.cxx
HLT/MUON/OfflineInterface/AliHLTMUONAgent.h
HLT/MUON/OfflineInterface/AliHLTMUONRecHitsSource.cxx
HLT/MUON/OfflineInterface/AliHLTMUONRecHitsSource.h
HLT/MUON/OfflineInterface/AliHLTMUONRootifierComponent.cxx
HLT/MUON/OfflineInterface/AliHLTMUONRootifierComponent.h
HLT/MUON/OfflineInterface/AliHLTMUONTriggerRecordsSource.cxx
HLT/MUON/OfflineInterface/AliHLTMUONTriggerRecordsSource.h
HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONHitReconstructorComponent.h
HLT/MUON/OnlineAnalysis/AliHLTMUONMansoTrackerFSMComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONMansoTrackerFSMComponent.h
HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.cxx
HLT/MUON/OnlineAnalysis/AliHLTMUONTriggerReconstructorComponent.h

index bbe4f13fd4b5bb9e3821ca7b1b6419070192469a..32cd5941196d5defaf686e7b8e16b286b0bde6ea 100644 (file)
@@ -50,7 +50,7 @@ AliHLTMUONConstants::fgkNilTriggerRecordStruct = {
 };
 
 const AliHLTMUONTrigRecInfoStruct
 };
 
 const AliHLTMUONTrigRecInfoStruct
-AliHLTMUONConstants::fgkNilTrigRecInfoStruct = {0, 0, 0, 0};
+AliHLTMUONConstants::fgkNilTrigRecInfoStruct = {0, {0, 0, 0, 0}, 0, 0};
 
 const AliHLTMUONTriggerChannelStruct
 AliHLTMUONConstants::fgkNilTriggerChannelStruct = {0, 0, 0, 0};
 
 const AliHLTMUONTriggerChannelStruct
 AliHLTMUONConstants::fgkNilTriggerChannelStruct = {0, 0, 0, 0};
index a2129eafbd7e0da8166168294504f31bc7315455..c2ba5988a30a7b0ea117cd29f376e5181e5a5895 100644 (file)
@@ -55,7 +55,7 @@ struct AliHLTMUONDataBlockHeader
 
 
 /**
 
 
 /**
- * The sign of a particle.
+ * The sign/charge of a particle.
  */
 enum AliHLTMUONParticleSign
 {
  */
 enum AliHLTMUONParticleSign
 {
index c0dc4afbc23a4429425b90b10dae435e42f9f67f..db4eacf95bf022e4135c7459769f8a72567e4469 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONUtils.cxx
- * @author Artur Szostak <artursz@iafrica.com>
- * @date   
- * @brief  Implementation of AliHLTMUONUtils utility routines.
- */
+///
+/// @file   AliHLTMUONUtils.cxx
+/// @author Artur Szostak <artursz@iafrica.com>
+/// @date   
+/// @brief  Implementation of AliHLTMUONUtils utility routines.
+///
 
 #include "AliHLTMUONUtils.h"
 #include "AliHLTMUONConstants.h"
 
 #include "AliHLTMUONUtils.h"
 #include "AliHLTMUONConstants.h"
@@ -41,6 +41,15 @@ AliHLTUInt32_t AliHLTMUONUtils::PackTriggerRecordFlags(
                AliHLTMUONParticleSign sign, const bool hitset[4]
        )
 {
                AliHLTMUONParticleSign sign, const bool hitset[4]
        )
 {
+       ///
+       /// This packs the given parameters into the bits of a word appropriate
+       /// for AliHLTMUONTriggerRecordStruct::fFlags.
+       /// @param sign    The particle sign.
+       /// @param hitset  Flags to indicate if the corresponding fHits[i] elements
+       ///                was set/filled.
+       /// @return  Returns the 32 bit packed word.
+       ///
+       
        AliHLTUInt32_t flags;
        switch (sign)
        {
        AliHLTUInt32_t flags;
        switch (sign)
        {
@@ -58,6 +67,15 @@ void AliHLTMUONUtils::UnpackTriggerRecordFlags(
                AliHLTUInt32_t flags, AliHLTMUONParticleSign& sign, bool hitset[4]
        )
 {
                AliHLTUInt32_t flags, AliHLTMUONParticleSign& sign, bool hitset[4]
        )
 {
+       ///
+       /// This unpacks the AliHLTMUONTriggerRecordStruct::fFlags bits into
+       /// its component fields.
+       /// @param flags  The flags from an AliHLTMUONTriggerRecordStruct structure.
+       /// @param sign    Sets this to the particle sign.
+       /// @param hitset  Sets the array elements to indicate if the corresponding
+       ///                fHits[i] element was set/filled.
+       ///
+       
        AliHLTUInt32_t signbits = flags & 0xC0000000;
        switch (signbits)
        {
        AliHLTUInt32_t signbits = flags & 0xC0000000;
        switch (signbits)
        {
@@ -74,6 +92,14 @@ void AliHLTMUONUtils::UnpackTriggerRecordFlags(
 
 AliHLTUInt32_t AliHLTMUONUtils::PackTrackDecisionBits(bool highPt, bool lowPt)
 {
 
 AliHLTUInt32_t AliHLTMUONUtils::PackTrackDecisionBits(bool highPt, bool lowPt)
 {
+       ///
+       /// This packs the given parameters into the bits of a word appropriate
+       /// for AliHLTMUONTrackDecisionStruct::fTriggerBits.
+       /// @param highPt  Has the track passed the high pt cut.
+       /// @param lowPt   Has the track passed the low pt cut.
+       /// @return  Returns the 32 bit packed word.
+       ///
+       
        return (highPt ? 0x2 : 0) | (lowPt ? 0x1 : 0);
 }
 
        return (highPt ? 0x2 : 0) | (lowPt ? 0x1 : 0);
 }
 
@@ -82,6 +108,15 @@ void AliHLTMUONUtils::UnpackTrackDecisionBits(
                AliHLTUInt32_t bits, bool& highPt, bool& lowPt
        )
 {
                AliHLTUInt32_t bits, bool& highPt, bool& lowPt
        )
 {
+       ///
+       /// This unpacks the AliHLTMUONTrackDecisionStruct::fTriggerBits bits into
+       /// its component fields.
+       /// @param bits  The trigger bits from an AliHLTMUONTrackDecisionStruct
+       ///              structure.
+       /// @param highPt Sets this to the value of the high pt cut bit.
+       /// @param lowPt  Sets this to the value of the low pt cut bit.
+       ///
+       
        lowPt  = (bits & 0x1) == 1;
        highPt = (bits & 0x2) == 1;
 }
        lowPt  = (bits & 0x1) == 1;
        highPt = (bits & 0x2) == 1;
 }
@@ -92,6 +127,23 @@ AliHLTUInt32_t AliHLTMUONUtils::PackPairDecisionBits(
                AliHLTUInt8_t highPtCount, AliHLTUInt8_t lowPtCount
        )
 {
                AliHLTUInt8_t highPtCount, AliHLTUInt8_t lowPtCount
        )
 {
+       ///
+       /// This packs the given parameters into the bits of a word appropriate
+       /// for AliHLTMUONPairDecisionStruct::fTriggerBits.
+       ///
+       /// @param highMass Has the track pair passed the high invariant mass cut.
+       /// @param lowMass  Has the track pair passed the low invariant mass cut.
+       /// @param unlike   Does the track pair have unlike signs.
+       /// @param highPtCount The number of tracks that passed the high pt cut
+       ///                    in the pair.
+       /// @param lowPtCount  The number of tracks that passed the low pt cut
+       ///                    in the pair.
+       /// @return  Returns the 32 bit packed word.
+       ///
+       /// Note: Must have highPtCount + lowPtCount <= 2 and unlike == true if
+       /// highMass or lowMass is true.
+       ///
+       
        assert( highPtCount + lowPtCount <= 2 );
        // highMass and lowMass must be false if unlike is false:
        assert( not unlike ? (highMass == false and lowMass == false) : true );
        assert( highPtCount + lowPtCount <= 2 );
        // highMass and lowMass must be false if unlike is false:
        assert( not unlike ? (highMass == false and lowMass == false) : true );
@@ -106,6 +158,18 @@ void AliHLTMUONUtils::UnpackPairDecisionBits(
                AliHLTUInt8_t& highPtCount, AliHLTUInt8_t& lowPtCount
        )
 {
                AliHLTUInt8_t& highPtCount, AliHLTUInt8_t& lowPtCount
        )
 {
+       ///
+       /// This unpacks the AliHLTMUONPairDecisionStruct::fTriggerBits bits into
+       /// its component fields.
+       /// @param bits  The trigger bits from an AliHLTMUONPairDecisionStruct
+       ///              structure.
+       /// @param highMass Sets this to the value of the high invariant mass cut bit.
+       /// @param lowMass  Sets this to the value of the low invariant mass cut bit.
+       /// @param unlike   Sets this if the pair is unlike sign.
+       /// @param highPtCount Sets this to the high pt count bits.
+       /// @param lowPtCount  Sets this to the low pt count bits.
+       ///
+       
        highMass = (bits & 0x40) == 1;
        lowMass  = (bits & 0x20) == 1;
        unlike   = (bits & 0x10) == 1;
        highMass = (bits & 0x40) == 1;
        lowMass  = (bits & 0x20) == 1;
        unlike   = (bits & 0x10) == 1;
@@ -118,6 +182,17 @@ AliHLTUInt32_t AliHLTMUONUtils::PackSpecBits(
                const bool ddl[22]
        )
 {
                const bool ddl[22]
        )
 {
+       ///
+       /// This packs the given parameters into the 32bit Pub/Sub specification
+       /// word in the data block descriptor.
+       ///
+       /// @param ddl  The list of DDLs forming part of the readout. ddl[0]
+       ///             indicates DDL number 2560, ddl[1] is for DDL 2561 and so
+       ///             on up to ddl[19]. ddl[20] and ddl[21] will be for the
+       ///             trigger DDLs 2816 and 2817 respectively.
+       /// @return  Returns the 32 bit packed specification word.
+       ///
+       
        // Pack the bits into the following format:
        //   bit:   [        31 - 22        ][     21     ][     20     ][  19 - 0 ]
        //   field: [ reserved, set to zero ][ TRGDDL2817 ][ TRGDDL2816 ][ TRKDDLS ]
        // Pack the bits into the following format:
        //   bit:   [        31 - 22        ][     21     ][     20     ][  19 - 0 ]
        //   field: [ reserved, set to zero ][ TRGDDL2817 ][ TRGDDL2816 ][ TRKDDLS ]
@@ -137,6 +212,16 @@ void AliHLTMUONUtils::UnpackSpecBits(
                AliHLTUInt32_t bits, bool ddl[22]
        )
 {
                AliHLTUInt32_t bits, bool ddl[22]
        )
 {
+       ///
+       /// This unpacks the AliHLTMUONPairDecisionStruct::fTriggerBits bits into
+       /// its component fields.
+       /// @param bits  The Pub/Sub specification word from a data block descriptor.
+       /// @param ddl  The output list of DDLs forming part of the readout. ddl[0]
+       ///             indicates DDL number 2560, ddl[1] is for DDL 2561 and so
+       ///             on up to ddl[19]. ddl[20] and ddl[21] will be for the
+       ///             trigger DDLs 2816 and 2817 respectively.
+       ///
+       
        // Perform the inverse operation of PackSpecBits.
        for (int i = 0; i < 22; i++)
                ddl[i] = ((bits >> i) & 0x1) == 1;
        // Perform the inverse operation of PackSpecBits.
        for (int i = 0; i < 22; i++)
                ddl[i] = ((bits >> i) & 0x1) == 1;
@@ -148,6 +233,14 @@ bool AliHLTMUONUtils::HeaderOk(
                WhyNotValid* reason
        )
 {
                WhyNotValid* reason
        )
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       /// If the 'reason' parameter is not NULL then these methods will fill the
+       /// memory pointed to by reason with a code describing of why the header
+       /// is not valid, if and only if a problem is found with the data.
+       ///
+        
        // The block must have the correct type.
        if (block.fHeader.fType != kTriggerRecordsDataBlock)
        {
        // The block must have the correct type.
        if (block.fHeader.fType != kTriggerRecordsDataBlock)
        {
@@ -168,6 +261,11 @@ bool AliHLTMUONUtils::HeaderOk(
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONTrigRecsDebugBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONTrigRecsDebugBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kTrigRecsDebugDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kTrigRecsDebugDataBlock) return false;
        // The block's record width must be the correct size.
@@ -179,6 +277,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONTrigRecsDebugBlockStruct& block)
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONTriggerChannelsBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONTriggerChannelsBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kTriggerChannelsDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kTriggerChannelsDataBlock) return false;
        // The block's record width must be the correct size.
@@ -190,6 +293,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONTriggerChannelsBlockStruct& block
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONRecHitsBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONRecHitsBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kRecHitsDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kRecHitsDataBlock) return false;
        // The block's record width must be the correct size.
@@ -201,6 +309,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONRecHitsBlockStruct& block)
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONClustersBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONClustersBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kClustersDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kClustersDataBlock) return false;
        // The block's record width must be the correct size.
@@ -212,6 +325,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONClustersBlockStruct& block)
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONChannelsBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONChannelsBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kChannelsDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kChannelsDataBlock) return false;
        // The block's record width must be the correct size.
@@ -223,6 +341,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONChannelsBlockStruct& block)
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONMansoTracksBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONMansoTracksBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kMansoTracksDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kMansoTracksDataBlock) return false;
        // The block's record width must be the correct size.
@@ -234,6 +357,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONMansoTracksBlockStruct& block)
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONMansoCandidatesBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONMansoCandidatesBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kMansoCandidatesDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kMansoCandidatesDataBlock) return false;
        // The block's record width must be the correct size.
@@ -245,6 +373,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONMansoCandidatesBlockStruct& block
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONSinglesDecisionBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONSinglesDecisionBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kSinglesDecisionDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kSinglesDecisionDataBlock) return false;
        // The block's record width must be the correct size.
@@ -256,6 +389,11 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONSinglesDecisionBlockStruct& block
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONPairsDecisionBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONPairsDecisionBlockStruct& block)
 {
+       ///
+       /// Methods used to check if the header information corresponds to the
+       /// supposed type of the data block.
+       ///
+       
        // The block must have the correct type.
        if (block.fHeader.fType != kPairsDecisionDataBlock) return false;
        // The block's record width must be the correct size.
        // The block must have the correct type.
        if (block.fHeader.fType != kPairsDecisionDataBlock) return false;
        // The block's record width must be the correct size.
@@ -267,6 +405,12 @@ bool AliHLTMUONUtils::HeaderOk(const AliHLTMUONPairsDecisionBlockStruct& block)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerRecordStruct& tr)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerRecordStruct& tr)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        // Make sure that the reserved bits in the fFlags field are set
        // to zero.
        if ((tr.fFlags & 0x3FFFFFF0) != 0) return false;
        // Make sure that the reserved bits in the fFlags field are set
        // to zero.
        if ((tr.fFlags & 0x3FFFFFF0) != 0) return false;
@@ -289,6 +433,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerRecordStruct& tr)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerRecordsBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerRecordsBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
 
        // Check if any ID is duplicated.
        if (not HeaderOk(block)) return false;
 
        // Check if any ID is duplicated.
@@ -314,6 +464,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerRecordsBlockStruct& blo
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTrigRecsDebugBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTrigRecsDebugBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
        return true;
 }
        if (not HeaderOk(block)) return false;
        return true;
 }
@@ -321,6 +477,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTrigRecsDebugBlockStruct& bloc
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerChannelsBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerChannelsBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
        return true;
 }
        if (not HeaderOk(block)) return false;
        return true;
 }
@@ -328,6 +490,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTriggerChannelsBlockStruct& bl
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONRecHitsBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONRecHitsBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
        return true;
 }
        if (not HeaderOk(block)) return false;
        return true;
 }
@@ -335,6 +503,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONRecHitsBlockStruct& block)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONClustersBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONClustersBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
 
        // Check if any ID is duplicated.
        if (not HeaderOk(block)) return false;
 
        // Check if any ID is duplicated.
@@ -354,6 +528,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONClustersBlockStruct& block)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONChannelsBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONChannelsBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
        return true;
 }
        if (not HeaderOk(block)) return false;
        return true;
 }
@@ -361,6 +541,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONChannelsBlockStruct& block)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoTrackStruct& track)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoTrackStruct& track)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        // Make sure that the reserved bits in the fFlags field are set
        // to zero.
        if ((track.fFlags & 0x3FFFFFF0) != 0) return false;
        // Make sure that the reserved bits in the fFlags field are set
        // to zero.
        if ((track.fFlags & 0x3FFFFFF0) != 0) return false;
@@ -383,6 +569,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoTrackStruct& track)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoTracksBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoTracksBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
 
        // Check if any ID is duplicated.
        if (not HeaderOk(block)) return false;
 
        // Check if any ID is duplicated.
@@ -408,6 +600,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoTracksBlockStruct& block)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoCandidatesBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoCandidatesBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
 
        // Check that the tracks have integrity.
        if (not HeaderOk(block)) return false;
 
        // Check that the tracks have integrity.
@@ -422,6 +620,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONMansoCandidatesBlockStruct& bl
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTrackDecisionStruct& decision)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTrackDecisionStruct& decision)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        // Make sure that the reserved bits in the fTriggerBits field are set
        // to zero.
        if ((decision.fTriggerBits & 0xFFFFFFFC) != 0) return false;
        // Make sure that the reserved bits in the fTriggerBits field are set
        // to zero.
        if ((decision.fTriggerBits & 0xFFFFFFFC) != 0) return false;
@@ -431,6 +635,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONTrackDecisionStruct& decision)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONSinglesDecisionBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONSinglesDecisionBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
 
        // Check that the trigger bits for each track have integrity.
        if (not HeaderOk(block)) return false;
 
        // Check that the trigger bits for each track have integrity.
@@ -445,6 +655,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONSinglesDecisionBlockStruct& bl
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONPairDecisionStruct& decision)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONPairDecisionStruct& decision)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        // Make sure that the reserved bits in the fTriggerBits field are set
        // to zero.
        if ((decision.fTriggerBits & 0xFFFFFF80) != 0) return false;
        // Make sure that the reserved bits in the fTriggerBits field are set
        // to zero.
        if ((decision.fTriggerBits & 0xFFFFFF80) != 0) return false;
@@ -467,6 +683,12 @@ bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONPairDecisionStruct& decision)
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONPairsDecisionBlockStruct& block)
 {
 
 bool AliHLTMUONUtils::IntegrityOk(const AliHLTMUONPairsDecisionBlockStruct& block)
 {
+       ///
+       /// Methods used to check more extensively if the integrity of various
+       /// types of data blocks are Ok and returns true in that case.
+       /// These can be slow and should generally only be used for debugging.
+       ///
+       
        if (not HeaderOk(block)) return false;
 
        // Check that the trigger bits for each track pair have integrity.
        if (not HeaderOk(block)) return false;
 
        // Check that the trigger bits for each track pair have integrity.
index 275b792e933d759211a5c484667555edd3e62d9c..a36313e9cc8538241751e6c853c02ee8ab76c5cc 100644 (file)
@@ -5,12 +5,12 @@
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONUtils.h
- * @author Artur Szostak <artursz@iafrica.com>
- * @date   
- * @brief  Class containing various dimuon HLT utility routines and macros.
- */
+///
+/// @file   AliHLTMUONUtils.h
+/// @author Artur Szostak <artursz@iafrica.com>
+/// @date   
+/// @brief  Class containing various dimuon HLT utility routines and macros.
+///
 
 #include "AliHLTMUONDataTypes.h"
 
 
 #include "AliHLTMUONDataTypes.h"
 
index 90ed7971bcea9b3a8a62e6b8c68c3f4c8ac07378..55ca8110d5c3e8ed289fbc5e17d043558735da56 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONAgent.cxx
- * @author Artur Szostak <artursz@iafrica.com>
- * @date   
- * @brief  Implementation of the AliHLTMUONAgent class.
- */
+///
+/// @file   AliHLTMUONAgent.cxx
+/// @author Artur Szostak <artursz@iafrica.com>
+/// @date   
+/// @brief  Implementation of the AliHLTMUONAgent class.
+///
 
 #include "AliHLTMUONAgent.h"
 
 #include "AliHLTMUONAgent.h"
+#include "AliHLTMUONRecHitsSource.h"
+#include "AliHLTMUONTriggerRecordsSource.h"
+#include "AliHLTMUONRootifierComponent.h"
+#include "AliHLTMUONHitReconstructorComponent.h"
+#include "AliHLTMUONTriggerReconstructorComponent.h"
+#include "AliHLTMUONMansoTrackerFSMComponent.h"
 #include "AliRunLoader.h"
 
 #include "AliRunLoader.h"
 
-namespace
-{
-       // The single global instance of the dimuon HLT agent.
-       AliHLTMUONAgent gAliHLTMUONAgent;
-}
+// The single global instance of the dimuon HLT agent.
+AliHLTMUONAgent AliHLTMUONAgent::fgkInstance;
 
 ClassImp(AliHLTMUONAgent);
 
 
 AliHLTMUONAgent::AliHLTMUONAgent() : AliHLTModuleAgent()
 {
 
 ClassImp(AliHLTMUONAgent);
 
 
 AliHLTMUONAgent::AliHLTMUONAgent() : AliHLTModuleAgent()
 {
+       ///
+       /// Default constructor.
+       ///
 }
 
 AliHLTMUONAgent::~AliHLTMUONAgent()
 {
 }
 
 AliHLTMUONAgent::~AliHLTMUONAgent()
 {
+       ///
+       /// Default destructor.
+       ///
 }
 
 const char* AliHLTMUONAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
                                                     AliRunLoader* /*runloader*/
        ) const
 {
 }
 
 const char* AliHLTMUONAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
                                                     AliRunLoader* /*runloader*/
        ) const
 {
+       ///
+       /// Inherited from AliHLTModuleAgent.
+       /// Returns the top processing chain configurations for local event
+       /// reconstruction.
+       /// @param rawReader  [in] AliRoot rawreader instance.
+       /// @param runloader  [in] AliRoot runloader
+       /// @return string containing the top configurations separated by blanks.
+       ///
+       
        return "dhlt-simhits";
 }
 
 const char* AliHLTMUONAgent::GetRequiredComponentLibraries() const
 {
        return "dhlt-simhits";
 }
 
 const char* AliHLTMUONAgent::GetRequiredComponentLibraries() const
 {
+       ///
+       /// Inherited from AliHLTModuleAgent.
+       /// Returns a list of libraries which the configurations registered by
+       /// this module agent depend on.
+       /// @return list of component libraries as a blank-separated string.
+       ///
+       
        return "libGeom.so libMinuit.so libEG.so libTreePlayer.so libXMLIO.so "
                "libVMC.so libESD.so libSTEER.so libGui.so libMUONraw.so libMUONgeometry.so "
                "libMUONmapping.so libMUONcalib.so libMUONbase.so libMUONsim.so libAliHLTMUON.so";
        return "libGeom.so libMinuit.so libEG.so libTreePlayer.so libXMLIO.so "
                "libVMC.so libESD.so libSTEER.so libGui.so libMUONraw.so libMUONgeometry.so "
                "libMUONmapping.so libMUONcalib.so libMUONbase.so libMUONsim.so libAliHLTMUON.so";
@@ -63,7 +88,35 @@ int AliHLTMUONAgent::CreateConfigurations(
                AliRunLoader* /*runloader*/
        ) const
 {
                AliRunLoader* /*runloader*/
        ) const
 {
+       ///
+       /// Register all processing configurations belonging to the dimuon HLT
+       /// library with the AliHLTConfigurationHandler.
+       /// @param handler      the configuration handler
+       /// @param rawReader  [in] AliRoot rawreader instance.
+       /// @param runloader    AliRoot runloader
+       /// @return Zero on success and error code if failed.
+       ///
+       
        if (handler == NULL) return 0;
        handler->CreateConfiguration("dhlt-simhits", "DimuoRecHitsSource", NULL, "-simdata");
        return 0;
 }
        if (handler == NULL) return 0;
        handler->CreateConfiguration("dhlt-simhits", "DimuoRecHitsSource", NULL, "-simdata");
        return 0;
 }
+
+
+int AliHLTMUONAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
+{
+       ///
+       /// Registers all available components of this module.
+       /// @param pHandler  [in] instance of the component handler.
+       ///
+       
+       if (pHandler == NULL) return -EINVAL;
+       pHandler->AddComponent(new AliHLTMUONRecHitsSource);
+       pHandler->AddComponent(new AliHLTMUONTriggerRecordsSource);
+       pHandler->AddComponent(new AliHLTMUONRootifierComponent);
+       pHandler->AddComponent(new AliHLTMUONHitReconstructorComponent);
+       pHandler->AddComponent(new AliHLTMUONTriggerReconstructorComponent);
+       pHandler->AddComponent(new AliHLTMUONMansoTrackerFSMComponent);
+       return 0;
+}
+
index 7621b7a5ea7b88c6c9c0afa4b34be272c11da8dc..34f8cab37b71bcae86cf4ce5ccafe603b4467cb5 100644 (file)
@@ -5,13 +5,13 @@
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONAgent.h
- * @author Artur Szostak <artursz@iafrica.com>
- * @date   
- * @brief  The HLT module agent for libAliHLTMUON.so which interfaces HLT
- *         components with offline.
- */
+///
+/// @file   AliHLTMUONAgent.h
+/// @author Artur Szostak <artursz@iafrica.com>
+/// @date   
+/// @brief  The HLT module agent for libAliHLTMUON.so which interfaces HLT
+///         components with offline.
+///
 
 #include "AliHLTModuleAgent.h"
 class AliRunLoader;
 
 #include "AliHLTModuleAgent.h"
 class AliRunLoader;
@@ -27,6 +27,8 @@ public:
        
        virtual ~AliHLTMUONAgent();
 
        
        virtual ~AliHLTMUONAgent();
 
+       // The following methods are all inherited from AliHLTModuleAgent:
+       
        /**
         * Register all processing configurations belonging to the dimuon HLT
         * library with the AliHLTConfigurationHandler.
        /**
         * Register all processing configurations belonging to the dimuon HLT
         * library with the AliHLTConfigurationHandler.
@@ -34,7 +36,7 @@ public:
         * @param runloader    AliRoot runloader
         * @return Zero on success and error code if failed.
         */
         * @param runloader    AliRoot runloader
         * @return Zero on success and error code if failed.
         */
-       int CreateConfigurations(
+       virtual int CreateConfigurations(
                        AliHLTConfigurationHandler* handler,
                        AliRawReader* rawReader=NULL,
                        AliRunLoader* runloader = NULL
                        AliHLTConfigurationHandler* handler,
                        AliRawReader* rawReader=NULL,
                        AliRunLoader* runloader = NULL
@@ -46,14 +48,24 @@ public:
         * @param runloader  [in] AliRoot runloader
         * @return string containing the top configurations separated by blanks.
         */
         * @param runloader  [in] AliRoot runloader
         * @return string containing the top configurations separated by blanks.
         */
-       const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+       virtual const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
                                            AliRunLoader* runloader = NULL) const;
 
        /**
         * Component libraries which the configurations of this agent depend on.
         * @return list of component libraries as a blank-separated string.
         */
                                            AliRunLoader* runloader = NULL) const;
 
        /**
         * Component libraries which the configurations of this agent depend on.
         * @return list of component libraries as a blank-separated string.
         */
-       const char* GetRequiredComponentLibraries() const;
+       virtual const char* GetRequiredComponentLibraries() const;
+       
+       /**
+        * Registers all available components of this module.
+        * @param pHandler  [in] instance of the component handler.
+        */
+       virtual int RegisterComponents(AliHLTComponentHandler* pHandler) const;
+       
+private:
+       // The following instance is used for automatic agent and component registration.
+       static AliHLTMUONAgent fgkInstance;  // The single global instance of the dimuon HLT agent.
 
        ClassDef(AliHLTMUONAgent, 1); // Dimuon HLT module agent which handles processing configurations.
 };
 
        ClassDef(AliHLTMUONAgent, 1); // Dimuon HLT module agent which handles processing configurations.
 };
index f795e5f8c1205996b29e5dd30c30fcef43e96882..77b24b2508909bc2ac059940815dcfcb5ba25b7a 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONRecHitsSource.cxx
- * @author Artur Szostak <artursz@iafrica.com>
- * @date   
- * @brief  Implementation of the AliHLTMUONRecHitsSource component.
- */
+///
+/// @file   AliHLTMUONRecHitsSource.cxx
+/// @author Artur Szostak <artursz@iafrica.com>
+/// @date   
+/// @brief  Implementation of the AliHLTMUONRecHitsSource component.
+///
 
 #include "AliHLTMUONRecHitsSource.h"
 #include "AliHLTMUONConstants.h"
 
 #include "AliHLTMUONRecHitsSource.h"
 #include "AliHLTMUONConstants.h"
 #include "mapping/AliMpCDB.h"
 #include "mapping/AliMpDEManager.h"
 #include "mapping/AliMpDetElement.h"
 #include "mapping/AliMpCDB.h"
 #include "mapping/AliMpDEManager.h"
 #include "mapping/AliMpDetElement.h"
-#include "TClonesArray.h"
 #include <cstdlib>
 #include <cstdio>
 #include <cerrno>
 #include <cassert>
 #include <new>
 
 #include <cstdlib>
 #include <cstdio>
 #include <cerrno>
 #include <cassert>
 #include <new>
 
-namespace
-{
-       // The global object used for automatic component registration.
-       // Note DO NOT use this component for calculation!
-       AliHLTMUONRecHitsSource gAliHLTMUONRecHitsSource;
-}
-
-
 ClassImp(AliHLTMUONRecHitsSource);
 
 
 ClassImp(AliHLTMUONRecHitsSource);
 
 
@@ -60,8 +51,12 @@ AliHLTMUONRecHitsSource::AliHLTMUONRecHitsSource() :
        fMCDataInterface(NULL),
        fDataInterface(NULL),
        fSelection(kWholePlane),
        fMCDataInterface(NULL),
        fDataInterface(NULL),
        fSelection(kWholePlane),
-       fCurrentEvent(0)
+       fCurrentEventIndex(0)
 {
 {
+       ///
+       /// Default constructor.
+       ///
+
        for (Int_t i = 0; i < AliMUONConstants::NTrackingCh(); i++)
                fServeChamber[i] = false;
 }
        for (Int_t i = 0; i < AliMUONConstants::NTrackingCh(); i++)
                fServeChamber[i] = false;
 }
@@ -69,6 +64,10 @@ AliHLTMUONRecHitsSource::AliHLTMUONRecHitsSource() :
 
 AliHLTMUONRecHitsSource::~AliHLTMUONRecHitsSource()
 {
 
 AliHLTMUONRecHitsSource::~AliHLTMUONRecHitsSource()
 {
+       ///
+       /// Default destructor.
+       ///
+       
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
 }
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
 }
@@ -76,6 +75,11 @@ AliHLTMUONRecHitsSource::~AliHLTMUONRecHitsSource()
 
 int AliHLTMUONRecHitsSource::DoInit(int argc, const char** argv)
 {
 
 int AliHLTMUONRecHitsSource::DoInit(int argc, const char** argv)
 {
+       ///
+       /// Inherited from AliHLTComponent.
+       /// Parses the command line parameters and initialises the component.
+       ///
+
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
        
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
        
@@ -83,7 +87,7 @@ int AliHLTMUONRecHitsSource::DoInit(int argc, const char** argv)
        bool simdata = false;
        bool recdata = false;
        bool chamberWasSet = false;
        bool simdata = false;
        bool recdata = false;
        bool chamberWasSet = false;
-       fCurrentEvent = 0;
+       fCurrentEventIndex = 0;
        bool firstEventSet = false;
        bool eventNumLitSet = false;
        
        bool firstEventSet = false;
        bool eventNumLitSet = false;
        
@@ -168,7 +172,7 @@ int AliHLTMUONRecHitsSource::DoInit(int argc, const char** argv)
                                ));
                                return EINVAL;
                        }
                                ));
                                return EINVAL;
                        }
-                       fCurrentEvent = Int_t(num);
+                       fCurrentEventIndex = Int_t(num);
                        firstEventSet = true;
                }
                else if (strcmp(argv[i], "-event_number_literal") == 0)
                        firstEventSet = true;
                }
                else if (strcmp(argv[i], "-event_number_literal") == 0)
@@ -179,7 +183,7 @@ int AliHLTMUONRecHitsSource::DoInit(int argc, const char** argv)
                                        " override -firstevent."
                                );
                        }
                                        " override -firstevent."
                                );
                        }
-                       fCurrentEvent = -1;
+                       fCurrentEventIndex = -1;
                        eventNumLitSet = true;
                }
                else
                        eventNumLitSet = true;
                }
                else
@@ -276,18 +280,18 @@ int AliHLTMUONRecHitsSource::DoInit(int argc, const char** argv)
                }
        }
        
                }
        }
        
-       // Check that the fCurrentEvent number falls within the correct range.
+       // Check that the fCurrentEventIndex number falls within the correct range.
        UInt_t maxevent = 0;
        if (fMCDataInterface != NULL)
                maxevent = UInt_t(fMCDataInterface->NumberOfEvents());
        else if (fDataInterface != NULL)
                maxevent = UInt_t(fDataInterface->NumberOfEvents());
        UInt_t maxevent = 0;
        if (fMCDataInterface != NULL)
                maxevent = UInt_t(fMCDataInterface->NumberOfEvents());
        else if (fDataInterface != NULL)
                maxevent = UInt_t(fDataInterface->NumberOfEvents());
-       if (fCurrentEvent != -1 and UInt_t(fCurrentEvent) >= maxevent and maxevent != 0)
+       if (fCurrentEventIndex != -1 and UInt_t(fCurrentEventIndex) >= maxevent and maxevent != 0)
        {
        {
-               fCurrentEvent = 0;
+               fCurrentEventIndex = 0;
                HLTWarning(Form("The selected first event number (%d) was larger than"
                        " the available number of events (%d). Resetting the event"
                HLTWarning(Form("The selected first event number (%d) was larger than"
                        " the available number of events (%d). Resetting the event"
-                       " counter to zero.", fCurrentEvent, maxevent
+                       " counter to zero.", fCurrentEventIndex, maxevent
                ));
        }
        
                ));
        }
        
@@ -297,6 +301,10 @@ int AliHLTMUONRecHitsSource::DoInit(int argc, const char** argv)
 
 int AliHLTMUONRecHitsSource::DoDeinit()
 {
 
 int AliHLTMUONRecHitsSource::DoDeinit()
 {
+       ///
+       /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+       ///
+       
        if (fMCDataInterface != NULL)
        {
                delete fMCDataInterface;
        if (fMCDataInterface != NULL)
        {
                delete fMCDataInterface;
@@ -313,12 +321,20 @@ int AliHLTMUONRecHitsSource::DoDeinit()
 
 const char* AliHLTMUONRecHitsSource::GetComponentID()
 {
 
 const char* AliHLTMUONRecHitsSource::GetComponentID()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the component ID.
+       ///
+       
        return AliHLTMUONConstants::RecHitsSourceId();
 }
 
 
 AliHLTComponentDataType AliHLTMUONRecHitsSource::GetOutputDataType()
 {
        return AliHLTMUONConstants::RecHitsSourceId();
 }
 
 
 AliHLTComponentDataType AliHLTMUONRecHitsSource::GetOutputDataType()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the output data type.
+       ///
+       
        return AliHLTMUONConstants::RecHitsBlockDataType();
 }
 
        return AliHLTMUONConstants::RecHitsBlockDataType();
 }
 
@@ -327,6 +343,10 @@ void AliHLTMUONRecHitsSource::GetOutputDataSize(
                unsigned long& constBase, double& inputMultiplier
        )
 {
                unsigned long& constBase, double& inputMultiplier
        )
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+       ///
+       
        constBase = sizeof(AliHLTMUONRecHitsBlockStruct)
                + 256*16*sizeof(AliHLTMUONRecHitStruct);
        inputMultiplier = 0;
        constBase = sizeof(AliHLTMUONRecHitsBlockStruct)
                + 256*16*sizeof(AliHLTMUONRecHitStruct);
        inputMultiplier = 0;
@@ -335,6 +355,10 @@ void AliHLTMUONRecHitsSource::GetOutputDataSize(
 
 AliHLTComponent* AliHLTMUONRecHitsSource::Spawn()
 {
 
 AliHLTComponent* AliHLTMUONRecHitsSource::Spawn()
 {
+       ///
+       /// Inherited from AliHLTComponent. Creates a new object instance.
+       ///
+       
        return new AliHLTMUONRecHitsSource();
 }
 
        return new AliHLTMUONRecHitsSource();
 }
 
@@ -347,6 +371,10 @@ int AliHLTMUONRecHitsSource::GetEvent(
                vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
                vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
+       ///
+       /// Inherited from AliHLTOfflineDataSource. Creates new event data blocks.
+       ///
+       
        assert( fMCDataInterface != NULL or fDataInterface != NULL );
 
        // Check the size of the event descriptor structure.
        assert( fMCDataInterface != NULL or fDataInterface != NULL );
 
        // Check the size of the event descriptor structure.
@@ -365,20 +393,20 @@ int AliHLTMUONRecHitsSource::GetEvent(
                return EINVAL;
        }
        
                return EINVAL;
        }
        
-       // Use the fEventID as the event number to load if fCurrentEvent == -1,
+       // Use the fEventID as the event number to load if fCurrentEventIndex == -1,
        // check it and load that event with the runloader.
        // check it and load that event with the runloader.
-       // If fCurrentEvent is a positive number then us it instead and
+       // If fCurrentEventIndex is a positive number then us it instead and
        // increment it.
        UInt_t eventnumber = UInt_t(evtData.fEventID);
        UInt_t maxevent = fMCDataInterface != NULL ?
                UInt_t(fMCDataInterface->NumberOfEvents())
                : UInt_t(fDataInterface->NumberOfEvents());
        // increment it.
        UInt_t eventnumber = UInt_t(evtData.fEventID);
        UInt_t maxevent = fMCDataInterface != NULL ?
                UInt_t(fMCDataInterface->NumberOfEvents())
                : UInt_t(fDataInterface->NumberOfEvents());
-       if (fCurrentEvent != -1)
+       if (fCurrentEventIndex != -1)
        {
        {
-               eventnumber = UInt_t(fCurrentEvent);
-               fCurrentEvent++;
-               if (UInt_t(fCurrentEvent) >= maxevent)
-                       fCurrentEvent = 0;
+               eventnumber = UInt_t(fCurrentEventIndex);
+               fCurrentEventIndex++;
+               if (UInt_t(fCurrentEventIndex) >= maxevent)
+                       fCurrentEventIndex = 0;
        }
        if ( eventnumber >= maxevent )
        {
        }
        if ( eventnumber >= maxevent )
        {
@@ -558,6 +586,16 @@ int AliHLTMUONRecHitsSource::GetEvent(
 
 int AliHLTMUONRecHitsSource::ParseChamberString(const char* str)
 {
 
 int AliHLTMUONRecHitsSource::ParseChamberString(const char* str)
 {
+       ///
+       /// Parses a string with the following format:
+       ///   <number>|<number>-<number>[,<number>|<number>-<number>]...
+       /// For example: 1  1,2,3  1-2   1,2-4,5  etc...
+       /// Flags in the fServeChamber will be set to 'true' for all appropriate
+       /// values parsed.
+       /// @param str  The string to parse.
+       /// @return  Zero on success and EINVAL if there is a parse error.
+       ///
+       
        char* end = const_cast<char*>(str);
        long lastChamber = -1;
        do
        char* end = const_cast<char*>(str);
        long lastChamber = -1;
        do
index 93ad4c68e84d08aa364a3681df7fb789b6876531..c509a16bbf99d6eda44be8d568dc181f33da87b0 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONRecHitsSource.h
- * @author Artur Szostak <artursz@iafrica.com>
- * @date   
- * @brief  Class for generating reconstructed hits data blocks from AliRoot data.
- */
+///
+/// @file   AliHLTMUONRecHitsSource.h
+/// @author Artur Szostak <artursz@iafrica.com>
+/// @date   
+/// @brief  Class for generating reconstructed hits data blocks from AliRoot data.
+///
 
 #include "AliHLTOfflineDataSource.h"
 
 
 #include "AliHLTOfflineDataSource.h"
 
@@ -67,14 +67,6 @@ public:
        AliHLTMUONRecHitsSource();
        virtual ~AliHLTMUONRecHitsSource();
        
        AliHLTMUONRecHitsSource();
        virtual ~AliHLTMUONRecHitsSource();
        
-       virtual int GetEvent(
-                       const AliHLTComponentEventData& evtData,
-                       AliHLTComponentTriggerData& trigData,
-                       AliHLTUInt8_t* outputPtr, 
-                       AliHLTUInt32_t& size,
-                       vector<AliHLTComponentBlockData>& outputBlocks
-               );
-       
        virtual const char* GetComponentID();
 
        virtual AliHLTComponentDataType GetOutputDataType();
        virtual const char* GetComponentID();
 
        virtual AliHLTComponentDataType GetOutputDataType();
@@ -88,6 +80,16 @@ protected:
        virtual int DoInit(int argc, const char** argv);
        virtual int DoDeinit();
        
        virtual int DoInit(int argc, const char** argv);
        virtual int DoDeinit();
        
+       virtual int GetEvent(
+                       const AliHLTComponentEventData& evtData,
+                       AliHLTComponentTriggerData& trigData,
+                       AliHLTUInt8_t* outputPtr, 
+                       AliHLTUInt32_t& size,
+                       vector<AliHLTComponentBlockData>& outputBlocks
+               );
+       
+       using AliHLTOfflineDataSource::GetEvent;
+       
 private:
 
        // Prevent copying of these objects.
 private:
 
        // Prevent copying of these objects.
@@ -118,9 +120,9 @@ private:
        SelectionType fSelection; //! Indicates if we should publish from the left, right or whole XY plane.
        bool fServeChamber[10]; //! Flag to indicate if hits from a given chamber should be published.
        
        SelectionType fSelection; //! Indicates if we should publish from the left, right or whole XY plane.
        bool fServeChamber[10]; //! Flag to indicate if hits from a given chamber should be published.
        
-       Int_t fCurrentEvent;  //! The current event index that is loaded.
-                             //  -1 indicates that we should rather use the event
-                             // numbers as given by the system.
+       Int_t fCurrentEventIndex;  //! The current event index that is loaded.
+                                  //  -1 indicates that we should rather use the event
+                                  // numbers as given by the system.
 
        ClassDef(AliHLTMUONRecHitsSource, 0); // dHLT data source for reconstructed hit data blocks.
 };
 
        ClassDef(AliHLTMUONRecHitsSource, 0); // dHLT data source for reconstructed hit data blocks.
 };
index cf544dae1711f9ded1047bc980901e4c03529dee..057886bc1175b634dc51158e62a130ce3b7a6adb 100644 (file)
 #include "AliHLTMUONRecHit.h"
 #include "AliHLTMUONTriggerRecord.h"
 #include "AliHLTMUONMansoTrack.h"
 #include "AliHLTMUONRecHit.h"
 #include "AliHLTMUONTriggerRecord.h"
 #include "AliHLTMUONMansoTrack.h"
-#include "TObjArray.h"
 #include <cassert>
 
 #include <cassert>
 
-namespace
-{
-       // The global object used for automatic component registration.
-       // Note DO NOT use this component for calculation!
-       AliHLTMUONRootifierComponent gAliHLTMUONRootifierComponent;
-}
-
 ClassImp(AliHLTMUONEvent);
 ClassImp(AliHLTMUONRootifierComponent);
 
 ClassImp(AliHLTMUONEvent);
 ClassImp(AliHLTMUONRootifierComponent);
 
@@ -47,34 +39,57 @@ ClassImp(AliHLTMUONRootifierComponent);
 AliHLTMUONRootifierComponent::AliHLTMUONRootifierComponent() :
        AliHLTProcessor()
 {
 AliHLTMUONRootifierComponent::AliHLTMUONRootifierComponent() :
        AliHLTProcessor()
 {
+       ///
+       /// Default constructor.
+       ///
 }
 
 
 AliHLTMUONRootifierComponent::~AliHLTMUONRootifierComponent()
 {
 }
 
 
 AliHLTMUONRootifierComponent::~AliHLTMUONRootifierComponent()
 {
+       ///
+       /// Default destructor.
+       ///
 }
 
 
 }
 
 
-int AliHLTMUONRootifierComponent::DoInit(int argc, const char** argv)
+int AliHLTMUONRootifierComponent::DoInit(int /*argc*/, const char** /*argv*/)
 {
 {
+       ///
+       /// Inherited from AliHLTComponent.
+       /// Parses the command line parameters and initialises the component.
+       ///
+       
        return 0;
 }
 
 
 int AliHLTMUONRootifierComponent::DoDeinit()
 {
        return 0;
 }
 
 
 int AliHLTMUONRootifierComponent::DoDeinit()
 {
+       ///
+       /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+       ///
+       
        return 0;
 }
 
 
 const char* AliHLTMUONRootifierComponent::GetComponentID()
 {
        return 0;
 }
 
 
 const char* AliHLTMUONRootifierComponent::GetComponentID()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the component ID.
+       ///
+       
        return "MUONRootifier";
 }
 
 
 AliHLTComponentDataType AliHLTMUONRootifierComponent::GetOutputDataType()
 {
        return "MUONRootifier";
 }
 
 
 AliHLTComponentDataType AliHLTMUONRootifierComponent::GetOutputDataType()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the output data type.
+       ///
+       
        return kAliHLTAnyDataType;
 }
 
        return kAliHLTAnyDataType;
 }
 
@@ -83,6 +98,10 @@ void AliHLTMUONRootifierComponent::GetInputDataTypes(
                vector<AliHLTComponentDataType>& list
        )
 {
                vector<AliHLTComponentDataType>& list
        )
 {
+       ///
+       /// Inherited from AliHLTProcessor. Returns the list of expected input data types.
+       ///
+       
        list.push_back(kAliHLTAnyDataType);
 }
 
        list.push_back(kAliHLTAnyDataType);
 }
 
@@ -91,6 +110,10 @@ void AliHLTMUONRootifierComponent::GetOutputDataSize(
                unsigned long& constBase, double& inputMultiplier
        )
 {
                unsigned long& constBase, double& inputMultiplier
        )
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+       ///
+       
        constBase = 1024*1024;
        inputMultiplier = 100;
 }
        constBase = 1024*1024;
        inputMultiplier = 100;
 }
@@ -98,15 +121,23 @@ void AliHLTMUONRootifierComponent::GetOutputDataSize(
 
 AliHLTComponent* AliHLTMUONRootifierComponent::Spawn()
 {
 
 AliHLTComponent* AliHLTMUONRootifierComponent::Spawn()
 {
+       ///
+       /// Inherited from AliHLTComponent. Creates a new object instance.
+       ///
+       
        return new AliHLTMUONRootifierComponent();
 }
 
 
 int AliHLTMUONRootifierComponent::DoEvent(
                const AliHLTComponentEventData& evtData,
        return new AliHLTMUONRootifierComponent();
 }
 
 
 int AliHLTMUONRootifierComponent::DoEvent(
                const AliHLTComponentEventData& evtData,
-               AliHLTComponentTriggerData& trigData
+               AliHLTComponentTriggerData& /*trigData*/
        )
 {
        )
 {
+       ///
+       /// Inherited from AliHLTProcessor. Processes the new event data.
+       ///
+       
        AliHLTMUONEvent event(evtData.fEventID);
 
        // First process the blocks of reconstructed hits and trigger records.
        AliHLTMUONEvent event(evtData.fEventID);
 
        // First process the blocks of reconstructed hits and trigger records.
@@ -421,3 +452,16 @@ int AliHLTMUONRootifierComponent::DoEvent(
        
        return 0;
 }
        
        return 0;
 }
+
+
+void AliHLTMUONEvent::Print(Option_t* option) const
+{
+       ///
+       /// Inherited from TObject. Prints the contents of the event objects in fArray.
+       ///
+       
+       cout << "################## EVENT: " << fEventId << " ##################" << endl;
+       for (Int_t i = 0; i < fArray.GetEntriesFast(); i++)
+               if (fArray[i] != NULL) fArray[i]->Print(option);
+}
+
index 790a9032dfdd41128fa30a535e6033e3701f01a9..ad44ee4d6240182ee290080603ab4be198954379 100644 (file)
@@ -17,6 +17,7 @@
 
 // Temporary solution for grouping together objects for the same event.
 #include "TObjArray.h"
 
 // Temporary solution for grouping together objects for the same event.
 #include "TObjArray.h"
+
 class AliHLTMUONEvent : public TObject
 {
 public:
 class AliHLTMUONEvent : public TObject
 {
 public:
@@ -35,17 +36,12 @@ public:
        // Takes ownership of the object.
        void Add(TObject* obj) { fArray.Add(obj); }
        
        // Takes ownership of the object.
        void Add(TObject* obj) { fArray.Add(obj); }
        
-       virtual void Print(Option_t* option = NULL) const
-       {
-               cout << "################## EVENT: " << fEventId << " ##################" << endl;
-               for (Int_t i = 0; i < fArray.GetEntriesFast(); i++)
-                       if (fArray[i] != NULL) fArray[i]->Print(option);
-       }
+       virtual void Print(Option_t* option = NULL) const;
 
 private:
 
 
 private:
 
-       AliHLTEventID_t fEventId;
-       TObjArray fArray;
+       AliHLTEventID_t fEventId;  // The event ID.
+       TObjArray fArray;          // Array of event objects.
        
        ClassDef(AliHLTMUONEvent, 1); // Container class for dHLT event results.
 };
        
        ClassDef(AliHLTMUONEvent, 1); // Container class for dHLT event results.
 };
@@ -61,8 +57,6 @@ public:
        AliHLTMUONRootifierComponent();
        virtual ~AliHLTMUONRootifierComponent();
        
        AliHLTMUONRootifierComponent();
        virtual ~AliHLTMUONRootifierComponent();
        
-       int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
-       
        virtual const char* GetComponentID();
 
        virtual void GetInputDataTypes(vector<AliHLTComponentDataType>& list);
        virtual const char* GetComponentID();
 
        virtual void GetInputDataTypes(vector<AliHLTComponentDataType>& list);
@@ -76,6 +70,8 @@ protected:
 
        virtual int DoInit(int argc, const char** argv);
        virtual int DoDeinit();
 
        virtual int DoInit(int argc, const char** argv);
        virtual int DoDeinit();
+       virtual int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+       using AliHLTProcessor::DoEvent;
        
 private:
 
        
 private:
 
index ba4906c9eaf8e626b2612afb24c6b05774f8aa58..7a6e9ed61d38e7bfa9267f72fe9a9c0f39b7c2e5 100644 (file)
@@ -51,9 +51,6 @@
 
 namespace
 {
 
 namespace
 {
-       // The global object used for automatic component registration.
-       // Note DO NOT use this component for calculation!
-       AliHLTMUONTriggerRecordsSource gAliHLTMUONTriggerRecordsSource;
        
        //TODO: The following method should be in MUON/mapping
        Int_t FindDDLOfDetElement(Int_t detElemId)
        
        //TODO: The following method should be in MUON/mapping
        Int_t FindDDLOfDetElement(Int_t detElemId)
@@ -94,13 +91,20 @@ AliHLTMUONTriggerRecordsSource::AliHLTMUONTriggerRecordsSource() :
        fDataInterface(NULL),
        fBuildFromHits(false),
        fSelection(kWholePlane),
        fDataInterface(NULL),
        fBuildFromHits(false),
        fSelection(kWholePlane),
-       fCurrentEvent(0)
+       fCurrentEventIndex(0)
 {
 {
+       ///
+       /// Default constructor.
+       ///
 }
 
 
 AliHLTMUONTriggerRecordsSource::~AliHLTMUONTriggerRecordsSource()
 {
 }
 
 
 AliHLTMUONTriggerRecordsSource::~AliHLTMUONTriggerRecordsSource()
 {
+       ///
+       /// Default destructor.
+       ///
+       
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
 }
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
 }
@@ -108,6 +112,11 @@ AliHLTMUONTriggerRecordsSource::~AliHLTMUONTriggerRecordsSource()
 
 int AliHLTMUONTriggerRecordsSource::DoInit(int argc, const char** argv)
 {
 
 int AliHLTMUONTriggerRecordsSource::DoInit(int argc, const char** argv)
 {
+       ///
+       /// Inherited from AliHLTComponent.
+       /// Parses the command line parameters and initialises the component.
+       ///
+       
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
        
        assert( fMCDataInterface == NULL );
        assert( fDataInterface == NULL );
        
@@ -115,7 +124,7 @@ int AliHLTMUONTriggerRecordsSource::DoInit(int argc, const char** argv)
        bool hitdata = false;
        bool simdata = false;
        bool recdata = false;
        bool hitdata = false;
        bool simdata = false;
        bool recdata = false;
-       fCurrentEvent = 0;
+       fCurrentEventIndex = 0;
        bool firstEventSet = false;
        bool eventNumLitSet = false;
        
        bool firstEventSet = false;
        bool eventNumLitSet = false;
        
@@ -187,7 +196,7 @@ int AliHLTMUONTriggerRecordsSource::DoInit(int argc, const char** argv)
                                ));
                                return EINVAL;
                        }
                                ));
                                return EINVAL;
                        }
-                       fCurrentEvent = Int_t(num);
+                       fCurrentEventIndex = Int_t(num);
                        firstEventSet = true;
                }
                else if (strcmp(argv[i], "-event_number_literal") == 0)
                        firstEventSet = true;
                }
                else if (strcmp(argv[i], "-event_number_literal") == 0)
@@ -198,7 +207,7 @@ int AliHLTMUONTriggerRecordsSource::DoInit(int argc, const char** argv)
                                        " override -firstevent."
                                );
                        }
                                        " override -firstevent."
                                );
                        }
-                       fCurrentEvent = -1;
+                       fCurrentEventIndex = -1;
                        eventNumLitSet = true;
                }
                else
                        eventNumLitSet = true;
                }
                else
@@ -283,18 +292,18 @@ int AliHLTMUONTriggerRecordsSource::DoInit(int argc, const char** argv)
                }
        }
        
                }
        }
        
-       // Check that the fCurrentEvent number falls within the correct range.
+       // Check that the fCurrentEventIndex number falls within the correct range.
        UInt_t maxevent = 0;
        if (fMCDataInterface != NULL)
                maxevent = UInt_t(fMCDataInterface->NumberOfEvents());
        else if (fDataInterface != NULL)
                maxevent = UInt_t(fDataInterface->NumberOfEvents());
        UInt_t maxevent = 0;
        if (fMCDataInterface != NULL)
                maxevent = UInt_t(fMCDataInterface->NumberOfEvents());
        else if (fDataInterface != NULL)
                maxevent = UInt_t(fDataInterface->NumberOfEvents());
-       if (fCurrentEvent != -1 and UInt_t(fCurrentEvent) >= maxevent and maxevent != 0)
+       if (fCurrentEventIndex != -1 and UInt_t(fCurrentEventIndex) >= maxevent and maxevent != 0)
        {
        {
-               fCurrentEvent = 0;
+               fCurrentEventIndex = 0;
                HLTWarning(Form("The selected first event number (%d) was larger than"
                        " the available number of events (%d). Resetting the event"
                HLTWarning(Form("The selected first event number (%d) was larger than"
                        " the available number of events (%d). Resetting the event"
-                       " counter to zero.", fCurrentEvent, maxevent
+                       " counter to zero.", fCurrentEventIndex, maxevent
                ));
        }
        
                ));
        }
        
@@ -304,6 +313,10 @@ int AliHLTMUONTriggerRecordsSource::DoInit(int argc, const char** argv)
 
 int AliHLTMUONTriggerRecordsSource::DoDeinit()
 {
 
 int AliHLTMUONTriggerRecordsSource::DoDeinit()
 {
+       ///
+       /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+       ///
+       
        if (fMCDataInterface != NULL)
        {
                delete fMCDataInterface;
        if (fMCDataInterface != NULL)
        {
                delete fMCDataInterface;
@@ -320,12 +333,20 @@ int AliHLTMUONTriggerRecordsSource::DoDeinit()
 
 const char* AliHLTMUONTriggerRecordsSource::GetComponentID()
 {
 
 const char* AliHLTMUONTriggerRecordsSource::GetComponentID()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the component ID.
+       ///
+       
        return AliHLTMUONConstants::TriggerRecordsSourceId();
 }
 
 
 AliHLTComponentDataType AliHLTMUONTriggerRecordsSource::GetOutputDataType()
 {
        return AliHLTMUONConstants::TriggerRecordsSourceId();
 }
 
 
 AliHLTComponentDataType AliHLTMUONTriggerRecordsSource::GetOutputDataType()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the output data type.
+       ///
+       
        return AliHLTMUONConstants::TriggerRecordsBlockDataType();
 }
 
        return AliHLTMUONConstants::TriggerRecordsBlockDataType();
 }
 
@@ -334,6 +355,10 @@ void AliHLTMUONTriggerRecordsSource::GetOutputDataSize(
                unsigned long& constBase, double& inputMultiplier
        )
 {
                unsigned long& constBase, double& inputMultiplier
        )
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+       ///
+       
        constBase = sizeof(AliHLTMUONTriggerRecordsBlockStruct) +
                sizeof(AliHLTMUONTriggerRecordStruct) * AliMUONConstants::NTriggerCircuit();
        inputMultiplier = 0;
        constBase = sizeof(AliHLTMUONTriggerRecordsBlockStruct) +
                sizeof(AliHLTMUONTriggerRecordStruct) * AliMUONConstants::NTriggerCircuit();
        inputMultiplier = 0;
@@ -342,6 +367,10 @@ void AliHLTMUONTriggerRecordsSource::GetOutputDataSize(
 
 AliHLTComponent* AliHLTMUONTriggerRecordsSource::Spawn()
 {
 
 AliHLTComponent* AliHLTMUONTriggerRecordsSource::Spawn()
 {
+       ///
+       /// Inherited from AliHLTComponent. Creates a new object instance.
+       ///
+       
        return new AliHLTMUONTriggerRecordsSource();
 }
 
        return new AliHLTMUONTriggerRecordsSource();
 }
 
@@ -354,6 +383,10 @@ int AliHLTMUONTriggerRecordsSource::GetEvent(
                vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
                vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
+       ///
+       /// Inherited from AliHLTOfflineDataSource. Creates new event data blocks.
+       ///
+       
        assert( fMCDataInterface != NULL or fDataInterface != NULL );
 
        AliHLTInt32_t trigRecId = 0;
        assert( fMCDataInterface != NULL or fDataInterface != NULL );
 
        AliHLTInt32_t trigRecId = 0;
@@ -374,20 +407,20 @@ int AliHLTMUONTriggerRecordsSource::GetEvent(
                return EINVAL;
        }
        
                return EINVAL;
        }
        
-       // Use the fEventID as the event number to load if fCurrentEvent == -1,
+       // Use the fEventID as the event number to load if fCurrentEventIndex == -1,
        // check it and load that event with the runloader.
        // check it and load that event with the runloader.
-       // If fCurrentEvent is a positive number then us it instead and
+       // If fCurrentEventIndex is a positive number then us it instead and
        // increment it.
        UInt_t eventnumber = UInt_t(evtData.fEventID);
        UInt_t maxevent = fMCDataInterface != NULL ?
                UInt_t(fMCDataInterface->NumberOfEvents())
                : UInt_t(fDataInterface->NumberOfEvents());
        // increment it.
        UInt_t eventnumber = UInt_t(evtData.fEventID);
        UInt_t maxevent = fMCDataInterface != NULL ?
                UInt_t(fMCDataInterface->NumberOfEvents())
                : UInt_t(fDataInterface->NumberOfEvents());
-       if (fCurrentEvent != -1)
+       if (fCurrentEventIndex != -1)
        {
        {
-               eventnumber = UInt_t(fCurrentEvent);
-               fCurrentEvent++;
-               if (UInt_t(fCurrentEvent) >= maxevent)
-                       fCurrentEvent = 0;
+               eventnumber = UInt_t(fCurrentEventIndex);
+               fCurrentEventIndex++;
+               if (UInt_t(fCurrentEventIndex) >= maxevent)
+                       fCurrentEventIndex = 0;
        }
        if ( eventnumber >= maxevent )
        {
        }
        if ( eventnumber >= maxevent )
        {
index 576a63ac60c11397b781a5ce81ef9d35d7125ff5..d3d09bfbd85a5c3c1a078e67b077f74cfdd72f2f 100644 (file)
@@ -67,14 +67,6 @@ public:
        AliHLTMUONTriggerRecordsSource();
        virtual ~AliHLTMUONTriggerRecordsSource();
        
        AliHLTMUONTriggerRecordsSource();
        virtual ~AliHLTMUONTriggerRecordsSource();
        
-       virtual int GetEvent(
-                       const AliHLTComponentEventData& evtData,
-                       AliHLTComponentTriggerData& trigData,
-                       AliHLTUInt8_t* outputPtr, 
-                       AliHLTUInt32_t& size,
-                       vector<AliHLTComponentBlockData>& outputBlocks
-               );
-       
        virtual const char* GetComponentID();
 
        virtual AliHLTComponentDataType GetOutputDataType();
        virtual const char* GetComponentID();
 
        virtual AliHLTComponentDataType GetOutputDataType();
@@ -88,6 +80,16 @@ protected:
        virtual int DoInit(int argc, const char** argv);
        virtual int DoDeinit();
        
        virtual int DoInit(int argc, const char** argv);
        virtual int DoDeinit();
        
+       virtual int GetEvent(
+                       const AliHLTComponentEventData& evtData,
+                       AliHLTComponentTriggerData& trigData,
+                       AliHLTUInt8_t* outputPtr, 
+                       AliHLTUInt32_t& size,
+                       vector<AliHLTComponentBlockData>& outputBlocks
+               );
+       
+       using AliHLTOfflineDataSource::GetEvent;
+       
 private:
 
        // Prevent copying of these objects.
 private:
 
        // Prevent copying of these objects.
@@ -107,9 +109,9 @@ private:
 
        SelectionType fSelection; //! Indicates if we should publish from the left, right or whole XY plane.
        
 
        SelectionType fSelection; //! Indicates if we should publish from the left, right or whole XY plane.
        
-       Int_t fCurrentEvent;  //! The current event index that is loaded.
-                             //  -1 indicates that we should rather use the event
-                             // numbers as given by the system.
+       Int_t fCurrentEventIndex;  //! The current event index that is loaded.
+                                  //  -1 indicates that we should rather use the event
+                                  // numbers as given by the system.
        
        ClassDef(AliHLTMUONTriggerRecordsSource, 0); // dHLT data source for trigger record data blocks.
 };
        
        ClassDef(AliHLTMUONTriggerRecordsSource, 0); // dHLT data source for trigger record data blocks.
 };
index 5a0e028e8f8d47289e01078b081bc725f814a5ed..2506c8bcad56872876ca8880a0d292e9dd2cc3dc 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-///*
-//
-//  The HitRec Component is designed to deal the rawdata inputfiles to findout the 
-//  the reconstructed hits. The output is send to the output block for further 
-//  processing.
-//
-//  Author : Indranil Das ( indra.das@saha.ac.in || indra.ehep@gmail.com )
-// 
-//*/
+///
+///
+///  The HitRec Component is designed to deal the rawdata inputfiles to findout the 
+///  the reconstructed hits. The output is send to the output block for further 
+///  processing.
+///
+///  Author : Indranil Das ( indra.das@saha.ac.in || indra.ehep@gmail.com )
+///
 
 #include "AliHLTMUONRecHitsBlockStruct.h"
 #include "AliHLTMUONHitReconstructorComponent.h"
 
 #include "AliHLTMUONRecHitsBlockStruct.h"
 #include "AliHLTMUONHitReconstructorComponent.h"
 #include <cerrno>
 #include <cassert>
 
 #include <cerrno>
 #include <cassert>
 
-namespace
-{
-       // The global object used for automatic component registration, 
-       // Note DO NOT use this component for calculation!
-       AliHLTMUONHitReconstructorComponent gAliHLTMUONHitReconstructorComponent;
-}
-
 ClassImp(AliHLTMUONHitReconstructorComponent)
 
 
 AliHLTMUONHitReconstructorComponent::AliHLTMUONHitReconstructorComponent() :
 ClassImp(AliHLTMUONHitReconstructorComponent)
 
 
 AliHLTMUONHitReconstructorComponent::AliHLTMUONHitReconstructorComponent() :
+       AliHLTProcessor(),
        fHitRec(NULL),
        fDDLDir(""),
        fDDL(0),
        fReaderType(false),
        fWarnForUnexpecedBlock(false)
 {
        fHitRec(NULL),
        fDDLDir(""),
        fDDL(0),
        fReaderType(false),
        fWarnForUnexpecedBlock(false)
 {
+       ///
+       /// Default constructor.
+       ///
 }
 
 
 AliHLTMUONHitReconstructorComponent::~AliHLTMUONHitReconstructorComponent()
 {
 }
 
 
 AliHLTMUONHitReconstructorComponent::~AliHLTMUONHitReconstructorComponent()
 {
+       ///
+       /// Default destructor.
+       ///
 }
 
 const char* AliHLTMUONHitReconstructorComponent::GetComponentID()
 {
 }
 
 const char* AliHLTMUONHitReconstructorComponent::GetComponentID()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the component ID.
+       ///
+       
        return AliHLTMUONConstants::HitReconstructorId();
 }
 
 
 void AliHLTMUONHitReconstructorComponent::GetInputDataTypes( std::vector<AliHLTComponentDataType>& list)
 {
        return AliHLTMUONConstants::HitReconstructorId();
 }
 
 
 void AliHLTMUONHitReconstructorComponent::GetInputDataTypes( std::vector<AliHLTComponentDataType>& list)
 {
+       ///
+       /// Inherited from AliHLTProcessor. Returns the list of expected input data types.
+       ///
+       
        list.clear();
        list.push_back( AliHLTMUONConstants::TrackingDDLRawDataType() );
 }
        list.clear();
        list.push_back( AliHLTMUONConstants::TrackingDDLRawDataType() );
 }
@@ -77,26 +84,42 @@ void AliHLTMUONHitReconstructorComponent::GetInputDataTypes( std::vector<AliHLTC
 
 AliHLTComponentDataType AliHLTMUONHitReconstructorComponent::GetOutputDataType()
 {
 
 AliHLTComponentDataType AliHLTMUONHitReconstructorComponent::GetOutputDataType()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the output data type.
+       ///
+       
        return AliHLTMUONConstants::RecHitsBlockDataType();
 }
 
 
 void AliHLTMUONHitReconstructorComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
 {
        return AliHLTMUONConstants::RecHitsBlockDataType();
 }
 
 
 void AliHLTMUONHitReconstructorComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+       ///
+       
        constBase = sizeof(AliHLTMUONRecHitsBlockWriter::HeaderType);
        inputMultiplier = 1;
 }
 
 
        constBase = sizeof(AliHLTMUONRecHitsBlockWriter::HeaderType);
        inputMultiplier = 1;
 }
 
 
-// Spawn function, return new instance of this class
 AliHLTComponent* AliHLTMUONHitReconstructorComponent::Spawn()
 {
 AliHLTComponent* AliHLTMUONHitReconstructorComponent::Spawn()
 {
+       ///
+       /// Inherited from AliHLTComponent. Creates a new object instance.
+       ///
+       
        return new AliHLTMUONHitReconstructorComponent;
 }
 
 
 int AliHLTMUONHitReconstructorComponent::DoInit(int argc, const char** argv)
 {
        return new AliHLTMUONHitReconstructorComponent;
 }
 
 
 int AliHLTMUONHitReconstructorComponent::DoInit(int argc, const char** argv)
 {
+       ///
+       /// Inherited from AliHLTComponent.
+       /// Parses the command line parameters and initialises the component.
+       ///
+       
   // perform initialization. We check whether our relative output size is specified in the arguments.
      
   HLTInfo("Initialising DHLT HitReconstruction Component");
   // perform initialization. We check whether our relative output size is specified in the arguments.
      
   HLTInfo("Initialising DHLT HitReconstruction Component");
@@ -226,6 +249,10 @@ int AliHLTMUONHitReconstructorComponent::DoInit(int argc, const char** argv)
 
 int AliHLTMUONHitReconstructorComponent::DoDeinit()
 {
 
 int AliHLTMUONHitReconstructorComponent::DoDeinit()
 {
+       ///
+       /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+       ///
+       
   if(fHitRec)
     delete fHitRec;
   
   if(fHitRec)
     delete fHitRec;
   
@@ -244,6 +271,10 @@ int AliHLTMUONHitReconstructorComponent::DoEvent(
                std::vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
                std::vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
+       ///
+       /// Inherited from AliHLTProcessor. Processes the new event data.
+       ///
+       
        // Process an event
        unsigned long totalSize = 0; // Amount of memory currently consumed in bytes.
 
        // Process an event
        unsigned long totalSize = 0; // Amount of memory currently consumed in bytes.
 
@@ -355,6 +386,10 @@ int AliHLTMUONHitReconstructorComponent::DoEvent(
 
 bool AliHLTMUONHitReconstructorComponent::ReadLookUpTable(AliHLTMUONHitReconstructor::DHLTLut* lookupTable, const char* lutpath)
 {
 
 bool AliHLTMUONHitReconstructorComponent::ReadLookUpTable(AliHLTMUONHitReconstructor::DHLTLut* lookupTable, const char* lutpath)
 {
+       ///
+       /// Read in the lookup table from a text file.
+       ///
+       
   if (fDDL < AliHLTMUONHitReconstructor::GetkDDLOffSet() ||
       fDDL >= AliHLTMUONHitReconstructor::GetkDDLOffSet() + AliHLTMUONHitReconstructor::GetkNofDDL()){
     HLTError("DDL number is out of range");
   if (fDDL < AliHLTMUONHitReconstructor::GetkDDLOffSet() ||
       fDDL >= AliHLTMUONHitReconstructor::GetkDDLOffSet() + AliHLTMUONHitReconstructor::GetkNofDDL()){
     HLTError("DDL number is out of range");
@@ -391,6 +426,10 @@ bool AliHLTMUONHitReconstructorComponent::ReadLookUpTable(AliHLTMUONHitReconstru
 
 bool AliHLTMUONHitReconstructorComponent::ReadBusPatchToDetElemFile(BusToDetElem& busToDetElem, BusToDDL& busToDDL, const char* buspatchmappath)
 {
 
 bool AliHLTMUONHitReconstructorComponent::ReadBusPatchToDetElemFile(BusToDetElem& busToDetElem, BusToDDL& busToDDL, const char* buspatchmappath)
 {
+       ///
+       /// Read in the lookup table for bus patch to detector element IDs from a text file.
+       ///
+       
   char getLine[80];
   char temp;
   int detElem, minBusPatch, maxBusPatch, ddl;
   char getLine[80];
   char temp;
   int detElem, minBusPatch, maxBusPatch, ddl;
index 7ea03bc98a66e13152208432f28bac7cb7802177..1f286b472ee61815804b3b61612b2a27b00f6f45 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H
 #ifndef ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H
-#define ALIHLTMUONHITREONSTRUCTORCCOMPONENT_H
+#define ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
  * All rights reserved.                                                   *
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
  * All rights reserved.                                                   *
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-///*  @file   AliHLTMUONHitReconstructorComponent.h
-// *  @author Indranil Das <indra.das@saha.ac.in> | <indra.ehep@gmail.com>
-// *  @date   
-// *  @brief  Hit Reconstruction processing component for the dimuon HLT. 
-// */
+///
+///  @file   AliHLTMUONHitReconstructorComponent.h
+///  @author Indranil Das <indra.das@saha.ac.in> | <indra.ehep@gmail.com>
+///  @date   
+///  @brief  Hit Reconstruction processing component for the dimuon HLT. 
+///
 
 #include "AliHLTProcessor.h"
 #include <TString.h>
 
 #include "AliHLTProcessor.h"
 #include <TString.h>
@@ -42,11 +43,11 @@ class AliHLTMUONHitReconstructorComponent : public AliHLTProcessor
        // 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(std::vector<AliHLTComponentDataType>& list);
-       AliHLTComponentDataType GetOutputDataType();
+       virtual const char* GetComponentID();
+       virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list);
+       virtual AliHLTComponentDataType GetOutputDataType();
        virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
        virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
-       AliHLTComponent* Spawn();
+       virtual AliHLTComponent* Spawn();
        
     protected:
        
        
     protected:
        
@@ -54,9 +55,9 @@ class AliHLTMUONHitReconstructorComponent : public AliHLTProcessor
        // These functions provide initialization as well as the actual processing
        // capabilities of the component. 
 
        // 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(
+       virtual int DoInit(int argc, const char** argv);
+       virtual int DoDeinit();
+       virtual int DoEvent(
                        const AliHLTComponentEventData& evtData,
                        const AliHLTComponentBlockData* blocks,
                        AliHLTComponentTriggerData& trigData,
                        const AliHLTComponentEventData& evtData,
                        const AliHLTComponentBlockData* blocks,
                        AliHLTComponentTriggerData& trigData,
@@ -65,15 +66,21 @@ class AliHLTMUONHitReconstructorComponent : public AliHLTProcessor
                        std::vector<AliHLTComponentBlockData>& outputBlocks
                );
        
                        std::vector<AliHLTComponentBlockData>& outputBlocks
                );
        
+       using AliHLTProcessor::DoEvent;
+       
     private:
     private:
+
+       // Do not allow copying of this class.
+       AliHLTMUONHitReconstructorComponent(const AliHLTMUONHitReconstructorComponent& /*obj*/);
+       AliHLTMUONHitReconstructorComponent& operator = (const AliHLTMUONHitReconstructorComponent& /*obj*/);
        
        
-       AliHLTMUONHitReconstructor* fHitRec;
+       AliHLTMUONHitReconstructor* fHitRec;   // Internal class instance implementing the hit reconstruction algorithm.
        bool ReadLookUpTable(AliHLTMUONHitReconstructor::DHLTLut* lookupTable, const char* lutpath);
        bool ReadBusPatchToDetElemFile(BusToDetElem& busToDetElem, BusToDDL& busToDDL, const char* buspatchmappath);
 
        bool ReadLookUpTable(AliHLTMUONHitReconstructor::DHLTLut* lookupTable, const char* lutpath);
        bool ReadBusPatchToDetElemFile(BusToDetElem& busToDetElem, BusToDDL& busToDDL, const char* buspatchmappath);
 
-       TString fDDLDir;
-       Int_t fDDL;
-       bool fReaderType;
+       TString fDDLDir;   //TODO: Deprecated, should be removed.
+       Int_t fDDL;        // DDL number in the range [12..19].
+       bool fReaderType;  //TODO: Deprecated, should be removed.
        bool fWarnForUnexpecedBlock;  // Flag indicating if we should log a warning if we got a block of an unexpected type.
 
        ClassDef(AliHLTMUONHitReconstructorComponent, 0)
        bool fWarnForUnexpecedBlock;  // Flag indicating if we should log a warning if we got a block of an unexpected type.
 
        ClassDef(AliHLTMUONHitReconstructorComponent, 0)
index 1a75b966a23ec4cb370d4ffbcfb6d74d88d239bd..bb0a250051f7ccd4d1eb86fd15d9816f8c61dc08 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- *  @file   AliHLTMUONMansoTrackerFSMComponent.cxx
- *  @author Artur Szostak <artursz@iafrica.com>,
- *          Indranil Das <indra.das@saha.ac.in>
- *  @date   
- *  @brief  Implementation of AliHLTMUONMansoTrackerFSMComponent class.
- */
+///
+///  @file   AliHLTMUONMansoTrackerFSMComponent.cxx
+///  @author Artur Szostak <artursz@iafrica.com>,
+///          Indranil Das <indra.das@saha.ac.in>
+///  @date   
+///  @brief  Implementation of AliHLTMUONMansoTrackerFSMComponent class.
+///
 
 #include "AliHLTMUONMansoTrackerFSMComponent.h"
 #include "AliHLTMUONConstants.h"
 
 #include "AliHLTMUONMansoTrackerFSMComponent.h"
 #include "AliHLTMUONConstants.h"
 #include <cstring>
 #include <cerrno>
 
 #include <cstring>
 #include <cerrno>
 
-namespace
-{
-       // The global object used for automatic component registration.
-       // Note DO NOT use this component for calculation!
-       AliHLTMUONMansoTrackerFSMComponent gAliHLTMUONMansoTrackerFSMComponent;
-
-} // end of namespace
-
-
 ClassImp(AliHLTMUONMansoTrackerFSMComponent);
 
 
 ClassImp(AliHLTMUONMansoTrackerFSMComponent);
 
 
@@ -55,17 +46,28 @@ AliHLTMUONMansoTrackerFSMComponent::AliHLTMUONMansoTrackerFSMComponent() :
        fBlock(NULL),
        fWarnForUnexpecedBlock(false)
 {
        fBlock(NULL),
        fWarnForUnexpecedBlock(false)
 {
+       ///
+       /// Default constructor.
+       ///
 }
 
 
 AliHLTMUONMansoTrackerFSMComponent::~AliHLTMUONMansoTrackerFSMComponent()
 {
 }
 
 
 AliHLTMUONMansoTrackerFSMComponent::~AliHLTMUONMansoTrackerFSMComponent()
 {
+       ///
+       /// Default destructor.
+       ///
+       
        assert( fTracker == NULL );
 }
 
 
 const char* AliHLTMUONMansoTrackerFSMComponent::GetComponentID()
 {
        assert( fTracker == NULL );
 }
 
 
 const char* AliHLTMUONMansoTrackerFSMComponent::GetComponentID()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the component ID.
+       ///
+       
        return AliHLTMUONConstants::MansoTrackerFSMId();
 }
 
        return AliHLTMUONConstants::MansoTrackerFSMId();
 }
 
@@ -74,6 +76,10 @@ void AliHLTMUONMansoTrackerFSMComponent::GetInputDataTypes(
                vector<AliHLTComponentDataType>& list
        )
 {
                vector<AliHLTComponentDataType>& list
        )
 {
+       ///
+       /// Inherited from AliHLTProcessor. Returns the list of expected input data types.
+       ///
+       
        assert( list.empty() );
        list.push_back( AliHLTMUONConstants::TriggerRecordsBlockDataType() );
        list.push_back( AliHLTMUONConstants::RecHitsBlockDataType() );
        assert( list.empty() );
        list.push_back( AliHLTMUONConstants::TriggerRecordsBlockDataType() );
        list.push_back( AliHLTMUONConstants::RecHitsBlockDataType() );
@@ -82,6 +88,10 @@ void AliHLTMUONMansoTrackerFSMComponent::GetInputDataTypes(
 
 AliHLTComponentDataType AliHLTMUONMansoTrackerFSMComponent::GetOutputDataType()
 {
 
 AliHLTComponentDataType AliHLTMUONMansoTrackerFSMComponent::GetOutputDataType()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the output data type.
+       ///
+       
        return AliHLTMUONConstants::MansoTracksBlockDataType();
 }
 
        return AliHLTMUONConstants::MansoTracksBlockDataType();
 }
 
@@ -90,6 +100,10 @@ void AliHLTMUONMansoTrackerFSMComponent::GetOutputDataSize(
                unsigned long& constBase, double& inputMultiplier
        )
 {
                unsigned long& constBase, double& inputMultiplier
        )
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+       ///
+       
        constBase = sizeof(AliHLTMUONMansoTracksBlockStruct);
        inputMultiplier = 1;
 }
        constBase = sizeof(AliHLTMUONMansoTracksBlockStruct);
        inputMultiplier = 1;
 }
@@ -97,12 +111,21 @@ void AliHLTMUONMansoTrackerFSMComponent::GetOutputDataSize(
 
 AliHLTComponent* AliHLTMUONMansoTrackerFSMComponent::Spawn()
 {
 
 AliHLTComponent* AliHLTMUONMansoTrackerFSMComponent::Spawn()
 {
+       ///
+       /// Inherited from AliHLTComponent. Creates a new object instance.
+       ///
+       
        return new AliHLTMUONMansoTrackerFSMComponent;
 }
 
 
 int AliHLTMUONMansoTrackerFSMComponent::DoInit(int argc, const char** argv)
 {
        return new AliHLTMUONMansoTrackerFSMComponent;
 }
 
 
 int AliHLTMUONMansoTrackerFSMComponent::DoInit(int argc, const char** argv)
 {
+       ///
+       /// Inherited from AliHLTComponent.
+       /// Parses the command line parameters and initialises the component.
+       ///
+       
        fTracker = new AliHLTMUONMansoTrackerFSM();
        fTracker->SetCallback(this);
        
        fTracker = new AliHLTMUONMansoTrackerFSM();
        fTracker->SetCallback(this);
        
@@ -120,6 +143,10 @@ int AliHLTMUONMansoTrackerFSMComponent::DoInit(int argc, const char** argv)
 
 int AliHLTMUONMansoTrackerFSMComponent::DoDeinit()
 {
 
 int AliHLTMUONMansoTrackerFSMComponent::DoDeinit()
 {
+       ///
+       /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+       ///
+       
        if (fTracker != NULL)
        {
                delete fTracker;
        if (fTracker != NULL)
        {
                delete fTracker;
@@ -138,6 +165,10 @@ int AliHLTMUONMansoTrackerFSMComponent::DoEvent(
                std::vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
                std::vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
+       ///
+       /// Inherited from AliHLTProcessor. Processes the new event data.
+       ///
+       
        Reset();
        AliHLTUInt32_t specification = 0;  // Contains the output data block spec bits.
        
        Reset();
        AliHLTUInt32_t specification = 0;  // Contains the output data block spec bits.
        
@@ -303,6 +334,10 @@ int AliHLTMUONMansoTrackerFSMComponent::DoEvent(
 
 void AliHLTMUONMansoTrackerFSMComponent::Reset()
 {
 
 void AliHLTMUONMansoTrackerFSMComponent::Reset()
 {
+       ///
+       /// Reset the track count and reconstructed hit data block arrays.
+       ///
+       
        DebugTrace("Resetting AliHLTMUONMansoTrackerFSMComponent.");
 
        //fTracker->Reset();  // Not necessary here because it is done after every FindTrack call.
        DebugTrace("Resetting AliHLTMUONMansoTrackerFSMComponent.");
 
        //fTracker->Reset();  // Not necessary here because it is done after every FindTrack call.
@@ -316,11 +351,18 @@ void AliHLTMUONMansoTrackerFSMComponent::Reset()
 
 
 void AliHLTMUONMansoTrackerFSMComponent::AddRecHits(
 
 
 void AliHLTMUONMansoTrackerFSMComponent::AddRecHits(
-               AliHLTUInt32_t specification,   
+               AliHLTUInt32_t specification,
                const AliHLTMUONRecHitStruct* recHits,
                AliHLTUInt32_t count
        )
 {
                const AliHLTMUONRecHitStruct* recHits,
                AliHLTUInt32_t count
        )
 {
+       ///
+       /// Adds a new reconstructed hit data block to the internal list of blocks
+       /// for the tracker to process.
+       /// These lists will later be used when the tracker requests them through
+       /// the callback method 'RequestClusters'.
+       ///
+       
        DebugTrace("AliHLTMUONMansoTrackerFSMComponent::AddRecHits called with specification = 0x"
                 << std::hex << specification << std::dec << " and count = "
                 << count << " rec hits."
        DebugTrace("AliHLTMUONMansoTrackerFSMComponent::AddRecHits called with specification = 0x"
                 << std::hex << specification << std::dec << " and count = "
                 << count << " rec hits."
@@ -396,6 +438,12 @@ void AliHLTMUONMansoTrackerFSMComponent::RequestClusters(
                AliHLTMUONChamberName chamber, const void* tag
        )
 {
                AliHLTMUONChamberName chamber, const void* tag
        )
 {
+       ///
+       /// Inherited from AliHLTMUONMansoTrackerFSMCallback.
+       /// This is the call back method used by the tracker algorithm to request
+       /// clusters on a certain chamber.
+       ///
+
        DebugTrace("AliHLTMUONMansoTracker::RequestClusters(chamber = " << chamber << ")");
        void* ctag = const_cast<void*>(tag);
        int chNo = -1;
        DebugTrace("AliHLTMUONMansoTracker::RequestClusters(chamber = " << chamber << ")");
        void* ctag = const_cast<void*>(tag);
        int chNo = -1;
@@ -442,12 +490,23 @@ void AliHLTMUONMansoTrackerFSMComponent::EndOfClusterRequests(
                AliHLTMUONMansoTrackerFSM* /*tracker*/
        )
 {
                AliHLTMUONMansoTrackerFSM* /*tracker*/
        )
 {
+       ///
+       /// Inherited from AliHLTMUONMansoTrackerFSMCallback.
+       /// Nothing special to do here.
+       ///
+       
        DebugTrace("End of cluster requests.");
 }
 
 
 void AliHLTMUONMansoTrackerFSMComponent::FoundTrack(AliHLTMUONMansoTrackerFSM* tracker)
 {
        DebugTrace("End of cluster requests.");
 }
 
 
 void AliHLTMUONMansoTrackerFSMComponent::FoundTrack(AliHLTMUONMansoTrackerFSM* tracker)
 {
+       ///
+       /// Inherited from AliHLTMUONMansoTrackerFSMCallback.
+       /// This is the call back method used by the tracker algorithm to declare
+       /// that a new track has been found.
+       ///
+       
        DebugTrace("AliHLTMUONMansoTrackerFSMComponent::FoundTrack()");
        
        AliHLTMUONMansoTracksBlockWriter* block =
        DebugTrace("AliHLTMUONMansoTrackerFSMComponent::FoundTrack()");
        
        AliHLTMUONMansoTracksBlockWriter* block =
@@ -474,5 +533,11 @@ void AliHLTMUONMansoTrackerFSMComponent::FoundTrack(AliHLTMUONMansoTrackerFSM* t
 
 void AliHLTMUONMansoTrackerFSMComponent::NoTrackFound(AliHLTMUONMansoTrackerFSM* /*tracker*/)
 {
 
 void AliHLTMUONMansoTrackerFSMComponent::NoTrackFound(AliHLTMUONMansoTrackerFSM* /*tracker*/)
 {
+       ///
+       /// Inherited from AliHLTMUONMansoTrackerFSMCallback.
+       /// Nothing special to do here.
+       ///
+       
        DebugTrace("No track found.");
 }
        DebugTrace("No track found.");
 }
+
index 2c6b5eba9ea20d07344c940149cf97ae96d742b6..c307baa58c5c3d0337d08d55f167d241efeaf0d4 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- *  @file   AliHLTMUONMansoTrackerFSMComponent.h
- *  @author Artur Szostak <artursz@iafrica.com>,
- *          Indranil Das <indra.das@saha.ac.in>
- *  @date   
- *  @brief  Tracker component for the dimuon HLT using the Manso algorithm
- *          implemented as a finite state machine.
- */
+///
+///  @file   AliHLTMUONMansoTrackerFSMComponent.h
+///  @author Artur Szostak <artursz@iafrica.com>,
+///          Indranil Das <indra.das@saha.ac.in>
+///  @date   
+///  @brief  Tracker component for the dimuon HLT using the Manso algorithm
+///          implemented as a finite state machine.
+///
 
 #include "AliHLTProcessor.h"
 #include "AliHLTMUONDataTypes.h"
 
 #include "AliHLTProcessor.h"
 #include "AliHLTMUONDataTypes.h"
@@ -80,9 +80,9 @@ protected:
        // Protected functions to implement the AliHLTProcessor interface.
        // These functions provide initialization as well as the actual processing
        // capabilities of the component. 
        // Protected functions to implement the AliHLTProcessor 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(
+       virtual int DoInit(int argc, const char** argv);
+       virtual int DoDeinit();
+       virtual int DoEvent(
                        const AliHLTComponentEventData& evtData,
                        const AliHLTComponentBlockData* blocks,
                        AliHLTComponentTriggerData& trigData,
                        const AliHLTComponentEventData& evtData,
                        const AliHLTComponentBlockData* blocks,
                        AliHLTComponentTriggerData& trigData,
@@ -90,9 +90,15 @@ protected:
                        AliHLTUInt32_t& size,
                        std::vector<AliHLTComponentBlockData>& outputBlocks
                );
                        AliHLTUInt32_t& size,
                        std::vector<AliHLTComponentBlockData>& outputBlocks
                );
+       
+       using AliHLTProcessor::DoEvent;
 
 private:
 
 
 private:
 
+       // Do not allow copying of this class.
+       AliHLTMUONMansoTrackerFSMComponent(const AliHLTMUONMansoTrackerFSMComponent& /*obj*/);
+       AliHLTMUONMansoTrackerFSMComponent& operator = (const AliHLTMUONMansoTrackerFSMComponent& /*obj*/);
+
        void Reset();
        
        void AddRecHits(
        void Reset();
        
        void AddRecHits(
index c718ac12f1770458f06774800b68bf224bf3f21e..d4bc5d17b1982b6d76833226b73dbc6683e7060f 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONTriggerReconstructorComponent.cxx
- * @author Indranil Das <indra.das@saha.ac.in>, Artur Szostak <artursz@iafrica.com>
- * @date
- * @brief  Implementation of the trigger DDL reconstructor component.
- */
+///
+/// @file   AliHLTMUONTriggerReconstructorComponent.cxx
+/// @author Indranil Das <indra.das@saha.ac.in>, Artur Szostak <artursz@iafrica.com>
+/// @date
+/// @brief  Implementation of the trigger DDL reconstructor component.
+///
 
 #include "AliHLTMUONTriggerReconstructorComponent.h"
 #include "AliHLTMUONTriggerReconstructor.h"
 
 #include "AliHLTMUONTriggerReconstructorComponent.h"
 #include "AliHLTMUONTriggerReconstructor.h"
 #include <cassert>
 #include <fstream>
 
 #include <cassert>
 #include <fstream>
 
-namespace
-{
-       // This is a global object used for automatic component registration,
-       // do not use this for calculation.
-       AliHLTMUONTriggerReconstructorComponent gAliHLTMUONTriggerReconstructorComponent;
-
-} // end of namespace
-
-
 ClassImp(AliHLTMUONTriggerReconstructorComponent)
 
 
 AliHLTMUONTriggerReconstructorComponent::AliHLTMUONTriggerReconstructorComponent() :
 ClassImp(AliHLTMUONTriggerReconstructorComponent)
 
 
 AliHLTMUONTriggerReconstructorComponent::AliHLTMUONTriggerReconstructorComponent() :
+       AliHLTProcessor(),
        fTrigRec(NULL),
        fDDL(-1),
        fWarnForUnexpecedBlock(false),
        fSuppressPartialTrigs(false)
 {
        fTrigRec(NULL),
        fDDL(-1),
        fWarnForUnexpecedBlock(false),
        fSuppressPartialTrigs(false)
 {
+       ///
+       /// Default constructor.
+       ///
 }
 
 
 AliHLTMUONTriggerReconstructorComponent::~AliHLTMUONTriggerReconstructorComponent()
 {
 }
 
 
 AliHLTMUONTriggerReconstructorComponent::~AliHLTMUONTriggerReconstructorComponent()
 {
+       ///
+       /// Default destructor.
+       ///
 }
 
 
 const char* AliHLTMUONTriggerReconstructorComponent::GetComponentID()
 {
 }
 
 
 const char* AliHLTMUONTriggerReconstructorComponent::GetComponentID()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the component ID.
+       ///
+       
        return AliHLTMUONConstants::TriggerReconstructorId();
 }
 
 
 void AliHLTMUONTriggerReconstructorComponent::GetInputDataTypes( std::vector<AliHLTComponentDataType>& list)
 {
        return AliHLTMUONConstants::TriggerReconstructorId();
 }
 
 
 void AliHLTMUONTriggerReconstructorComponent::GetInputDataTypes( std::vector<AliHLTComponentDataType>& list)
 {
+       ///
+       /// Inherited from AliHLTProcessor. Returns the list of expected input data types.
+       ///
+       
        list.clear();
        list.push_back( AliHLTMUONConstants::TriggerDDLRawDataType() );
 }
        list.clear();
        list.push_back( AliHLTMUONConstants::TriggerDDLRawDataType() );
 }
@@ -76,6 +82,10 @@ void AliHLTMUONTriggerReconstructorComponent::GetInputDataTypes( std::vector<Ali
 
 AliHLTComponentDataType AliHLTMUONTriggerReconstructorComponent::GetOutputDataType()
 {
 
 AliHLTComponentDataType AliHLTMUONTriggerReconstructorComponent::GetOutputDataType()
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns the output data type.
+       ///
+       
        return AliHLTMUONConstants::TriggerRecordsBlockDataType();
 }
 
        return AliHLTMUONConstants::TriggerRecordsBlockDataType();
 }
 
@@ -84,6 +94,10 @@ void AliHLTMUONTriggerReconstructorComponent::GetOutputDataSize(
                unsigned long& constBase, double& inputMultiplier
        )
 {
                unsigned long& constBase, double& inputMultiplier
        )
 {
+       ///
+       /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+       ///
+       
        constBase = sizeof(AliHLTMUONTriggerRecordsBlockWriter::HeaderType);
        inputMultiplier = 4;
 }
        constBase = sizeof(AliHLTMUONTriggerRecordsBlockWriter::HeaderType);
        inputMultiplier = 4;
 }
@@ -91,12 +105,21 @@ void AliHLTMUONTriggerReconstructorComponent::GetOutputDataSize(
 
 AliHLTComponent* AliHLTMUONTriggerReconstructorComponent::Spawn()
 {
 
 AliHLTComponent* AliHLTMUONTriggerReconstructorComponent::Spawn()
 {
+       ///
+       /// Inherited from AliHLTComponent. Creates a new object instance.
+       ///
+       
        return new AliHLTMUONTriggerReconstructorComponent;
 }
 
 
 int AliHLTMUONTriggerReconstructorComponent::DoInit(int argc, const char** argv)
 {
        return new AliHLTMUONTriggerReconstructorComponent;
 }
 
 
 int AliHLTMUONTriggerReconstructorComponent::DoInit(int argc, const char** argv)
 {
+       ///
+       /// Inherited from AliHLTComponent.
+       /// Parses the command line parameters and initialises the component.
+       ///
+       
        // perform initialization.
        
        HLTInfo("Initialising dHLT trigger reconstructor component.");
        // perform initialization.
        
        HLTInfo("Initialising dHLT trigger reconstructor component.");
@@ -191,6 +214,10 @@ int AliHLTMUONTriggerReconstructorComponent::DoInit(int argc, const char** argv)
 
 int AliHLTMUONTriggerReconstructorComponent::DoDeinit()
 {
 
 int AliHLTMUONTriggerReconstructorComponent::DoDeinit()
 {
+       ///
+       /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+       ///
+       
        HLTInfo("Deinitialising dHLT trigger reconstructor component.");
 
        if (fTrigRec != NULL)
        HLTInfo("Deinitialising dHLT trigger reconstructor component.");
 
        if (fTrigRec != NULL)
@@ -211,6 +238,10 @@ int AliHLTMUONTriggerReconstructorComponent::DoEvent(
                std::vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
                std::vector<AliHLTComponentBlockData>& outputBlocks
        )
 {
+       ///
+       /// Inherited from AliHLTProcessor. Processes the new event data.
+       ///
+       
        // Process an event
        unsigned long totalSize = 0; // Amount of memory currently consumed in bytes.
 
        // Process an event
        unsigned long totalSize = 0; // Amount of memory currently consumed in bytes.
 
@@ -334,6 +365,10 @@ int AliHLTMUONTriggerReconstructorComponent::DoEvent(
 
 bool AliHLTMUONTriggerReconstructorComponent::ReadLookUpTable(const char* lutpath)
 {
 
 bool AliHLTMUONTriggerReconstructorComponent::ReadLookUpTable(const char* lutpath)
 {
+       ///
+       /// Read in the lookup table from file.
+       ///
+       
        assert(fTrigRec != NULL);
 
        fstream file;
        assert(fTrigRec != NULL);
 
        fstream file;
index f470982d2f94477f032fb09e21fac12405ad944f..14fc170350ebc8940ac869e913db1c1574d35c6f 100644 (file)
@@ -6,12 +6,12 @@
 
 /* $Id$ */
 
 
 /* $Id$ */
 
-/**
- * @file   AliHLTMUONTriggerReconstructorComponent.h
- * @author Indranil Das <indra.das@saha.ac.in>, Artur Szostak <artursz@iafrica.com>
- * @date
- * @brief  A processing component for the dHLT trigger DDL reconstruction.
- */
+///
+/// @file   AliHLTMUONTriggerReconstructorComponent.h
+/// @author Indranil Das <indra.das@saha.ac.in>, Artur Szostak <artursz@iafrica.com>
+/// @date
+/// @brief  A processing component for the dHLT trigger DDL reconstruction.
+///
 
 #include "AliHLTProcessor.h"
 #include "AliHLTMUONDataTypes.h"
 
 #include "AliHLTProcessor.h"
 #include "AliHLTMUONDataTypes.h"
@@ -35,11 +35,11 @@ public:
        // 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( std::vector<AliHLTComponentDataType>& list);
-       AliHLTComponentDataType GetOutputDataType();
+       virtual const char* GetComponentID();
+       virtual void GetInputDataTypes( std::vector<AliHLTComponentDataType>& list);
+       virtual AliHLTComponentDataType GetOutputDataType();
        virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
        virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
-       AliHLTComponent* Spawn();
+       virtual AliHLTComponent* Spawn();
 
 protected:
 
 
 protected:
 
@@ -58,9 +58,15 @@ protected:
                        AliHLTUInt32_t& size,
                        std::vector<AliHLTComponentBlockData>& outputBlocks
                );
                        AliHLTUInt32_t& size,
                        std::vector<AliHLTComponentBlockData>& outputBlocks
                );
+       
+       using AliHLTProcessor::DoEvent;
 
 private:
 
 
 private:
 
+       // Do not allow copying of this class.
+       AliHLTMUONTriggerReconstructorComponent(const AliHLTMUONTriggerReconstructorComponent& /*obj*/);
+       AliHLTMUONTriggerReconstructorComponent& operator = (const AliHLTMUONTriggerReconstructorComponent& /*obj*/);
+
        bool ReadLookUpTable(const char* lutpath);
        
        AliHLTMUONTriggerReconstructor* fTrigRec; // The trigger reconstructor class implementing the algorithm.
        bool ReadLookUpTable(const char* lutpath);
        
        AliHLTMUONTriggerReconstructor* fTrigRec; // The trigger reconstructor class implementing the algorithm.