//-*- Mode: C++ -*- // $Id: $ #ifndef AliHLTMUONSPECTROTRIGGERCOMPONENT_H #define AliHLTMUONSPECTROTRIGGERCOMPONENT_H /* This file is property of and copyright by the ALICE HLT Project * * ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /// @file AliHLTMuonSpectroTriggerComponent.h /// @author Artur Szostak /// @date 9 Nov 2009 /// @brief Declares the trigger component for the muon spectrometer. #include "AliHLTTrigger.h" /** * \class AliHLTMuonSpectroTriggerComponent * \brief Muon spectrometer trigger component. * * This component takes the HLT MUON decision generated by the AliHLTMUONDecisionComponent * and creates a HLT trigger suitable for the HLT global trigger framework. Some * optional summary statistics scalars can be generated with the "-makestats" option. * This extra statistics information is filled in the AliHLTMuonSpectroScalars object, * and written to a kAliHLTDataTypeEventStatistics type data block. Thus, the scalars * object can be automatically added to the AliHLTEventSummary object by the * AliHLTEventSummaryProducerComponent. * *

General properties:

* * Component ID: \b MuonSpectroTrigger
* Library: \b libAliHLTTrigger.so
* Input Data Types: \li AliHLTMUONConstants::DDLRawDataType() = "DDL_RAW :MUON"
* \li AliHLTMUONConstants::TriggerRecordsBlockDataType() = "TRIGRECS:MUON"
* \li AliHLTMUONConstants::RecHitsBlockDataType() = "RECHITS :MUON"
* \li AliHLTMUONConstants::MansoTracksBlockDataType() = "MANTRACK:MUON"
* \li AliHLTMUONConstants::TracksBlockDataType() = "TRACKS :MUON"
* \li AliHLTMUONConstants::SinglesDecisionBlockDataType() = "DECIDSIN:MUON"
* \li AliHLTMUONConstants::PairsDecisionBlockDataType() = "DECIDPAR:MUON"
* Output Data Types: \li kAliHLTDataTypeTriggerDecision = "TRIG_DEC:HLT "
* \li kAliHLTDataTypeReadoutList = "HLTRDLST:HLT "
* \li kAliHLTDataTypeEventStatistics|kAliHLTDataOriginHLT = "EV_STATI:HLT "
* *

Mandatory arguments:

* None. * *

Optional arguments:

* \li -makestats
* If specified then the summary statistics scalars object is generated as output. * The default is not to generate the statistics object.
* \li -triggerddls
* Indicates that the component should trigger if any ddls are found in the muon * spectrometer.
* \li -triggerhits
* Indicates that the component should trigger if any hits are found in the muon * spectrometer tracking chambers. This option requires that this trigger component * receives the reconstructed hits data blocks.
* \li -triggertrigrecs
* Indicates that the component should trigger if any trigger records are found. * This option requires that this trigger component receives the trigger records * data blocks.
* \li -triggertracks
* Indicates that the component should trigger if any Manso tracks are found. * This option requires that this trigger component receives the Manso track * or singles decision data blocks.
* \li -triggerdimuons
* Indicates that the component should trigger if any dimuon pairs are found. * This option requires that this trigger component receives the pairs decision * data blocks.
* \li -triggerany
* This option indicates that the trigger component should trigger if anything was * reconstructed in the muon spectrometer by the dHLT at all.
* * \note If none of the "triggerhits", "-triggertrigrecs", "-triggertracks" or "-triggerdimuons" * options are specified then the default triggering mode is to trigger on tracks * and dimuon pairs.
* *

Configuration:

* Currently there is no configuration required. * *

Default CDB entries:

* None. * *

Performance:

* Under a millisecond per event. * *

Memory consumption:

* Memory consumption is minimal. It should be less than 1 MBytes. * *

Output size:

