// $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> *
if (blockIndex<fBlockDescList.size()) {
return fBlockDescList[blockIndex].GetHandlerDesc();
}
- return const_cast<AliHLTOUT::AliHLTOUTHandlerListEntry&>(AliHLTOUT::AliHLTOUTHandlerListEntry::fgkVoidHandlerListEntry);
+ return const_cast<AliHLTOUT::AliHLTOUTHandlerListEntry&>(AliHLTOUT::AliHLTOUTHandlerListEntry::VoidHandlerListEntry());
}
AliHLTOUT::AliHLTOUTHandlerListEntry::AliHLTOUTHandlerListEntry()
return *fpHandlerDesc==desc;
}
-void AliHLTOUT::AliHLTOUTHandlerListEntry::AddIndex(AliHLTOUT::AliHLTOUTHandlerListEntry &desc)
+void AliHLTOUT::AliHLTOUTHandlerListEntry::AddIndex(const AliHLTOUT::AliHLTOUTHandlerListEntry &desc)
{
// add block index, a handler can serve multiple blocks
- AliHLTOUTIndexList::iterator element;
+ AliHLTOUTIndexList::const_iterator element;
for (element=desc.fBlocks.begin(); element!=desc.fBlocks.end(); element++) {
AddIndex(*element);
}
element++;
}
}
- return const_cast<AliHLTOUT::AliHLTOUTHandlerListEntry&>(AliHLTOUT::AliHLTOUTHandlerListEntry::fgkVoidHandlerListEntry);
+ return const_cast<AliHLTOUT::AliHLTOUTHandlerListEntry&>(AliHLTOUT::AliHLTOUTHandlerListEntry::VoidHandlerListEntry());
}
TObject* AliHLTOUT::GetDataObject()
#ifndef ALIHLTOUT_H
#define ALIHLTOUT_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 *
/** standard destructor */
virtual ~AliHLTOUT();
+ typedef const AliHLTUInt8_t* AliConstExternalBuffer;
+
/**
* Create an AliHLTOUTRawReader instance.
* Helper function to transparently access classes from the
~AliHLTOUTHandlerListEntry();
- static const AliHLTOUTHandlerListEntry fgkVoidHandlerListEntry; //! initializer
+ static const AliHLTOUTHandlerListEntry& VoidHandlerListEntry() {return fgkVoidHandlerListEntry;}
operator AliHLTOUTHandler*() const {return fpHandler;}
/**
* Add all indices of the descriptor.
*/
- void AddIndex(AliHLTOUTHandlerListEntry &desc);
+ void AddIndex(const AliHLTOUTHandlerListEntry &desc);
/**
* Check if an index is served by this descriptor.
/** standard constructor prohibited */
AliHLTOUTHandlerListEntry();
+ static const AliHLTOUTHandlerListEntry fgkVoidHandlerListEntry; //! initializer
+
/** pointer to the handler */
AliHLTOUTHandler* fpHandler; //! transient
/**
* Get the current event id
*/
- AliHLTUInt64_t EventId() {return fCurrentEventId;}
+ AliHLTUInt64_t EventId() const {return fCurrentEventId;}
/**
* Get number of data blocks in the HLTOUT data
/**
* Print output or suppress.
*/
- bool BeVerbose() {return fbVerbose;}
+ bool BeVerbose() const {return fbVerbose;}
/**
* Switch output.
unsigned int fCurrent; //!transient
/** data buffer under processing */
- const AliHLTUInt8_t* fpBuffer; //!transient
+ AliConstExternalBuffer fpBuffer; //!transient
/** list of AliHLTOUTHandlers */
AliHLTOUTHandlerListEntryVector fDataHandlers; // !transient
/** current buffer converted to a TObject */
TObject* fpDataObject; //!
- const AliHLTUInt8_t* fpObjectBuffer; //!
+ AliConstExternalBuffer fpObjectBuffer; //!
AliHLTUInt32_t fObjectBufferSize; //!
/** current event id */
// $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> *
//* provided "as is" without express or implied warranty. *
//**************************************************************************
-/** @file AliHLTOUTHandler.cxx
- @author Matthias Richter
- @date
- @brief Base class implementation of HLTOUT handlers.
-*/
+/// @file AliHLTOUTHandler.cxx
+/// @author Matthias Richter
+/// @date
+/// @brief Base class implementation of HLTOUT handlers.
+///
#include "AliHLTOUTHandler.h"
:
fState(kHandlerOK)
{
- // see header file for class documentation
- // or
- // refer to README to build package
- // or
- // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+ // Base class declaration of HLT output handlers.
+ // The library implementation of the AliHLTModuleAgent allows to generate
+ // handlers for data blocks of the HLT output. This can be the output of
+ // the real HLT coming from the HLTOUT nodes, or simulated HLT output.
+ // Note: The created instance of AliHLTOUTHandler is deleted by the framework.
}
AliHLTOUTHandler::~AliHLTOUTHandler()
{
- // see header file for class documentation
+ // destructor
}
int AliHLTOUTHandler::GetProcessedData(const AliHLTUInt8_t* &pData)
{
- // see header file for class documentation
+ // get pointer to processed data
pData=NULL;
return 0;
}
int AliHLTOUTHandler::ReleaseProcessedData(const AliHLTUInt8_t* /*pData*/, int /*size*/)
{
- // see header file for class documentation
+ // release the data pointer previously retrieved by GetProcessedData
return 0;
}
int AliHLTOUTHandler::FinishEvent()
{
- // see header file for class documentation
+ // cleanup the current event processing.
return 0;
}
//-*- Mode: C++ -*-
-// @(#) $Id$
+// $Id$
#ifndef ALIHLTOUTHANDLER_H
#define ALIHLTOUTHANDLER_H
-/* This file is property of and copyright by the ALICE HLT Project *
- * ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-/** @file AliHLTOUTHandler.h
- @author Matthias Richter
- @date
- @brief Base class declaration of HLTOUT handlers
-
-// see below for class documentation
-// or
-// refer to README to build package
-// or
-// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
- */
+///* This file is property of and copyright by the *
+///* ALICE Experiment at CERN, All rights reserved. *
+///* See cxx source for full Copyright notice *
+
+/// @file AliHLTOUTHandler.h
+/// @author Matthias Richter
+/// @date
+/// @brief Base class declaration of HLTOUT handlers
+
#include "AliHLTLogging.h"
class AliHLTOUT;
* Check state flag of the handler.
* @return true if flag matches
*/
- bool CheckStatus(unsigned int flag) {
+ bool CheckStatus(unsigned int flag) const {
return (fState&flag)!=0;
}
// $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> *
//* provided "as is" without express or implied warranty. *
//**************************************************************************
-/** @file AliHLTOUTHandlerChain.cxx
- @author Matthias Richter
- @date 24.06.2008
- @brief HLTOUT handler of type kChain.
-*/
+/// @file AliHLTOUTHandlerChain.cxx
+/// @author Matthias Richter
+/// @date 24.06.2008
+/// @brief HLTOUT handler of type kChain.
+///
#include "AliHLTOUTHandlerChain.h"
#include "AliHLTOUT.h"
fpSystem(NULL),
fbHaveOutput(false)
{
- // 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 handler implements the kChain processing of HLTOUT data.
+ // The ids of the chains to be run during processing are provided
+ // as parameter to the constructor. The AliHLTModuleAgent
+ // can just create a new instance and specify the chains in order
+ // to define the HLTOUT handling of type kChain for a certain data
+ // block. The same instance can be returned for multiple data blocks.
+ // The handler will run once on all data blocks.
if (arguments) {
TString args=arguments;
TObjArray* pTokens=args.Tokenize(" ");
AliHLTOUTHandlerChain::~AliHLTOUTHandlerChain()
{
- // see header file for class documentation
+ // destructor
if (fpSystem) {
// TODO: the EOR is currenttly not send because the reconstruction
// chian is not stopped. Trying it here gives an error, there is
int AliHLTOUTHandlerChain::ProcessData(AliHLTOUT* pData)
{
- // see header file for class documentation
+ // data processing function
if (!pData) return -EINVAL;
int iResult=0;
int AliHLTOUTHandlerChain::InitSystem()
{
- // see header file for class documentation
+ // initialize the AliHLTSystem instance
int iResult=0;
if (!fpSystem) {
// init AliHLTSystem
#ifndef ALIHLTOUTHANDLERCHAIN_H
#define ALIHLTOUTHANDLERCHAIN_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 *
-/** @file AliHLTOUTHandlerChain.h
- @author Matthias Richter
- @date 24.06.2008
- @brief HLTOUT handler of type kChain.
-*/
+/// @file AliHLTOUTHandlerChain.h
+/// @author Matthias Richter
+/// @date 24.06.2008
+/// @brief HLTOUT handler of type kChain.
+///
#include "AliHLTOUTHandler.h"
#include "TString.h"
// $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> *
//* provided "as is" without express or implied warranty. *
//**************************************************************************
-/** @file AliHLTOUTHandlerDetectorDDL.cxx
- @author Matthias Richter
- @date 2008-09-09
- @brief HLTOUT handler returning equipment id from data type and spec.
-*/
+/// @file AliHLTOUTHandlerDetectorDDL.cxx
+/// @author Matthias Richter
+/// @date 2008-09-09
+/// @brief HLTOUT handler returning equipment id from data type and spec.
+///
#include "AliHLTOUTHandlerDetectorDDL.h"
#include "AliHLTOUT.h"
fNumberOfDDLs(-1),
fDt(dt)
{
- // see header file for class documentation
- // or
- // refer to README to build package
- // or
- // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+ // A default handler class for DDL raw data redirection handlers.
+ //
+ // This class implements an AliHLTOUTHandlerEquId which extracts the
+ // equipment Id from the bit pattern in the specification. All detectors
+ // with up to 32 DDL links follow this convention. The bit no in the
+ // data specification word corresponds to the DDL number within the
+ // sub-detector.
fDDLOffset=AliHLTDAQ::DdlIDOffset(detector);
fNumberOfDDLs=AliHLTDAQ::NumberOfDdls(detector);
AliHLTOUTHandlerDetectorDDL::~AliHLTOUTHandlerDetectorDDL()
{
- // see header file for class documentation
+ // destructor
}
int AliHLTOUTHandlerDetectorDDL::ProcessData(AliHLTOUT* pData)
{
- // see header file for class documentation
+ // extract the ddl no from the data specification of the data
+ // block and return it
+ // negative error code if failed
if (!pData) return -EINVAL;
if (fDDLOffset<0 || fNumberOfDDLs<0) return -ENODEV;
#ifndef ALIHLTOUTHANDLERDETECTORDDL_H
#define ALIHLTOUTHANDLERDETECTORDDL_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 *
-/** @file AliHLTOUTHandlerDetectorDDL.h
- @author Matthias Richter
- @date 2008-09-09
- @brief Default HLTOUT handler returning equipment id from data type and
- bit pattern in spec.
-*/
+/// @file AliHLTOUTHandlerDetectorDDL.h
+/// @author Matthias Richter
+/// @date 2008-09-09
+/// @brief Default HLTOUT handler returning equipment id from data type and
+/// bit pattern in spec.
#include "AliHLTOUTHandlerEquId.h"
// $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> *
AliHLTOUTHandlerEquId::AliHLTOUTHandlerEquId()
{
- // see header file for class documentation
- // or
- // refer to README to build package
- // or
- // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+ // Base class for DDL raw data redirection handlers.
+ //
+ // HLTOUT handlers of this type are used for the replacement of detector
+ // reconstruction input by the corresponding data from the HLT output.
+ // From the data type and specification of an HLT output block the
+ // corresponding equipment id of the original detector streams is determined.
}
AliHLTOUTHandlerEquId::~AliHLTOUTHandlerEquId()
{
- // see header file for class documentation
+ // destructor
}
int AliHLTOUTHandlerEquId::ProcessData(AliHLTOUT* pData)
{
- // see header file for class documentation
+ // process data
if (!pData) return -EINVAL;
AliHLTComponentDataType dt=kAliHLTVoidDataType;
AliHLTUInt32_t spec=kAliHLTVoidDataSpec;
#ifndef ALIHLTOUTHANDLEREQUID_H
#define ALIHLTOUTHANDLEREQUID_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 *
-/** @file AliHLTOUTHandlerEquId.h
- @author Matthias Richter
- @date
- @brief HLTOUT handler returning equipment id from data type and spec.
-*/
+/// @file AliHLTOUTHandlerEquId.h
+/// @author Matthias Richter
+/// @date
+/// @brief HLTOUT handler returning equipment id from data type and spec.
+///
#include "AliHLTOUTHandler.h"
// $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> *
, fSize(0)
, fManager(NULL)
{
- // 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 handler extracts objects from HLTOUT data blocks or converts
+ // data to objects to be added to hltEsd branches. The default implementation
+ // covers the first case right away, the class can be used directly for single
+ // objects streamed to the HLTOUT.
+ //
+ // The handler produces a partial ESD containing the data objects. The framework
+ // merges all the different partial ESDs in the AliHLTEsdManager, respectively the
+ // specific implementation AliHLTEsdManagerImplementation.
}
AliHLTOUTHandlerEsdBranch::~AliHLTOUTHandlerEsdBranch()
{
- // see header file for class documentation
+ // destructor
if (fESD) fManager->DestroyEsdEvent(fESD);
fESD=NULL;
if (fpData) delete fpData;
int AliHLTOUTHandlerEsdBranch::ProcessData(AliHLTOUT* pData)
{
- // see header file for class documentation
+ // data processing function
if (!pData) return -EINVAL;
int iResult=0;
int AliHLTOUTHandlerEsdBranch::GetProcessedData(const AliHLTUInt8_t* &pData)
{
- // see header file for class documentation
+ // get processed data
if (!fpData) {
pData=NULL;
return 0;
int AliHLTOUTHandlerEsdBranch::ReleaseProcessedData(const AliHLTUInt8_t* pData, int size)
{
- // see header file for class documentation
+ // release pointer instance
int iResult=0;
if (!fpData || size != fSize ||
const_cast<AliHLTUInt8_t*>(pData) != reinterpret_cast<AliHLTUInt8_t*>(fpData->GetArray())) {
#ifndef ALIHLTOUTHANDLERESDBRANCH_H
#define ALIHLTOUTHANDLERESDBRANCH_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 *
* The method ExtractAndAddObjects() has to loop over all input blocks and
* provide an appropriate conversion. If the data block simply contains a
* streamed object it just needs to be extracted and added to the ESD using
- * the function Add(). Thhis case is covered by the default implementation.
+ * the function Add(). This case is covered by the default implementation.
* Child classes can overload ExtractAndAddObjects() if there is further
* conversion/formatting required.
*