4 #ifndef ALIHLTBLOCKDATACOLLECTION_H
5 #define ALIHLTBLOCKDATACOLLECTION_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 AliHLTBlockDataCollection.h
11 @author Matthias Richter
13 @brief A collection of AliHLTComponentBlockData descriptors providing
14 argument parsing and basic selection.
17 #include "AliHLTLogging.h"
22 * @class AliHLTBlockDataCollection
23 * Class handles a list of AliHLTComponentBlockData entries and parsing of
24 * argument list to fill it. Originally taken from AliHLTBlickFilterComponent,
25 * but decided to be commonly of benefit.
27 * See ScanArgument() function for description of available arguments
35 * @ingroup alihlt_base
37 class AliHLTBlockDataCollection : public TObject, public AliHLTLogging
40 /** standard constructor */
41 AliHLTBlockDataCollection();
43 virtual ~AliHLTBlockDataCollection();
46 * Add data block descriptor.
48 int Add(const AliHLTComponentBlockData& block);
51 * Check if the data block is selected by the filter rules.
52 * @return 1 if selected
54 int IsSelected(const AliHLTComponentBlockData& block);
57 * Scan argument and read block descriptor data.
58 * The function is invoked by components in the course of argument
61 * Scan the list for known arguments, terminates at the first unknown argument.
62 * Recognized arguments:
63 * \li -datatype <i> id origin </i> <br>
64 * e.g. <tt> -datatype 'ESD_TREE' 'TPC ' </tt> <br>
65 * \b Note: due to the 4-character data origin it might be necessary to
66 * append a blank to the detectorname, e.g. <tt>TPC -> 'TPC '</tt>
68 * \li -origin <i> origin </i> <br>
69 * e.g. -origin 'TPC ', \b Note: the filter rule has type id 'ANY'
71 * \li -typeid <i> id </i> <br>
72 * e.g. -typeid ESD_TREE, \b Note: the filter rule has origin 'ANY'
74 * \li -dataspec <i> specification </i> <br>
75 * data specification treated as decimal number or hex number if
78 * @return number of arguments which have been treated.
80 int ScanArgument(int argc, const char** argv );
83 * Check collection for content.
84 * @return 1 if empty, 0 if content available
90 /** copy constructor prohibited */
91 AliHLTBlockDataCollection(const AliHLTBlockDataCollection&);
92 /** assignment operator prohibited */
93 AliHLTBlockDataCollection& operator=(const AliHLTBlockDataCollection&);
95 /** filtering rules, only the data type and specification members are use */
96 vector<AliHLTComponentBlockData> fFilterRules; //! transient
98 ClassDef(AliHLTBlockDataCollection, 0)