]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTRootFilePublisherComponent.h
Modification of operator=
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTRootFilePublisherComponent.h
1 // @(#) $Id$
2
3 #ifndef ALIHLTROOTFILEPUBLISHERCOMPONENT_H
4 #define ALIHLTROOTFILEPUBLISHERCOMPONENT_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice                               */
7
8 /** @file   AliHLTRootFilePublisherComponent.h
9     @author Matthias Richter
10     @date   
11     @brief  component for publishing of Root objects from a root file.
12     @note   The class is used in Offline (AliRoot) context
13 */
14
15 #include "AliHLTFilePublisher.h"
16 #include <TList.h>
17
18 /**
19  * @class AliHLTRootFilePublisherComponent
20  * An HLT data source component which publishes data from one or a sequence
21  * of files.<br>
22  *
23  * Component ID: \b RootFilePublisherComponent <br>
24  * Library: \b libHLTBase (in order to use the component from the external
25  * interface, it might be necessary to specify a dummy library with the
26  * \em -componentlibrary argument).
27  *
28  * Mandatory arguments: <br>
29  *
30  * Optional arguments:<br>
31  *
32  * @see AliHLTFilePublisher for default arguments
33  * @ingroup alihlt_component
34  */
35 class AliHLTRootFilePublisherComponent : public AliHLTFilePublisher  {
36  public:
37   /** standard constructor */
38   AliHLTRootFilePublisherComponent();
39   /** not a valid copy constructor, defined according to effective C++ style */
40   AliHLTRootFilePublisherComponent(const AliHLTRootFilePublisherComponent&);
41   /** not a valid assignment op, but defined according to effective C++ style */
42   AliHLTRootFilePublisherComponent& operator=(const AliHLTRootFilePublisherComponent&);
43   /** destructor */
44   virtual ~AliHLTRootFilePublisherComponent();
45
46   const char* GetComponentID();
47   AliHLTComponentDataType GetOutputDataType();
48   void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
49   AliHLTComponent* Spawn();
50
51   /**
52    * Open all files.
53    * Opens all files from the file name list @ref fFileNames and adds TFile
54    * opjects to the TFiles list.
55    */
56   int OpenFiles();
57
58  protected:
59   /**
60    * Data processing method for the component.
61    * The component uses the @ref alihltcomponent-high-level-interface
62    * to put serialized Root object into the output stream. Despite of that it
63    * implements the lox-level DumpEvent method in order to allow child classes
64    * to use the low-level method.
65    * @param evtData       event data structure
66    * @param trigData      trigger data structure
67    * @param outputPtr     pointer to target buffer
68    * @param size          <i>input</i>: size of target buffer
69    *                      <i>output</i>:size of produced data
70    * @param outputBlocks  list to receive output block descriptors
71    * @return
72    */
73   int GetEvent( const AliHLTComponentEventData& evtData,
74                 AliHLTComponentTriggerData& trigData,
75                 AliHLTUInt8_t* outputPtr, 
76                 AliHLTUInt32_t& size,
77                 vector<AliHLTComponentBlockData>& outputBlocks );
78
79   /**
80    * Scan one argument and adjacent parameters.
81    * Can be overloaded by child classes in order to add additional arguments
82    * beyond the standard arguments of the file publisher. The method is called
83    * whenever a non-standard argument is recognized.
84    * @param argc           size of the argument array
85    * @param argv           agument array for component initialization
86    * @return number of processed members of the argv <br>
87    *         -EINVAL unknown argument <br>
88    *         -EPROTO parameter for argument missing <br>
89    */
90   virtual int ScanArgument(int argc, const char** argv);
91
92  private:
93
94   ClassDef(AliHLTRootFilePublisherComponent, 0)
95 };
96 #endif