* Requires up to 4 kBytes * * \ingroup alihlt_trigger_components */ class AliHLTMuonSpectroTriggerComponent : public AliHLTTrigger { public: AliHLTMuonSpectroTriggerComponent(); virtual ~AliHLTMuonSpectroTriggerComponent(); /** * Inherited from AliHLTTrigger. * @return string containing the global trigger name. */ virtual const char* GetTriggerName() const { return "MuonSpectroTrigger"; } /** * Inherited from AliHLTTrigger. Returns the following input data types * handled by this component: * AliHLTMUONConstants::TriggerRecordsBlockDataType() = "TRIGRECS:MUON" * AliHLTMUONConstants::RecHitsBlockDataType() = "RECHITS :MUON" * AliHLTMUONConstants::MansoTracksBlockDataType() = "MANTRACK:MUON" * AliHLTMUONConstants::TracksBlockDataType() = "TRACKS :MUON" * AliHLTMUONConstants::SinglesDecisionBlockDataType() = "DECIDSIN:MUON" * AliHLTMUONConstants::PairsDecisionBlockDataType() = "DECIDPAR:MUON" * @param [out] list The list of data types to be filled. */ virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list) const; /** * Inherited from AliHLTTrigger. Returns the following output types generated * by this component: * kAliHLTDataTypeTriggerDecision * kAliHLTDataTypeEventStatistics|kAliHLTDataOriginHLT * Including the type kAliHLTDataTypeReadoutList implicitly. * @param [out] list The list of data types to be filled. */ virtual void GetOutputDataTypes(AliHLTComponentDataTypeList& list) const; /** * Inherited from AliHLTTrigger. Returns the estimated data volume required * in bytes: constBase + input_volume * inputMultiplier * @param [out] constBase Additive part, independent of the input data volume. * @param [out] inputMultiplier Multiplication ratio. */ virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier); /** * Inherited from AliHLTComponent. * \returns a new instance of AliHLTMuonSpectroTriggerComponent. */ virtual AliHLTComponent* Spawn(); protected: /** * Inherited from AliHLTComponent. Initialises the component. * \param argc The number of arguments in argv. * \param argv Array of component argument strings. * \returns Zero on success and negative number on failure. */ virtual Int_t DoInit(int argc, const char** argv); /** * Inherited from AliHLTComponent. Cleans up the component. * \returns Zero on success and negative number on failure. */ virtual Int_t DoDeinit(); /** * Inherited from AliHLTComponent. Makes a trigger decision for the muon * spectrometer. * @return Zero is returned on success and a negative error code on failure. */ virtual int DoTrigger(); private: /// Not implemented. Do not allow copying of this class. AliHLTMuonSpectroTriggerComponent(const AliHLTMuonSpectroTriggerComponent& /*obj*/); /// Not implemented. Do not allow copying of this class. AliHLTMuonSpectroTriggerComponent& operator = (const AliHLTMuonSpectroTriggerComponent& /*obj*/); /** * Method for checking the structure of a data block. * \param reader The reader for the data block. * \param type The data block type as given by the pub/sub framework. * \returns true if the data block structure is OK and false otherwise. */ template bool IsBlockOk(const BlockReader& reader, const AliHLTComponentDataType& type) const; unsigned long fBufferSizeConst; //! Constant size estimate for GetOutputDataSize. double fBufferSizeMultiplier; //! Buffer size multiplier estimate for GetOutputDataSize. bool fMakeStats; //! Indicates if the statistics scalars object should be generated or not. bool fTriggerDDLs; //! If true then the component will trigger on any dll in the tracking and trigger chambers. bool fTriggerHits; //! If true then the component will trigger on any hits in the tracking chambers. bool fTriggerTrigRecs; //! If true then the component will trigger on any trigger records. bool fTriggerTracks; //! If true then the component will trigger on any tracks found. bool fTriggerDimuons; //! If true then the component will trigger on any dimuons. ClassDef(AliHLTMuonSpectroTriggerComponent, 0); // Trigger component for the muon spectrometer. }; #endif // AliHLTMUONSPECTROTRIGGERCOMPONENT_H