1 #ifndef ALIHLTMUONEMPTYEVENTFILTERCOMPONENT_H
2 #define ALIHLTMUONEMPTYEVENTFILTERCOMPONENT_H
3 /* This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// @file AliHLTMUONEmptyEventFilterComponent.h
11 /// @author Artur Szostak <artursz@iafrica.com>
13 /// @brief Declaration of the empty event filter component.
16 #include "AliHLTMUONProcessor.h"
18 #if __GNUC__ && __GNUC__ < 3
23 * @class AliHLTMUONEmptyEventFilterComponent
24 * \brief Component for filtering on empty events.
25 * This component class is a utility component for debugging. It is used to filter
26 * empty dHLT events. (Specifically built for the Dec 2007 Cosmic tests where the
27 * muon spectrometer should not see any hits. Therefor we would be interested to
28 * analysis the raw data for those cases where the hit reconstructor actuall found
29 * something, because this would be strange/abnormal.)
30 * The component will look for dHLT data blocks containing results like dHLT
31 * reconstructed hits, trigger records and dHLT tracks,
32 * if any of the found blocks are not empty then every data block that it received
33 * will be forwarded to the output.
34 * This component would normally subscribe to all the front end DDL processing
35 * components like MUONHitReconstructor and MUONTriggerReconstructor, the DDL
36 * RORCPublishers for the DDL data and also the MUONMansoTrackerFSM component.
37 * A dump subscriber can then connect to the empty event filter component to
38 * make sure it only receives events that are not empty.
40 * <h2>General properties:</h2>
42 * Component ID: \b MUONEmptyEventFilter <br>
43 * Library: \b libAliHLTMUON.so <br>
44 * Input Data Types: kAliHLTAnyDataType = "*******:***" <br>
45 * Output Data Types: kAliHLTAnyDataType|kAliHLTDataOriginMUON = "*******:MUON" <br>
47 * <h2>Mandatory arguments:</h2>
50 * <h2>Optional arguments:</h2>
52 * This parameter causes the component to behave like an anti-filter
53 * meaning that it will send all events for which the dHLT results data
54 * blocks were empty. This is useful for collecting those events where dHLT
55 * is not finding anything but perhaps it should. <br>
56 * \li -dumponerror <br>
57 * This flag will cause the component to dump the data blocks it received if
58 * an error occurs during the processing of an event. <br>
59 * \li -dumppath <i>path</i> <br>
60 * Allows one to specify the path in which to dump the received data blocks
61 * if an error occurs. <br>
63 * <h2>Standard configuration:</h2>
64 * There is no special configuration for this component.
66 * <h2>Default CDB entries:</h2>
69 * <h2>Performance:</h2>
70 * Less than a milliseconds per event.
72 * <h2>Memory consumption:</h2>
73 * Minimal, under 1 MBytes.
75 * <h2>Output size:</h2>
76 * The maximum is the same size as the input data size.
78 * @ingroup alihlt_dimuon_component
80 class AliHLTMUONEmptyEventFilterComponent : public AliHLTMUONProcessor
83 AliHLTMUONEmptyEventFilterComponent();
84 virtual ~AliHLTMUONEmptyEventFilterComponent();
86 // Public functions to implement AliHLTComponent's interface.
87 // These functions are required for the registration process.
89 virtual const char* GetComponentID();
90 virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
91 virtual AliHLTComponentDataType GetOutputDataType();
92 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
93 virtual AliHLTComponent* Spawn();
97 // Protected functions to implement AliHLTComponent's interface.
98 // These functions provide initialization as well as the actual processing
99 // capabilities of the component.
101 virtual int DoInit(int argc, const char** argv);
102 virtual int DoDeinit();
104 const AliHLTComponentEventData& evtData,
105 const AliHLTComponentBlockData* blocks,
106 AliHLTComponentTriggerData& trigData,
107 AliHLTUInt8_t* outputPtr,
108 AliHLTUInt32_t& size,
109 AliHLTComponentBlockDataList& outputBlocks
111 virtual bool IgnoreArgument(const char* arg) const;
113 using AliHLTProcessor::DoEvent;
117 // Do not allow copying of this class.
118 AliHLTMUONEmptyEventFilterComponent(const AliHLTMUONEmptyEventFilterComponent& /*obj*/);
119 AliHLTMUONEmptyEventFilterComponent& operator = (const AliHLTMUONEmptyEventFilterComponent& /*obj*/);
121 bool fSendOnEmpty; //! Flag indicating if we should implement the inverse filter and only send everything if dHLT internal data blocks are empty.
123 ClassDef(AliHLTMUONEmptyEventFilterComponent, 0) // Filter component for empty dHLT events.
126 #endif // ALIHLTMUONEMPTYEVENTFILTERCOMPONENT_H