//#include <Riostream.h>
#include <TSystem.h>
#endif //HAVE_DLFCN_H
-#include "AliHLTStdIncludes.h"
+//#include "AliHLTStdIncludes.h"
#include "AliHLTComponentHandler.h"
#include "AliHLTComponent.h"
#include "AliHLTDataTypes.h"
-#include "AliHLTSystem.h"
+//#include "AliHLTSystem.h"
+#include "TString.h"
// the standard components
// #include "AliHLTFilePublisher.h"
AddStandardComponents();
}
+AliHLTComponentHandler::AliHLTComponentHandler(const AliHLTComponentHandler&)
+ :
+ fComponentList(),
+ fScheduleList(),
+ fLibraryList(),
+ fEnvironment(),
+ fStandardList()
+{
+ // see header file for class documentation
+ HLTFatal("copy constructor untested");
+}
+
+AliHLTComponentHandler& AliHLTComponentHandler::operator=(const AliHLTComponentHandler&)
+{
+ // see header file for class documentation
+ HLTFatal("assignment operator untested");
+ return *this;
+}
+
AliHLTComponentHandler::~AliHLTComponentHandler()
{
// see header file for class documentation
int AliHLTComponentHandler::DeregisterComponent( const char* componentID )
{
// see header file for class documentation
+
int iResult=0;
if (componentID) {
+ HLTWarning("not yet implemented, please notify the developers if you need this function");
} else {
iResult=-EINVAL;
}
const char* loadtype="";
#ifdef HAVE_DLFCN_H
// use interface to the dynamic linking loader
- hLib.handle=dlopen(libraryPath, RTLD_NOW);
+ hLib.fHandle=dlopen(libraryPath, RTLD_NOW);
loadtype="dlopen";
#else
// use ROOT dynamic loader
// 'failure' if the library was already loaded
AliHLTLibHandle* pLib=FindLibrary(libraryPath);
if (pLib) {
- int* pRootHandle=reinterpret_cast<int*>(pLib->handle);
+ int* pRootHandle=reinterpret_cast<int*>(pLib->fHandle);
(*pRootHandle)++;
HLTDebug("instance %d of library %s loaded", (*pRootHandle), libraryPath);
- hLib.handle=pRootHandle;
+ hLib.fHandle=pRootHandle;
}
- if (hLib.handle==NULL && gSystem->Load(libraryPath)==0) {
+ if (hLib.fHandle==NULL && gSystem->Load(libraryPath)==0) {
int* pRootHandle=new int;
if (pRootHandle) *pRootHandle=1;
- hLib.handle=pRootHandle;
+ hLib.fHandle=pRootHandle;
//HLTDebug("library %s loaded via gSystem", libraryPath);
}
loadtype="gSystem";
#endif //HAVE_DLFCN_H
- if (hLib.handle!=NULL) {
+ if (hLib.fHandle!=NULL) {
// create TString object to store library path and use pointer as handle
- hLib.name=new TString(libraryPath);
+ hLib.fName=new TString(libraryPath);
HLTInfo("library %s loaded (%s)", libraryPath, loadtype);
fLibraryList.insert(fLibraryList.begin(), hLib);
iResult=RegisterScheduledComponents();
if (libraryPath) {
vector<AliHLTLibHandle>::iterator element=fLibraryList.begin();
while (element!=fLibraryList.end()) {
- TString* pName=reinterpret_cast<TString*>((*element).name);
+ TString* pName=reinterpret_cast<TString*>((*element).fName);
if (pName->CompareTo(libraryPath)==0) {
UnloadLibrary(*element);
fLibraryList.erase(element);
// see header file for class documentation
int iResult=0;
fgAliLoggingFunc=NULL;
- TString* pName=reinterpret_cast<TString*>(handle.name);
+ TString* pName=reinterpret_cast<TString*>(handle.fName);
#ifdef HAVE_DLFCN_H
- dlclose(handle.handle);
+ dlclose(handle.fHandle);
#else
- int* pCount=reinterpret_cast<int*>(handle.handle);
+ int* pCount=reinterpret_cast<int*>(handle.fHandle);
if (--(*pCount)==0) {
if (pName) {
/** Matthias 26.04.2007
delete pCount;
}
#endif //HAVE_DLFCN_H
- handle.name=NULL;
- handle.handle=NULL;
+ handle.fName=NULL;
+ handle.fHandle=NULL;
if (pName) {
HLTDebug("unload library %s", pName->Data());
delete pName;
if (hLib==NULL) return NULL;
void* pFunc=NULL;
#ifdef HAVE_DLFCN_H
- pFunc=dlsym(hLib->handle, symbol);
+ pFunc=dlsym(hLib->fHandle, symbol);
#else
- TString* name=reinterpret_cast<TString*>(hLib->name);
+ TString* name=reinterpret_cast<TString*>(hLib->fName);
pFunc=gSystem->DynFindSymbol(name->Data(), symbol);
#endif
return pFunc;
AliHLTLibHandle* hLib=NULL;
vector<AliHLTLibHandle>::iterator element=fLibraryList.begin();
while (element!=fLibraryList.end()) {
- TString* name=reinterpret_cast<TString*>((*element).name);
+ TString* name=reinterpret_cast<TString*>((*element).fName);
if (name->CompareTo(library)==0) {
hLib=&(*element);
break;
int iResult=0;
vector<AliHLTComponent*>::iterator element=fStandardList.begin();
while (element!=fStandardList.end()) {
- DeregisterComponent((*element)->GetComponentID());
+ //DeregisterComponent((*element)->GetComponentID());
delete(*element);
fStandardList.erase(element);
element=fStandardList.begin();
#include <vector>
-#include "TObject.h"
+//#include "TObject.h"
#include "AliHLTDataTypes.h"
#include "AliHLTLogging.h"
AliHLTComponentHandler();
/** constructor */
AliHLTComponentHandler(AliHLTComponentEnvironment* pEnv);
+ /** not a valid copy constructor, defined according to effective C++ style */
+ AliHLTComponentHandler(const AliHLTComponentHandler&);
+ /** not a valid assignment op, but defined according to effective C++ style */
+ AliHLTComponentHandler& operator=(const AliHLTComponentHandler&);
/** destructor */
virtual ~AliHLTComponentHandler();
* Compount descriptor for component libraries
*/
struct AliHLTLibHandle {
- AliHLTLibHandle() : handle(NULL), name(NULL) {}
+ AliHLTLibHandle() : fHandle(NULL), fName(NULL) {}
/** dlopen handle */
- void* handle; //! transient
+ void* fHandle; //! transient
/** name of the library, casted to TString* before use */
- void* name; //! transient
+ void* fName; //! transient
};
/**
#include <vector>
#include "AliHLTLogging.h"
#include "AliHLTDataTypes.h"
-//#include "AliHLTDefinitions.h"
#include "TObject.h"
-//#include "TList.h"
class AliHLTComponent;
class AliHLTConsumerDescriptor;
* @brief Descriptor of a data segment within the buffer.
*/
class AliHLTDataSegment {
+ friend class AliHLTDataBuffer;
+ friend class AliHLTConsumerDescriptor;
public:
AliHLTDataSegment()
:
{
memset(&fDataType, 0, sizeof(AliHLTComponentDataType));
}
+ private:
/** the data type of this segment */
AliHLTComponentDataType fDataType; // see above
/** offset in byte within the data buffer */
* @brief Descriptor of the raw data buffer which can host several segments.
*/
class AliHLTRawBuffer {
+ friend class AliHLTDataBuffer;
public:
/** standard constructor */
AliHLTRawBuffer() : fSize(0), fTotalSize(0), fPtr(NULL) {}
/** not a valid copy constructor, defined according to effective C++ style */
AliHLTRawBuffer(const AliHLTRawBuffer&) : fSize(0), fTotalSize(0), fPtr(NULL) {}
/** not a valid assignment op, but defined according to effective C++ style */
- AliHLTRawBuffer& operator=(const AliHLTRawBuffer&) {return *this;}
+ AliHLTRawBuffer& operator=(const AliHLTRawBuffer&) {return *this;}
/** standard destructor */
virtual ~AliHLTRawBuffer() {}
+ private:
/** size of the currently occupied partition of the buffer */
AliHLTUInt32_t fSize; // see above
/** total size of the buffer, including safety margin */
#include "AliHLTFileWriter.h"
#include <TObjArray.h>
#include <TObjString.h>
-#include <TMath.h>
-#include <TFile.h>
+//#include <TMath.h>
+//#include <TFile.h>
/** the global object for component registration */
AliHLTFileWriter gAliHLTFileWriter;
int AliHLTFileWriter::InitWriter()
{
// see header file for class documentation
+
+ // fCurrentFileName is used in dump event, just touched her to avoid
+ // coding convention violation RC11. The function can not be declared
+ // const since it is just the default implementation, overloaded
+ // virtual function might not be const
+ fCurrentFileName="";
return 0; // note: this doesn't mean 'error'
}
if (argc==0 && argv==NULL) {
// this is just to get rid of the warning "unused parameter"
}
+ // fCurrentFileName is used in dump event, just touched her to avoid
+ // coding convention violation RC11. The function can not be declared
+ // const since it is just the default implementation, overloaded
+ // virtual function might not be const
+ fCurrentFileName="";
return -EINVAL;
}
int AliHLTFileWriter::CloseWriter()
{
// see header file for class documentation
+
+ // fCurrentFileName is used in dump event, just touched her to avoid
+ // coding convention violation RC11. The function can not be declared
+ // const since it is just the default implementation, overloaded
+ // virtual function might not be const
+ fCurrentFileName="";
return 0; // note: this doesn't mean 'error'
}
return fMode;
}
-int AliHLTFileWriter::CheckMode(Short_t mode)
+int AliHLTFileWriter::CheckMode(Short_t mode) const
{
// see header file for class documentation
*/
#include "AliHLTDataSink.h"
-#include <TList.h>
+#include <TString.h>
+//#include <TList.h>
/**
* @class AliHLTFileWriter
* Check a mode flag.
* @return 1 if flag is set, 0 if not
*/
- int CheckMode(Short_t mode);
+ int CheckMode(Short_t mode) const;
/**
* Working modes of the writer
*/
#include "AliHLTFileWriter.h"
-#include "TObject.h"
+//#include "TObject.h"
class TFile;
/** not a valid assignment op, but defined according to effective C++ style */
AliHLTRootFileWriterComponent& operator=(const AliHLTRootFileWriterComponent&);
/** destructor */
- ~AliHLTRootFileWriterComponent();
+ virtual ~AliHLTRootFileWriterComponent();
/**
* The id of the component.
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+#include "AliHLTTPCSpacePointData.h"
+
/* AliHLTTPCClusterData
*/
-
struct AliHLTTPCClusterData
{
AliHLTUInt32_t fSpacePointCnt;
// Public functions to implement AliHLTComponent's interface.
// These functions are required for the registration process
- const char* GetComponentID();
- void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
- AliHLTComponentDataType GetOutputDataType();
- virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
- AliHLTComponent* Spawn();
+ /** interface function, see @ref AliHLTComponent for description */
+ const char* GetComponentID();
+ /** interface function, see @ref AliHLTComponent for description */
+ void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+ /** interface function, see @ref AliHLTComponent for description */
+ AliHLTComponentDataType GetOutputDataType();
+ /** interface function, see @ref AliHLTComponent for description */
+ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+ /** interface function, see @ref AliHLTComponent for description */
+ AliHLTComponent* Spawn();
protected:
fFirstRow(0),
fLastRow(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
}
AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked(const AliHLTTPCDigitReaderUnpacked& src)
fFirstRow(0),
fLastRow(0)
{
+ // see header file for class documentation
HLTFatal("copy constructor not for use");
}
AliHLTTPCDigitReaderUnpacked& AliHLTTPCDigitReaderUnpacked::operator=(const AliHLTTPCDigitReaderUnpacked& src)
{
+ // see header file for class documentation
fDigitRowData=NULL;
fActRowData=NULL;
fData=NULL;
}
AliHLTTPCDigitReaderUnpacked::~AliHLTTPCDigitReaderUnpacked(){
+ // see header file for class documentation
}
int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice){
- AliHLTTPCUnpackedRawData *tmpptr;
+ // see header file for class documentation
+ AliHLTTPCUnpackedRawData *tmpptr=NULL;
fPtr = ptr;
fSize = size;
}
bool AliHLTTPCDigitReaderUnpacked::Next(){
+ // see header file for class documentation
bool rreadvalue = true;
fBin++;
}
int AliHLTTPCDigitReaderUnpacked::GetRow(){
+ // see header file for class documentation
int rrow;
rrow = fRow;
return rrow;
}
int AliHLTTPCDigitReaderUnpacked::GetPad(){
+ // see header file for class documentation
int rpad;
rpad = (int)fData[fBin].fPad;
return rpad ;
}
int AliHLTTPCDigitReaderUnpacked::GetSignal(){
+ // see header file for class documentation
int rsignal;
rsignal = (int)fData[fBin].fCharge;
return rsignal;
}
int AliHLTTPCDigitReaderUnpacked::GetTime(){
+ // see header file for class documentation
int rtime;
rtime = (int)fData[fBin].fTime;
return rtime;
AliHLTTPCDigitReaderUnpacked& operator=(const AliHLTTPCDigitReaderUnpacked&);
/** destructor */
virtual ~AliHLTTPCDigitReaderUnpacked();
-
+
+ /**
+ * Init the reader
+ * @param ptr pointer to input buffer
+ * @param size size of the input buffer
+ * @param patch readout partition
+ * @param slice sector no
+ */
int InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice);
+
+ /**
+ * place the reader at the next signal
+ * @return 1 if there was a nest signal, 0 if not
+ */
bool Next();
+
+ /**
+ * Get row number of the current signal
+ * @return row number of the current signal
+ */
int GetRow();
+
+ /**
+ * Get pad number of the current signal
+ * @return pad number of the current signal
+ */
int GetPad();
+
+ /**
+ * Get signal
+ * @return ADC signal
+ */
int GetSignal();
+
+ /**
+ * Get time of the current signal
+ * @return time of the current signal
+ */
int GetTime();
protected:
private:
+ /** intermediate row data structure (pointer in fPtr buffer) */
AliHLTTPCDigitRowData *fDigitRowData; //!
+ /** current row data structure (pointer in fPtr buffer) */
AliHLTTPCDigitRowData *fActRowData; //!
+ /** the current digit data */
AliHLTTPCDigitData *fData; //!
+
+ /** input buffer */
void* fPtr; //!
- unsigned long fSize;
- Int_t fBin;
- Int_t fRow;
- Int_t fFirstRow;
- Int_t fLastRow;
+ /** size of the input buffer */
+ unsigned long fSize; // see above
+
+ /** current bin */
+ Int_t fBin; // see above
+ /** current row */
+ Int_t fRow; // see above
+ /** first row */
+ Int_t fFirstRow; // see above
+ /** last row */
+ Int_t fLastRow; // see above
ClassDef(AliHLTTPCDigitReaderUnpacked, 0)
};
const char* AliHLTTPCLog::Flush()
{
+ // see header file for class documentation
int severity=0;
string origin("");
string keyword("");
#include "AliHLTTPCTransform.h"
#include "AliHLTTPCConfMapper.h"
#include "AliHLTTPCVertex.h"
-#include "AliHLTTPCSpacePointData.h"
#include "AliHLTTPCVertexData.h"
#include "AliHLTTPCClusterDataFormat.h"
#include "AliHLTTPCTransform.h"
#include "AliHLTTPCTrackletDataFormat.h"
#include "AliHLTTPCInterMerger.h"
#include "AliHLTTPCMemHandler.h"
+#include "AliHLTTPCDefinitions.h"
//#include "AliHLTTPC.h"
-#include <stdlib.h>
-#include <errno.h>
+//#include <stdlib.h>
+//#include <cerrno>
// this is a global object used for automatic component registration, do not use this
AliHLTTPCSliceTrackerComponent gAliHLTTPCSliceTrackerComponent;
+/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTTPCSliceTrackerComponent)
AliHLTTPCSliceTrackerComponent::AliHLTTPCSliceTrackerComponent()
AliHLTTPCSliceTrackerComponent::~AliHLTTPCSliceTrackerComponent()
{
+ // see header file for class documentation
}
// Public functions to implement AliHLTComponent's interface.
const char* AliHLTTPCSliceTrackerComponent::GetComponentID()
{
+ // see header file for class documentation
return "TPCSliceTracker";
}
void AliHLTTPCSliceTrackerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
+ // see header file for class documentation
list.clear();
list.push_back( AliHLTTPCDefinitions::fgkClustersDataType );
list.push_back( AliHLTTPCDefinitions::fgkVertexDataType );
AliHLTComponentDataType AliHLTTPCSliceTrackerComponent::GetOutputDataType()
{
+ // see header file for class documentation
return AliHLTTPCDefinitions::fgkTrackSegmentsDataType;
}
void AliHLTTPCSliceTrackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
{
+ // see header file for class documentation
// XXX TODO: Find more realistic values.
constBase = 0;
inputMultiplier = 0.2;
AliHLTComponent* AliHLTTPCSliceTrackerComponent::Spawn()
{
+ // see header file for class documentation
return new AliHLTTPCSliceTrackerComponent;
}
Double_t goodHitChi2, Double_t trackChi2Cut,
Int_t maxdist, Double_t maxphi,Double_t maxeta, bool vertexConstraints )
{
+ // see header file for class documentation
//fTracker->SetClusterFinderParam( fXYClusterError, fZClusterError, kTRUE ); // ??
//Set parameters input to the tracker
//If no arguments are given, default parameters will be used
int AliHLTTPCSliceTrackerComponent::DoInit( int argc, const char** argv )
{
+ // see header file for class documentation
Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "DoInit", "DoInit()" );
if ( fTracker || fVertex )
int AliHLTTPCSliceTrackerComponent::DoDeinit()
{
+ // see header file for class documentation
if ( fTracker )
delete fTracker;
fTracker = NULL;
AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
{
+ // see header file for class documentation
Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "DoEvent", "DoEvent()" );
if ( evtData.fBlockCnt<=0 )
{
fpInterMerger->Merge();
}
ntracks0=0;
- mysize = fTracker->GetTracks()->WriteTracks( ntracks0, outPtr->fTracklets );
+ AliHLTTPCTrackArray* pArray=fTracker->GetTracks();
+ mysize = pArray->WriteTracks( ntracks0, outPtr->fTracklets );
outPtr->fTrackletCnt = ntracks0;
Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracks",
return 0;
}
+void AliHLTTPCSliceTrackerComponent::SetTrackerParam1()
+{
+ SetTrackerParam( 10, 20, 5, 10, 2,2,
+ 0, 1.31, 5, 100,
+ 50, 100, 50, 0.1, 0.1,
+ true );
+}
+
*/
#include "AliHLTProcessor.h"
-#include "AliHLTTPCDefinitions.h"
class AliHLTTPCConfMapper;
class AliHLTTPCVertex;
/** destructor */
virtual ~AliHLTTPCSliceTrackerComponent();
- // Public functions to implement AliHLTComponent's interface.
- // These functions are required for the registration process
+ // Public functions to implement AliHLTComponent's interface.
+ // These functions are required for the registration process
- const char* GetComponentID();
- void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
- AliHLTComponentDataType GetOutputDataType();
- virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
- AliHLTComponent* Spawn();
+ /** interface function, see @ref AliHLTComponent for description */
+ const char* GetComponentID();
+ /** interface function, see @ref AliHLTComponent for description */
+ void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+ /** interface function, see @ref AliHLTComponent for description */
+ AliHLTComponentDataType GetOutputDataType();
+ /** interface function, see @ref AliHLTComponent for description */
+ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+ /** interface function, see @ref AliHLTComponent for description */
+ AliHLTComponent* Spawn();
protected:
-
- void SetTrackerParam(Int_t phiSegments=50,Int_t etaSegments=100,
- Int_t trackletlength=3,Int_t tracklength=5,
- Int_t rowscopetracklet=2,Int_t rowscopetrack=3,
- Double_t minPtFit=0,Double_t maxangle=1.31,
- Double_t goodDist=5,Double_t hitChi2Cut=10,
- Double_t goodHitChi2=20,Double_t trackChi2Cut=50,
- Int_t maxdist=50,Double_t maxphi=0.1,Double_t maxeta=0.1,
- bool vertexconstraint=true);
- void SetTrackerParam( bool doPP, int multiplicity, double bField );
- void SetTrackerParam1()
- {
- SetTrackerParam( 10, 20, 5, 10, 2,2,
- 0, 1.31, 5, 100,
- 50, 100, 50, 0.1, 0.1,
- true );
- }
-
- // Protected functions to implement AliHLTComponent's interface.
- // These functions provide initialization as well as the actual processing
- // capabilities of the component.
-
- int DoInit( int argc, const char** argv );
- int DoDeinit();
- int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
- AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
- AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
-
+
+ /**
+ * Set Tracker parameters
+ * Knowledge on that has been lost, so somebody has to insert more
+ * documentation.
+ */
+ void SetTrackerParam(Int_t phiSegments=50,Int_t etaSegments=100,
+ Int_t trackletlength=3,Int_t tracklength=5,
+ Int_t rowscopetracklet=2,Int_t rowscopetrack=3,
+ Double_t minPtFit=0,Double_t maxangle=1.31,
+ Double_t goodDist=5,Double_t hitChi2Cut=10,
+ Double_t goodHitChi2=20,Double_t trackChi2Cut=50,
+ Int_t maxdist=50,Double_t maxphi=0.1,Double_t maxeta=0.1,
+ bool vertexconstraint=true);
+
+ /**
+ * Set Tracker parameters
+ * Knowledge on that has been lost, so somebody has to insert more
+ * documentation.
+ */
+ void SetTrackerParam( bool doPP, int multiplicity, double bField );
+
+ /**
+ * Set default tracker parameters
+ * Knowledge on that has been lost, so somebody has to insert more
+ * documentation.
+ */
+ void SetTrackerParam1();
+
+ // Protected functions to implement AliHLTComponent's interface.
+ // These functions provide initialization as well as the actual processing
+ // capabilities of the component.
+
+ /** interface function, see @ref AliHLTComponent for description */
+ int DoInit( int argc, const char** argv );
+ /** interface function, see @ref AliHLTComponent for description */
+ int DoDeinit();
+ /** interface function, see @ref AliHLTComponent for description */
+ int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+
private:
/** instance of the tracker */