-// @(#) $Id$
+//-*- Mode: C++ -*-
+// $Id$
#ifndef ALIHLTOUTCOMPONENT_H
#define ALIHLTOUTCOMPONENT_H
//* ALICE Experiment at CERN, All rights reserved. *
//* See cxx source for full Copyright notice *
-/** @file AliHLTOUTComponent.h
- @author Matthias Richter
- @date
- @brief The HLTOUT data sink component similar to HLTOUT nodes
-*/
-
-// see class description below
-// or
-// refer to README to build package
-// or
-// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+/// @file AliHLTOUTComponent.h
+/// @author Matthias Richter
+/// @date
+/// @brief The HLTOUT data sink component similar to HLTOUT nodes.
+/// @note Used in the AliRoot environment only.
#include "AliHLTOfflineDataSink.h"
* The HLTOUT data sink component which models the behavior of the HLTOUT
* nodes of the HLT cluster.
* <h2>General properties:</h2>
+ * The HLTOUT component is attached at the end of a chain. It stores all input
+ * block in the HOMER format, distributed over a number of DDL link. The data
+ * is stored in a digit file or in raw ddl files.
*
* Component ID: \b HLTOUT <br>
* Library: \b libHLTrec.so <br>
* <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
* \li -links <i> n </i> <br>
* number of output ddl links
+ * \li -digitfile <i> name </i> <br>
+ * name of the digit file to write (default HLT.Digits.root)
+ * \li -rawout[=on,off] <br>
+ * switch raw output on/off (default on)
+ * \li -digitout[=on,off] <br>
+ * switch digit output on/off (default on)
*
* <h2>Configuration:</h2>
* <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
*/
class AliHLTOUTComponent : public AliHLTOfflineDataSink {
public:
- /** standard constructor */
- AliHLTOUTComponent();
+ /// type of the HLTOUT component
+ enum EType {
+ kGlobal = 0, // generate according to global flags
+ kDigits = 1, // generate only digits: ID HLTOUTdigits
+ kRaw = 2 // generate only raw: ID HLTOUTraw
+ };
+ /// constructor for different component types
+ AliHLTOUTComponent(EType type=kGlobal);
/** destructor */
virtual ~AliHLTOUTComponent();
*/
static void ClearGlobalOption(unsigned int options);
+ /**
+ * Test one of the global options
+ */
+ static bool TestGlobalOption(unsigned int option);
+
enum {
/** write the raw files of the HLT links */
kWriteRawFiles = 0x1,
*/
int DoInit( int argc, const char** argv );
+ /// inherited from AliHLTComponent, component specific argument scan
+ int ScanConfigurationArgument(int argc, const char** argv);
+
/**
* Deinit method.
*/
/**
* Fill ESD for one event.
+ * Empty now, data written in Write() at the end of DumpEvent()
* @param eventNo event No. \em Note: this is an internal enumeration of the
* processed events.
* @param runLoader the AliRoot runloader
- * @param esd an AliESDEvent instance
* @return neg. error code if failed
*/
int FillESD(int eventNo, AliRunLoader* runLoader, AliESDEvent* esd);
+ /**
+ * Write the ecoded HLTOUT data to raw and digits files.
+ * Originally data was written in the FillESD function of the
+ * AliHLTOfflineInterface. Mainly for the sake of availability of the
+ * AliLoader. This concept has not turned out to be succesful and the
+ * development went a slightly different direction with the concept of
+ * HLTOUT handlers.
+ * 2010-04-14 change the original FillESD() to Write(), keep the body
+ * of the function
+ *
+ * @param eventNo event No. \em Note: this is an internal enumeration of the
+ * processed events.
+ * @param runLoader the AliRoot runloader
+ * @return neg. error code if failed
+ */
+ int Write(int eventNo, AliRunLoader* runLoader);
+
private:
/** copy constructor prohibited */
AliHLTOUTComponent(const AliHLTOUTComponent&);
/** global options for all instances */
static int fgOptions; //! transient
+ /// component options set from component type or global options at DoInit
+ int fOptions; //! transient
+
+ /** digit file name */
+ TString fDigitFileName; //! transient
+
/** the root file for the HLT 'digit' output */
TFile* fpDigitFile; //!transient
/** Data size kept in the internal buffer */
int fReservedData; //!transient
- ClassDef(AliHLTOUTComponent, 3)
+ /// type of the component
+ EType fType; //! type of the component
+
+ /// counter for round robin usage of HLTOUT links
+ int fRoundRobinCounter; //! counter for round robin usage of HLTOUT links
+
+ ClassDef(AliHLTOUTComponent, 0)
};
#endif