3 #ifndef ALIHLTFILEPUBLISHER_H
4 #define ALIHLTFILEPUBLISHER_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 /** @file AliHLTFilePublisher.h
9 @author Matthias Richter
11 @brief An HLT file publishing (data source) component.
12 @note The class is used in Offline (AliRoot) context
15 #include "AliHLTDataSource.h"
19 * @class AliHLTFilePublisher
20 * An HLT data source component which publishes data from one or a sequence
22 * Mandatory arguments: <br>
23 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
24 * \li -datafile <i> filename </i>
25 * \li -datafilelist <i> file pattern </i>
26 * \li -datatype <i> data type </i>
27 * \li -dataspec <i> specification </i>
28 * \li -dataorigin <i> origin </i>
30 * Optional arguments:<br>
32 * The component needs at least one argument \em -datafile or \em -datafilelist.
33 * Both can occur multiple times.
34 * @ingroup alihlt_component
36 class AliHLTFilePublisher : public AliHLTDataSource {
38 /** standard constructor */
39 AliHLTFilePublisher();
40 /** not a valid copy constructor, defined according to effective C++ style */
41 AliHLTFilePublisher(const AliHLTFilePublisher&);
42 /** not a valid assignment op, but defined according to effective C++ style */
43 AliHLTFilePublisher& operator=(const AliHLTFilePublisher&);
45 virtual ~AliHLTFilePublisher();
47 const char* GetComponentID();
48 AliHLTComponentDataType GetOutputDataType();
49 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
50 AliHLTComponent* Spawn();
54 * Opens all files from the file name list @ref fFileNames and adds TFile
55 * opjects to the TFiles list.
63 int DoInit( int argc, const char** argv );
71 * Data processing method for the component.
72 * @param evtData event data structure
73 * @param trigData trigger data structure
74 * @param outputPtr pointer to target buffer
75 * @param size <i>input</i>: size of target buffer
76 * <i>output</i>:size of produced data
77 * @param outputBlocks list to receive output block descriptors
80 int GetEvent( const AliHLTComponentEventData& evtData,
81 AliHLTComponentTriggerData& trigData,
82 AliHLTUInt8_t* outputPtr,
84 vector<AliHLTComponentBlockData>& outputBlocks );
87 * Scan one argument and adjacent parameters.
88 * Can be overloaded by child classes in order to add additional arguments
89 * beyond the standard arguments of the file publisher. The method is called
90 * whenever a non-standard argument is recognized.
91 * @param argc size of the argument array
92 * @param argv agument array for component initialization
93 * @return number of processed members of the argv <br>
94 * -EINVAL unknown argument <br>
95 * -EPROTO parameter for argument missing <br>
97 virtual int ScanArgument(int argc, const char** argv);
102 TObjLink* fpCurrent; //! transient value
103 AliHLTComponentDataType fDataType;
104 AliHLTUInt32_t fSpecification;
107 ClassDef(AliHLTFilePublisher, 0)