Line data Source code
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 */
6 :
7 : // $Id$
8 :
9 : ///
10 : /// @file AliHLTMUONEmptyEventFilterComponent.h
11 : /// @author Artur Szostak <artursz@iafrica.com>
12 : /// @date 2007-12-12
13 : /// @brief Declaration of the empty event filter component.
14 : ///
15 :
16 : #include "AliHLTMUONProcessor.h"
17 :
18 : #if __GNUC__ && __GNUC__ < 3
19 : #define std
20 : #endif
21 :
22 : /**
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.
39 : *
40 : * <h2>General properties:</h2>
41 : *
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>
46 : *
47 : * <h2>Mandatory arguments:</h2>
48 : * None.
49 : *
50 : * <h2>Optional arguments:</h2>
51 : * \li -sendempty <br>
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>
62 : *
63 : * <h2>Standard configuration:</h2>
64 : * There is no special configuration for this component.
65 : *
66 : * <h2>Default CDB entries:</h2>
67 : * None.
68 : *
69 : * <h2>Performance:</h2>
70 : * Less than a milliseconds per event.
71 : *
72 : * <h2>Memory consumption:</h2>
73 : * Minimal, under 1 MBytes.
74 : *
75 : * <h2>Output size:</h2>
76 : * The maximum is the same size as the input data size.
77 : *
78 : * @ingroup alihlt_muon_components
79 : */
80 : class AliHLTMUONEmptyEventFilterComponent : public AliHLTMUONProcessor
81 : {
82 : public:
83 : AliHLTMUONEmptyEventFilterComponent();
84 : virtual ~AliHLTMUONEmptyEventFilterComponent();
85 :
86 : // Public functions to implement AliHLTComponent's interface.
87 : // These functions are required for the registration process.
88 :
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();
94 :
95 : protected:
96 :
97 : // Protected functions to implement AliHLTComponent's interface.
98 : // These functions provide initialization as well as the actual processing
99 : // capabilities of the component.
100 :
101 : virtual int DoInit(int argc, const char** argv);
102 : virtual int DoDeinit();
103 : virtual int DoEvent(
104 : const AliHLTComponentEventData& evtData,
105 : const AliHLTComponentBlockData* blocks,
106 : AliHLTComponentTriggerData& trigData,
107 : AliHLTUInt8_t* outputPtr,
108 : AliHLTUInt32_t& size,
109 : AliHLTComponentBlockDataList& outputBlocks
110 : );
111 : virtual bool IgnoreArgument(const char* arg) const;
112 :
113 : using AliHLTProcessor::DoEvent;
114 :
115 : private:
116 :
117 : // Do not allow copying of this class.
118 : AliHLTMUONEmptyEventFilterComponent(const AliHLTMUONEmptyEventFilterComponent& /*obj*/);
119 : AliHLTMUONEmptyEventFilterComponent& operator = (const AliHLTMUONEmptyEventFilterComponent& /*obj*/);
120 :
121 : bool fSendOnEmpty; //! Flag indicating if we should implement the inverse filter and only send everything if dHLT internal data blocks are empty.
122 :
123 6 : ClassDef(AliHLTMUONEmptyEventFilterComponent, 0) // Filter component for empty dHLT events.
124 : };
125 :
126 : #endif // ALIHLTMUONEMPTYEVENTFILTERCOMPONENT_H
127 :
|