]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/util/AliHLTRootFilePublisherComponent.h
documentation
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTRootFilePublisherComponent.h
CommitLineData
4ddfc222 1// -*- Mode: C++ -*-
2// @(#) $Id$
3
4#ifndef ALIHLTROOTFILEPUBLISHERCOMPONENT_H
5#define ALIHLTROOTFILEPUBLISHERCOMPONENT_H
79c114b5 6/* This file is property of and copyright by the ALICE HLT Project *
7 * ALICE Experiment at CERN, All rights reserved. *
4ddfc222 8 * See cxx source for full Copyright notice */
9
10/** @file AliHLTRootFilePublisherComponent.h
11 @author Matthias Richter
12 @date
13 @brief component for publishing of Root objects from a root file.
14 @note The class is used in Offline (AliRoot) context
15*/
16
17#include "AliHLTFilePublisher.h"
18#include <TList.h>
19
20/**
21 * @class AliHLTRootFilePublisherComponent
79c114b5 22 * \Note: This component is not what it pretends to be. So far it was just
23 * used for debugging purpose. If you need a component like this make a
24 * feature request at <br>
25 * https://savannah.cern.ch/projects/alicehlt/
26 * and assign it to richterm. <br>
27 * Any contributions are of course welcome.
4ddfc222 28 *
29 * Component ID: \b RootFilePublisherComponent <br>
30 * Library: \b libHLTBase (in order to use the component from the external
31 * interface, it might be necessary to specify a dummy library with the
32 * \em -componentlibrary argument).
33 *
34 * Mandatory arguments: <br>
35 *
36 * Optional arguments:<br>
37 *
38 * @see AliHLTFilePublisher for default arguments
39 * @ingroup alihlt_component
40 */
41class AliHLTRootFilePublisherComponent : public AliHLTFilePublisher {
42 public:
43 /** standard constructor */
44 AliHLTRootFilePublisherComponent();
4ddfc222 45 /** destructor */
46 virtual ~AliHLTRootFilePublisherComponent();
47
48 const char* GetComponentID();
49 AliHLTComponentDataType GetOutputDataType();
50 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
51 AliHLTComponent* Spawn();
52
53 /**
54 * Open all files.
90cb4f5d 55 * Opens all files for all events from the event list @ref fEvents and adds TFile
56 * opjects to the internal list.
4ddfc222 57 */
58 int OpenFiles();
59
60 protected:
61 /**
62 * Data processing method for the component.
63 * The component uses the @ref alihltcomponent-high-level-interface
64 * to put serialized Root object into the output stream. Despite of that it
65 * implements the lox-level DumpEvent method in order to allow child classes
66 * to use the low-level method.
67 * @param evtData event data structure
68 * @param trigData trigger data structure
4ddfc222 69 * @return
70 */
71 int GetEvent( const AliHLTComponentEventData& evtData,
29312178 72 AliHLTComponentTriggerData& trigData);
4ddfc222 73
74 /**
75 * Scan one argument and adjacent parameters.
76 * Can be overloaded by child classes in order to add additional arguments
77 * beyond the standard arguments of the file publisher. The method is called
78 * whenever a non-standard argument is recognized.
79 * @param argc size of the argument array
80 * @param argv agument array for component initialization
81 * @return number of processed members of the argv <br>
82 * -EINVAL unknown argument <br>
83 * -EPROTO parameter for argument missing <br>
84 */
85 virtual int ScanArgument(int argc, const char** argv);
86
87 private:
29312178 88 /** copy constructor prohibited */
89 AliHLTRootFilePublisherComponent(const AliHLTRootFilePublisherComponent&);
90 /** assignment operator prohibited */
91 AliHLTRootFilePublisherComponent& operator=(const AliHLTRootFilePublisherComponent&);
4ddfc222 92
93 ClassDef(AliHLTRootFilePublisherComponent, 0)
94};
95#endif