// $Id$
//**************************************************************************
-//* This file is property of and copyright by the ALICE HLT Project *
+//* This file is property of and copyright by the *
//* ALICE Experiment at CERN, All rights reserved. *
//* *
//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
/// @brief The HLTOUT data sink component similar to HLTOUT nodes
/// @note Used in the AliRoot environment only.
-#if __GNUC__>= 3
-using namespace std;
-#endif
-
#include <cassert>
//#include <iostream>
#include "AliHLTOUTComponent.h"
#include <TArrayC.h>
#include <TSystem.h>
+using namespace std;
+
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTOUTComponent)
AliHLTOUTComponent::AliHLTOUTComponent(EType type)
- : AliHLTOfflineDataSink()
+ : AliHLTDataSink()
, fWriters()
, fNofDDLs(10)
, fIdFirstDDL(7680) // 0x1e<<8
, fType(type)
, fRoundRobinCounter(0)
{
- // see header file for class documentation
- // or
- // refer to README to build package
- // or
- // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-
+ // The HLTOUT data sink component which models the behavior of the HLTOUT
+ // nodes of the HLT cluster.
+ // 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.
fIdFirstDDL=AliDAQ::DdlIDOffset("HLT");
fNofDDLs=AliDAQ::NumberOfDdls("HLT");
return NULL;
}
-void AliHLTOUTComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+void AliHLTOUTComponent::GetInputDataTypes( AliHLTComponentDataTypeList& list)
{
// overloaded from AliHLTComponent: indicate input data types
list.clear();
}
if (iResult>=0 && bIsDataEvent) {
- iResult=Write(GetEventCount(), GetRunLoader());
+ iResult=Write(GetEventCount());
}
if (fRoundRobinCounter>=0) {
return iResult;
}
-
-int AliHLTOUTComponent::FillESD(int /*eventNo*/, AliRunLoader* /*runLoader*/, AliESDEvent* /*esd*/)
-{
- // Nop. The data is written at the end of DumpEvent
- return 0;
-}
-
-int AliHLTOUTComponent::Write(int eventNo, AliRunLoader* runLoader)
+int AliHLTOUTComponent::Write(int eventNo)
{
// write digits and raw files for the current event
int iResult=0;
if (fReservedWriter>=0) {
if (fOptions&kWriteDigits) WriteDigitArray(fReservedWriter, &fBuffer[0], fReservedData);
- if (fOptions&kWriteRawFiles) WriteRawFile(eventNo, runLoader, fReservedWriter, &fBuffer[0], fReservedData);
+ if (fOptions&kWriteRawFiles) WriteRawFile(eventNo, fReservedWriter, &fBuffer[0], fReservedData);
fReservedData=0;
}
if (fOptions&kWriteDigits) WriteDigitArray(*ddlno, pBuffer, bufferSize);
if (fOptions&kWriteRawFiles &&
(fRoundRobinCounter<0 || fRoundRobinCounter==*ddlno))
- WriteRawFile(eventNo, runLoader, *ddlno, pBuffer, bufferSize);
+ WriteRawFile(eventNo, *ddlno, pBuffer, bufferSize);
}
fWriters[*ddlno]->Clear();
ddlno++;
}
- if (fOptions&kWriteDigits) WriteDigits(eventNo, runLoader);
+ if (fOptions&kWriteDigits) WriteDigits(eventNo);
return iResult;
}
return iResult;
}
-int AliHLTOUTComponent::WriteDigits(int /*eventNo*/, AliRunLoader* /*runLoader*/)
+int AliHLTOUTComponent::WriteDigits(int /*eventNo*/)
{
// fill tree with digit arrays and write to file
// all links must be written, even in round robin mode, where all links but one
return iResult;
}
-int AliHLTOUTComponent::WriteRawFile(int eventNo, AliRunLoader* /*runLoader*/, int hltddl, const AliHLTUInt8_t* pBuffer, unsigned int bufferSize)
+int AliHLTOUTComponent::WriteRawFile(int eventNo, int hltddl, const AliHLTUInt8_t* pBuffer, unsigned int bufferSize)
{
// write buffer to raw file in the current directory
// creates the event raw directories in the current directory
#ifndef ALIHLTOUTCOMPONENT_H
#define ALIHLTOUTCOMPONENT_H
-//* This file is property of and copyright by the ALICE HLT Project *
+//* This file is property of and copyright by the *
//* ALICE Experiment at CERN, All rights reserved. *
//* See cxx source for full Copyright notice *
/// @brief The HLTOUT data sink component similar to HLTOUT nodes.
/// @note Used in the AliRoot environment only.
-#include "AliHLTOfflineDataSink.h"
+#include "AliHLTDataSink.h"
class AliHLTHOMERLibManager;
class AliHLTMonitoringWriter;
*
* @ingroup alihlt_aliroot_simulation
*/
-class AliHLTOUTComponent : public AliHLTOfflineDataSink {
+class AliHLTOUTComponent : public AliHLTDataSink {
public:
/// type of the HLTOUT component
enum EType {
virtual ~AliHLTOUTComponent();
const char* GetComponentID();
- void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+ void GetInputDataTypes( AliHLTComponentDataTypeList& list);
AliHLTComponent* Spawn();
/**
using AliHLTDataSink::DumpEvent;
- /**
- * 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
- * @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
* @param runLoader the AliRoot runloader
* @return neg. error code if failed
*/
- int Write(int eventNo, AliRunLoader* runLoader);
+ int Write(int eventNo);
private:
/** copy constructor prohibited */
/**
* Write the digits for one DDL
* @param eventNo number of the event
- * @param runLoader AliRoot run loader instance
* @return neg. error if failed
*/
- int WriteDigits(int eventNo, AliRunLoader* runLoader);
+ int WriteDigits(int eventNo);
/**
* Write the raw file for one DDL
* @param eventNo number of the event
- * @param runLoader AliRoot run loader instance
* @param hltddl Number of DDL link within the range of HLT
* @param pBuffer buffer to write
* @param size size of the buffer
* @return neg. error if failed
*/
- int WriteRawFile(int eventNo, AliRunLoader* runLoader, int hltddl, const AliHLTUInt8_t* pBuffer, unsigned int size);
+ int WriteRawFile(int eventNo, int hltddl, const AliHLTUInt8_t* pBuffer, unsigned int size);
/** list of HOMER writers */
AliHLTMonitoringWriterPVector fWriters; //!transient