Also got rid of global objects used for component registration in favour of registration of components in the AliHLTMUONAgent::RegisterComponents method.
};
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};
/**
- * The sign of a particle.
+ * The sign/charge of a particle.
*/
enum AliHLTMUONParticleSign
{
/* $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"
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, 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 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);
}
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;
}
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 );
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;
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 ]
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;
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)
{
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.
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.
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.
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.
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.
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.
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.
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.
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.
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;
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.
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;
}
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;
}
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;
}
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.
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;
}
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;
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.
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.
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;
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.
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;
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.
/* $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"
/* $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 "AliHLTMUONRecHitsSource.h"
+#include "AliHLTMUONTriggerRecordsSource.h"
+#include "AliHLTMUONRootifierComponent.h"
+#include "AliHLTMUONHitReconstructorComponent.h"
+#include "AliHLTMUONTriggerReconstructorComponent.h"
+#include "AliHLTMUONMansoTrackerFSMComponent.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()
{
+ ///
+ /// Default constructor.
+ ///
}
AliHLTMUONAgent::~AliHLTMUONAgent()
{
+ ///
+ /// Default destructor.
+ ///
}
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
{
+ ///
+ /// 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";
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;
}
+
+
+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;
+}
+
/* $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;
virtual ~AliHLTMUONAgent();
+ // The following methods are all inherited from AliHLTModuleAgent:
+
/**
* Register all processing configurations belonging to the dimuon HLT
* library with the AliHLTConfigurationHandler.
* @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
* @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.
*/
- 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.
};
/* $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 "mapping/AliMpCDB.h"
#include "mapping/AliMpDEManager.h"
#include "mapping/AliMpDetElement.h"
-#include "TClonesArray.h"
#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);
fMCDataInterface(NULL),
fDataInterface(NULL),
fSelection(kWholePlane),
- fCurrentEvent(0)
+ fCurrentEventIndex(0)
{
+ ///
+ /// Default constructor.
+ ///
+
for (Int_t i = 0; i < AliMUONConstants::NTrackingCh(); i++)
fServeChamber[i] = false;
}
AliHLTMUONRecHitsSource::~AliHLTMUONRecHitsSource()
{
+ ///
+ /// Default destructor.
+ ///
+
assert( fMCDataInterface == NULL );
assert( fDataInterface == NULL );
}
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 );
bool simdata = false;
bool recdata = false;
bool chamberWasSet = false;
- fCurrentEvent = 0;
+ fCurrentEventIndex = 0;
bool firstEventSet = false;
bool eventNumLitSet = false;
));
return EINVAL;
}
- fCurrentEvent = Int_t(num);
+ fCurrentEventIndex = Int_t(num);
firstEventSet = true;
}
else if (strcmp(argv[i], "-event_number_literal") == 0)
" override -firstevent."
);
}
- fCurrentEvent = -1;
+ fCurrentEventIndex = -1;
eventNumLitSet = true;
}
else
}
}
- // 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());
- 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"
- " counter to zero.", fCurrentEvent, maxevent
+ " counter to zero.", fCurrentEventIndex, maxevent
));
}
int AliHLTMUONRecHitsSource::DoDeinit()
{
+ ///
+ /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+ ///
+
if (fMCDataInterface != NULL)
{
delete fMCDataInterface;
const char* AliHLTMUONRecHitsSource::GetComponentID()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the component ID.
+ ///
+
return AliHLTMUONConstants::RecHitsSourceId();
}
AliHLTComponentDataType AliHLTMUONRecHitsSource::GetOutputDataType()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the output data type.
+ ///
+
return AliHLTMUONConstants::RecHitsBlockDataType();
}
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;
AliHLTComponent* AliHLTMUONRecHitsSource::Spawn()
{
+ ///
+ /// Inherited from AliHLTComponent. Creates a new object instance.
+ ///
+
return new AliHLTMUONRecHitsSource();
}
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.
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.
- // 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());
- 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 )
{
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
/* $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"
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 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.
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.
};
#include "AliHLTMUONRecHit.h"
#include "AliHLTMUONTriggerRecord.h"
#include "AliHLTMUONMansoTrack.h"
-#include "TObjArray.h"
#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);
AliHLTMUONRootifierComponent::AliHLTMUONRootifierComponent() :
AliHLTProcessor()
{
+ ///
+ /// Default constructor.
+ ///
}
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()
{
+ ///
+ /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+ ///
+
return 0;
}
const char* AliHLTMUONRootifierComponent::GetComponentID()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the component ID.
+ ///
+
return "MUONRootifier";
}
AliHLTComponentDataType AliHLTMUONRootifierComponent::GetOutputDataType()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the output data type.
+ ///
+
return kAliHLTAnyDataType;
}
vector<AliHLTComponentDataType>& list
)
{
+ ///
+ /// Inherited from AliHLTProcessor. Returns the list of expected input data types.
+ ///
+
list.push_back(kAliHLTAnyDataType);
}
unsigned long& constBase, double& inputMultiplier
)
{
+ ///
+ /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+ ///
+
constBase = 1024*1024;
inputMultiplier = 100;
}
AliHLTComponent* AliHLTMUONRootifierComponent::Spawn()
{
+ ///
+ /// Inherited from AliHLTComponent. Creates a new object instance.
+ ///
+
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.
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);
+}
+
// Temporary solution for grouping together objects for the same event.
#include "TObjArray.h"
+
class AliHLTMUONEvent : public TObject
{
public:
// 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:
- 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.
};
AliHLTMUONRootifierComponent();
virtual ~AliHLTMUONRootifierComponent();
- int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
-
virtual const char* GetComponentID();
virtual void GetInputDataTypes(vector<AliHLTComponentDataType>& list);
virtual int DoInit(int argc, const char** argv);
virtual int DoDeinit();
+ virtual int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+ using AliHLTProcessor::DoEvent;
private:
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)
fDataInterface(NULL),
fBuildFromHits(false),
fSelection(kWholePlane),
- fCurrentEvent(0)
+ fCurrentEventIndex(0)
{
+ ///
+ /// Default constructor.
+ ///
}
AliHLTMUONTriggerRecordsSource::~AliHLTMUONTriggerRecordsSource()
{
+ ///
+ /// Default destructor.
+ ///
+
assert( fMCDataInterface == NULL );
assert( fDataInterface == NULL );
}
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 );
bool hitdata = false;
bool simdata = false;
bool recdata = false;
- fCurrentEvent = 0;
+ fCurrentEventIndex = 0;
bool firstEventSet = false;
bool eventNumLitSet = false;
));
return EINVAL;
}
- fCurrentEvent = Int_t(num);
+ fCurrentEventIndex = Int_t(num);
firstEventSet = true;
}
else if (strcmp(argv[i], "-event_number_literal") == 0)
" override -firstevent."
);
}
- fCurrentEvent = -1;
+ fCurrentEventIndex = -1;
eventNumLitSet = true;
}
else
}
}
- // 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());
- 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"
- " counter to zero.", fCurrentEvent, maxevent
+ " counter to zero.", fCurrentEventIndex, maxevent
));
}
int AliHLTMUONTriggerRecordsSource::DoDeinit()
{
+ ///
+ /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+ ///
+
if (fMCDataInterface != NULL)
{
delete fMCDataInterface;
const char* AliHLTMUONTriggerRecordsSource::GetComponentID()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the component ID.
+ ///
+
return AliHLTMUONConstants::TriggerRecordsSourceId();
}
AliHLTComponentDataType AliHLTMUONTriggerRecordsSource::GetOutputDataType()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the output data type.
+ ///
+
return AliHLTMUONConstants::TriggerRecordsBlockDataType();
}
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;
AliHLTComponent* AliHLTMUONTriggerRecordsSource::Spawn()
{
+ ///
+ /// Inherited from AliHLTComponent. Creates a new object instance.
+ ///
+
return new AliHLTMUONTriggerRecordsSource();
}
vector<AliHLTComponentBlockData>& outputBlocks
)
{
+ ///
+ /// Inherited from AliHLTOfflineDataSource. Creates new event data blocks.
+ ///
+
assert( fMCDataInterface != NULL or fDataInterface != NULL );
AliHLTInt32_t trigRecId = 0;
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.
- // 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());
- 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 )
{
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 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.
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.
};
/* $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 <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() :
+ AliHLTProcessor(),
fHitRec(NULL),
fDDLDir(""),
fDDL(0),
fReaderType(false),
fWarnForUnexpecedBlock(false)
{
+ ///
+ /// Default constructor.
+ ///
}
AliHLTMUONHitReconstructorComponent::~AliHLTMUONHitReconstructorComponent()
{
+ ///
+ /// Default destructor.
+ ///
}
const char* AliHLTMUONHitReconstructorComponent::GetComponentID()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the component ID.
+ ///
+
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() );
}
AliHLTComponentDataType AliHLTMUONHitReconstructorComponent::GetOutputDataType()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the output data type.
+ ///
+
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;
}
-// Spawn function, return new instance of this class
AliHLTComponent* AliHLTMUONHitReconstructorComponent::Spawn()
{
+ ///
+ /// Inherited from AliHLTComponent. Creates a new object instance.
+ ///
+
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");
int AliHLTMUONHitReconstructorComponent::DoDeinit()
{
+ ///
+ /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+ ///
+
if(fHitRec)
delete fHitRec;
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.
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");
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;
#ifndef ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H
-#define ALIHLTMUONHITREONSTRUCTORCCOMPONENT_H
+#define ALIHLTMUONHITRECONSTRUCTORCOMPONENT_H
/**************************************************************************
* This file is property of and copyright by the ALICE HLT Project *
* All rights reserved. *
/* $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>
// 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 );
- AliHLTComponent* Spawn();
+ virtual AliHLTComponent* Spawn();
protected:
// 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,
std::vector<AliHLTComponentBlockData>& outputBlocks
);
+ using AliHLTProcessor::DoEvent;
+
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);
- 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)
/* $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 <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);
fBlock(NULL),
fWarnForUnexpecedBlock(false)
{
+ ///
+ /// Default constructor.
+ ///
}
AliHLTMUONMansoTrackerFSMComponent::~AliHLTMUONMansoTrackerFSMComponent()
{
+ ///
+ /// Default destructor.
+ ///
+
assert( fTracker == NULL );
}
const char* AliHLTMUONMansoTrackerFSMComponent::GetComponentID()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the component ID.
+ ///
+
return AliHLTMUONConstants::MansoTrackerFSMId();
}
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() );
AliHLTComponentDataType AliHLTMUONMansoTrackerFSMComponent::GetOutputDataType()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the output data type.
+ ///
+
return AliHLTMUONConstants::MansoTracksBlockDataType();
}
unsigned long& constBase, double& inputMultiplier
)
{
+ ///
+ /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+ ///
+
constBase = sizeof(AliHLTMUONMansoTracksBlockStruct);
inputMultiplier = 1;
}
AliHLTComponent* AliHLTMUONMansoTrackerFSMComponent::Spawn()
{
+ ///
+ /// Inherited from AliHLTComponent. Creates a new object instance.
+ ///
+
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);
int AliHLTMUONMansoTrackerFSMComponent::DoDeinit()
{
+ ///
+ /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+ ///
+
if (fTracker != NULL)
{
delete fTracker;
std::vector<AliHLTComponentBlockData>& outputBlocks
)
{
+ ///
+ /// Inherited from AliHLTProcessor. Processes the new event data.
+ ///
+
Reset();
AliHLTUInt32_t specification = 0; // Contains the output data block spec bits.
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.
void AliHLTMUONMansoTrackerFSMComponent::AddRecHits(
- AliHLTUInt32_t specification,
+ AliHLTUInt32_t specification,
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."
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;
AliHLTMUONMansoTrackerFSM* /*tracker*/
)
{
+ ///
+ /// Inherited from AliHLTMUONMansoTrackerFSMCallback.
+ /// Nothing special to do here.
+ ///
+
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 =
void AliHLTMUONMansoTrackerFSMComponent::NoTrackFound(AliHLTMUONMansoTrackerFSM* /*tracker*/)
{
+ ///
+ /// Inherited from AliHLTMUONMansoTrackerFSMCallback.
+ /// Nothing special to do here.
+ ///
+
DebugTrace("No track found.");
}
+
/* $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"
// 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,
AliHLTUInt32_t& size,
std::vector<AliHLTComponentBlockData>& outputBlocks
);
+
+ using AliHLTProcessor::DoEvent;
private:
+ // Do not allow copying of this class.
+ AliHLTMUONMansoTrackerFSMComponent(const AliHLTMUONMansoTrackerFSMComponent& /*obj*/);
+ AliHLTMUONMansoTrackerFSMComponent& operator = (const AliHLTMUONMansoTrackerFSMComponent& /*obj*/);
+
void Reset();
void AddRecHits(
/* $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 <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() :
+ AliHLTProcessor(),
fTrigRec(NULL),
fDDL(-1),
fWarnForUnexpecedBlock(false),
fSuppressPartialTrigs(false)
{
+ ///
+ /// Default constructor.
+ ///
}
AliHLTMUONTriggerReconstructorComponent::~AliHLTMUONTriggerReconstructorComponent()
{
+ ///
+ /// Default destructor.
+ ///
}
const char* AliHLTMUONTriggerReconstructorComponent::GetComponentID()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the component ID.
+ ///
+
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() );
}
AliHLTComponentDataType AliHLTMUONTriggerReconstructorComponent::GetOutputDataType()
{
+ ///
+ /// Inherited from AliHLTComponent. Returns the output data type.
+ ///
+
return AliHLTMUONConstants::TriggerRecordsBlockDataType();
}
unsigned long& constBase, double& inputMultiplier
)
{
+ ///
+ /// Inherited from AliHLTComponent. Returns an estimate of the expected output data size.
+ ///
+
constBase = sizeof(AliHLTMUONTriggerRecordsBlockWriter::HeaderType);
inputMultiplier = 4;
}
AliHLTComponent* AliHLTMUONTriggerReconstructorComponent::Spawn()
{
+ ///
+ /// Inherited from AliHLTComponent. Creates a new object instance.
+ ///
+
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.");
int AliHLTMUONTriggerReconstructorComponent::DoDeinit()
{
+ ///
+ /// Inherited from AliHLTComponent. Performs a cleanup of the component.
+ ///
+
HLTInfo("Deinitialising dHLT trigger reconstructor component.");
if (fTrigRec != NULL)
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.
bool AliHLTMUONTriggerReconstructorComponent::ReadLookUpTable(const char* lutpath)
{
+ ///
+ /// Read in the lookup table from file.
+ ///
+
assert(fTrigRec != NULL);
fstream file;
/* $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"
// 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);
- AliHLTComponent* Spawn();
+ virtual AliHLTComponent* Spawn();
protected:
AliHLTUInt32_t& size,
std::vector<AliHLTComponentBlockData>& outputBlocks
);
+
+ using AliHLTProcessor::DoEvent;
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.