4 #ifndef ALIHLTREADOUTLISTDUMPCOMPONENT_H
5 #define ALIHLTREADOUTLISTDUMPCOMPONENT_H
6 //* This file is property of and copyright by the ALICE HLT Project *
7 //* ALICE Experiment at CERN, All rights reserved. *
8 //* See cxx source for full Copyright notice *
10 /** @file AliHLTReadoutListDumpComponent.h
11 @author Matthias Richter
13 @brief Collect ESDs of multiple events and write toi file
16 #include "AliHLTFileWriter.h"
20 class AliHLTReadoutList;
23 * @class AliHLTReadoutListDumpComponent
24 * The ReadoutListDump component fetches the DAQ readout list object
25 * and can store the information in different ways, like e.g. in a histogram
28 * <h2>General properties:</h2>
30 * Component ID: \b ReadoutListDump <br>
31 * Library: \b libAliHLTUtil.so <br>
32 * Input Data Types: {HLTRDLST:HLT }, <br>
33 * Output Data Types: none <br>
35 * <h2>Mandatory arguments:</h2>
36 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
38 * <h2>Optional arguments:</h2>
40 * fetch the binary readout list block (default)
42 * fetch the readout list from the HLT decision object
43 * The only AliHLTFileWriter argument of relevance is the \em -directory
44 * argument. See AliHLTFileWriter for full list of arguments.
46 * <h2>Configuration:</h2>
47 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
48 * Configuration by component arguments.
50 * <h2>Default CDB entries:</h2>
51 * The component loads no CDB entries.
53 * <h2>Performance:</h2>
54 * The component does not process any event data.
56 * <h2>Memory consumption:</h2>
57 * The component does not process any event data.
59 * <h2>Output size:</h2>
60 * No data published (AliHLTDataSink).
62 * @ingroup alihlt_util_components
64 class AliHLTReadoutListDumpComponent : public AliHLTFileWriter
67 /** standard constructor */
68 AliHLTReadoutListDumpComponent();
70 virtual ~AliHLTReadoutListDumpComponent();
73 * The id of the component.
74 * @return component id (string)
76 const char* GetComponentID() {return "ReadoutListDump";};
80 * @return new class instance
82 AliHLTComponent* Spawn() {return new AliHLTReadoutListDumpComponent;}
85 kModeBinaryList = 1, // fetch the readout list block
86 kModeHLTDecision = 2 // fetch the readout list from the HLT decision object
90 // interface functions
92 /// inherited form AliHLTFileWriter
95 /// inherited form AliHLTFileWriter
98 /// inherited form AliHLTDataSink
99 int DumpEvent( const AliHLTComponentEventData& evtData,
100 const AliHLTComponentBlockData* blocks,
101 AliHLTComponentTriggerData& trigData );
103 using AliHLTFileWriter::DumpEvent;
105 /// inherited form AliHLTFileWriter
106 int ScanArgument(int argc, const char** argv);
109 * Create the histogram for monitoring of the readout list.
110 * Each bin corresponds to a bit in the bitfield of the readout
112 * The object has to be deleted by the caller.
114 static TH1I* CreateReadoutListHistogram();
117 * Create the histogram for monitoring of the readout list.
118 * Plot readout list bits vs. CTP trigger bit
119 * The object has to be deleted by the caller.
121 static TH2I* CreateReadoutListVsCTPHistogram();
124 * Fill histogram from the readout list.
126 static int FillReadoutListHistogram(TH1I* histo, const AliHLTReadoutList* list);
129 * Fill histogram from the readout list.
131 static int FillReadoutListVsCTP(TH2I* histo, const AliHLTReadoutList* list, const AliHLTComponentTriggerData* trigData);
134 /** copy constructor prohibited */
135 AliHLTReadoutListDumpComponent(const AliHLTReadoutListDumpComponent&);
136 /** assignment operator prohibited */
137 AliHLTReadoutListDumpComponent& operator=(const AliHLTReadoutListDumpComponent&);
139 unsigned fMode; /// how to get the readout list (kModeBinaryList, kModeHLTDecision)
140 TH1I* fBitsHisto; /// the histogram to be filled
141 TH2I* fBitsVsCTP; /// histogram of bits vs. ctp triggers
143 ClassDef(AliHLTReadoutListDumpComponent, 0)