+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDAGENT_H
#define ALIHLTTRDAGENT_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+//* 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 AliHLTTRDAgent.h
@author Matthias Richter
#include <cerrno>
#include <string>
-// this is a global object used for automatic component registration, do not use this
-AliHLTTRDCalibrationComponent gAliHLTTRDCalibrationComponent;
-
ClassImp(AliHLTTRDCalibrationComponent);
-AliHLTTRDCalibrationComponent::AliHLTTRDCalibrationComponent():
- AliHLTCalibrationProcessor(),
+AliHLTTRDCalibrationComponent::AliHLTTRDCalibrationComponent()
+: AliHLTCalibrationProcessor(),
fTRDCalibraFillHisto(NULL),
- fOutputPercentage(100) // By default we copy to the output exactly what we got as input
+ fOutputSize(50000),
+ fTracksArray(NULL),
+ fOutArray(NULL),
+ fNevent(0),
+ feveryNevent(20),
+ fRecievedTimeBins(kFALSE)
{
// Default constructor
}
AliHLTTRDCalibrationComponent::~AliHLTTRDCalibrationComponent()
{
// Destructor
- ;
}
const char* AliHLTTRDCalibrationComponent::GetComponentID()
return "TRDCalibration"; // The ID of this component
}
-void AliHLTTRDCalibrationComponent::GetInputDataTypes( vector<AliHLTComponent_DataType>& list)
+void AliHLTTRDCalibrationComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
// Get the list of input data
list.clear(); // We do not have any requirements for our input data type(s).
- list.push_back( AliHLTTRDDefinitions::fgkTRDSATracksDataType );
+ list.push_back(AliHLTTRDDefinitions::fgkTRDSATracksDataType);
}
-AliHLTComponent_DataType AliHLTTRDCalibrationComponent::GetOutputDataType()
+AliHLTComponentDataType AliHLTTRDCalibrationComponent::GetOutputDataType()
{
// Get the output data type
return AliHLTTRDDefinitions::fgkCalibrationDataType;
void AliHLTTRDCalibrationComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
{
// Get the output data size
- constBase = 0;
- inputMultiplier = ((double)fOutputPercentage)/100.0;
+ constBase = fOutputSize;
+ inputMultiplier = 0;
}
AliHLTComponent* AliHLTTRDCalibrationComponent::Spawn()
while ( i < argc )
{
HLTDebug("argv[%d] == %s", i, argv[i] );
- if ( !strcmp( argv[i], "output_percentage" ) )
+ if ( !strcmp( argv[i], "output_size" ) )
{
if ( i+1>=argc )
{
- HLTError("Missing output_percentage parameter");
+ HLTError("Missing output_size parameter");
return ENOTSUP;
}
HLTDebug("argv[%d+1] == %s", i, argv[i+1] );
- fOutputPercentage = strtoul( argv[i+1], &cpErr, 0 );
+ fOutputSize = strtoul( argv[i+1], &cpErr, 0 );
if ( *cpErr )
{
- HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
+ HLTError("Cannot convert output_size parameter '%s'", argv[i+1] );
return EINVAL;
}
- HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
+ HLTInfo("Output size set to %lu %%", fOutputSize );
i += 2;
continue;
}
+ if ( !strcmp( argv[i], "-everyNevent" ) )
+ {
+ if ( i+1>=argc )
+ {
+ HLTError("Missing everyNevent parameter");
+ return ENOTSUP;
+ }
+ HLTDebug("argv[%d+1] == %s", i, argv[i+1] );
+ fOutputSize = strtoul( argv[i+1], &cpErr, 0 );
+ if ( *cpErr )
+ {
+ HLTError("Cannot convert everyNevent parameter '%s'", argv[i+1] );
+ return EINVAL;
+ }
+ HLTInfo("Pushing back every %d event", feveryNevent);
+ i += 2;
+ continue;
+ }
+
else {
HLTError("Unknown option '%s'", argv[i] );
return EINVAL;
Int_t AliHLTTRDCalibrationComponent::InitCalibration()
{
if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
- HLTError("DefaultStorage is not Set in CDBManager");
- return -1;
+ HLTError("DefaultStorage is not set in CDBManager");
+ return -EINVAL;
}
if(AliCDBManager::Instance()->GetRun()<0){
- AliCDBManager *cdb = AliCDBManager::Instance();
- if (cdb)
- {
- cdb->SetRun(0);
- HLTWarning("Setting CDB Runnumber to 0. CDB instance 0x%x", cdb);
- }
- else
- {
- HLTError("Could not get CDB instance", "cdb 0x%x", cdb);
- return -1;
- }
+ HLTError("Run Number is not set in CDBManager");
+ return -EINVAL;
}
HLTInfo("CDB default storage: %s; RunNo: %i", (AliCDBManager::Instance()->GetDefaultStorage()->GetBaseFolder()).Data(), AliCDBManager::Instance()->GetRun());
-
fTRDCalibraFillHisto = AliTRDCalibraFillHisto::Instance();
fTRDCalibraFillHisto->SetHisto2d(); // choose to use histograms
fTRDCalibraFillHisto->SetCH2dOn(); // choose to calibrate the gain
fTRDCalibraFillHisto->SetPH2dOn(); // choose to calibrate the drift velocity
fTRDCalibraFillHisto->SetPRF2dOn(); // choose to look at the PRF
- fTRDCalibraFillHisto->Init2Dhistos(); // initialise the histos
+ fTRDCalibraFillHisto->SetIsHLT(); // per detector
+ //fTRDCalibraFillHisto->SetDebugLevel(1);// debug
+ fTRDCalibraFillHisto->SetFillWithZero(kTRUE);
+
+ fTracksArray = new TClonesArray("AliTRDtrackV1");
+ fOutArray = new TObjArray(3);
+
return 0;
}
Int_t AliHLTTRDCalibrationComponent::DeinitCalibration()
{
- HLTDebug("DeinitCalibration");
-
+
// Deinitialization of the component
+
+ HLTDebug("DeinitCalibration");
+ fTracksArray->Delete();
+ delete fTracksArray;
+ fTRDCalibraFillHisto->Destroy();
+ //fOutArray->Delete();
+ delete fOutArray;
return 0;
}
continue;
}
else {
- HLTDebug("We get the right data type: Block # %i/%i; Event 0x%08LX (%Lu) Received datatype: %s",
+ HLTDebug("We get the right data type: Block # %i/%i; Event 0x%08LX (%Lu) Received datatype: %s; Block Size: %i",
iBlock, evtData.fBlockCnt-1,
evtData.fEventID, evtData.fEventID,
- DataType2Text(inputDataType).c_str());
+ DataType2Text(inputDataType).c_str(),
+ block.fSize);
}
- TClonesArray* tracksArray = NULL;
- tracksArray = new TClonesArray("AliTRDtrackV1");
- HLTDebug("BLOCK fPtr 0x%x, fOffset %i, fSize %i, fSpec 0x%x, fDataType %s", block.fPtr, block.fOffset, block.fSize, block.fSpecification, DataType2Text(block.fDataType).c_str());
- AliHLTTRDUtils::ReadTracks(tracksArray, block.fPtr, block.fSize);
-
- if (tracksArray) {
- Int_t nbEntries = tracksArray->GetEntries();
- HLTDebug(" %i TRDtracks in tracksArray", nbEntries);
- AliTRDtrackV1* trdTrack = 0x0;
- for (Int_t i = 0; i < nbEntries; i++){
- HLTDebug("%i/%i: ", i+1, nbEntries);
- trdTrack = (AliTRDtrackV1*)tracksArray->At(i);
- trdTrack->Print();
- fTRDCalibraFillHisto->UpdateHistogramsV1(trdTrack);
- }
+ Int_t nTimeBins;
+ AliHLTTRDUtils::ReadTracks(fTracksArray, block.fPtr, block.fSize, &nTimeBins);
+
+ if(!fRecievedTimeBins){
+ HLTDebug("Reading number of time bins from input block. Value is: %d", nTimeBins);
+ fTRDCalibraFillHisto->Init2Dhistos(); // initialise the histos
+ fTRDCalibraFillHisto->SetNumberClusters(0); // At least 1 clusters
+ fTRDCalibraFillHisto->SetNumberClustersf(nTimeBins); // Not more than %d clusters
+ fRecievedTimeBins=kTRUE;
}
-
- TObjArray *outArray = FormOutput();
- if (outArray) {
- PushBack(outArray, AliHLTTRDDefinitions::fgkCalibrationDataType);
- delete outArray;
+ Int_t nbEntries = fTracksArray->GetEntries();
+ HLTDebug(" %i TRDtracks in tracksArray", nbEntries);
+ AliTRDtrackV1* trdTrack = 0x0;
+ for (Int_t i = 0; i < nbEntries; i++){
+ HLTDebug("%i/%i: ", i+1, nbEntries);
+ trdTrack = (AliTRDtrackV1*)fTracksArray->At(i);
+ trdTrack->Print();
+ fTRDCalibraFillHisto->UpdateHistogramsV1(trdTrack);
+ }
+
+ if(!fOutArray->At(0))FormOutput();
+ if (fNevent%feveryNevent==0 && fOutArray) {
+ PushBack(fOutArray, AliHLTTRDDefinitions::fgkCalibrationDataType);
}
+ fTracksArray->Delete();
+ fNevent++;
+
}
return 0;
}
-
/**
* Form output array of histrograms
*/
//============================================================================
-TObjArray* AliHLTTRDCalibrationComponent::FormOutput()
+void AliHLTTRDCalibrationComponent::FormOutput()
{
- TObjArray *outArray=new TObjArray(3);
-
// gain histo
TH2I *hCH2d = fTRDCalibraFillHisto->GetCH2d();
- outArray->Add(hCH2d);
+ fOutArray->Add(hCH2d);
// drift velocity histo
TProfile2D *hPH2d = fTRDCalibraFillHisto->GetPH2d();
- outArray->Add(hPH2d);
+ fOutArray->Add(hPH2d);
// PRF histo
TProfile2D *hPRF2d = fTRDCalibraFillHisto->GetPRF2d();
- outArray->Add(hPRF2d);
+ fOutArray->Add(hPRF2d);
HLTDebug("GetCH2d = 0x%x; NEntries = %i; size = %i", hCH2d, hCH2d->GetEntries(), sizeof(hCH2d));
hCH2d->Print();
hPH2d->Print();
HLTDebug("GetPRF2d = 0x%x; NEntries = %i; size = %i", hPRF2d, hPRF2d->GetEntries(), sizeof(hPRF2d));
hPRF2d->Print();
- HLTDebug("output Array: pointer = 0x%x; NEntries = %i; size = %i", outArray, outArray->GetEntries(), sizeof(outArray));
-
-
-
- return outArray;
-
+ HLTDebug("output Array: pointer = 0x%x; NEntries = %i; size = %i", fOutArray, fOutArray->GetEntries(), sizeof(fOutArray));
}
+Int_t AliHLTTRDCalibrationComponent::ShipDataToFXS(const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/)
+{
+ //fTRDCalibraFillHisto->DestroyDebugStreamer();
+ PushToFXS((TObject*)fOutArray, "TRD", "GAINDRIFTPRF");
+}
+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDCALIBRATIONCOMPONENT_H
#define ALIHLTTRDCALIBRATIONCOMPONENT_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+//* 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 AliHLTTRDCalibrationComponent.h
@author Timm Steinbeck, Matthias Richter
#include "AliHLTCalibrationProcessor.h"
class AliCDBManager;
class AliTRDCalibraFillHisto;
+class TClonesArray;
/**
* @class AliHLTTRDCalibrationComponent
* @ingroup alihlt_tutorial
*/
class AliHLTTRDCalibrationComponent : public AliHLTCalibrationProcessor
- {
- public:
- AliHLTTRDCalibrationComponent();
- virtual ~AliHLTTRDCalibrationComponent();
+{
+public:
+ AliHLTTRDCalibrationComponent();
+ virtual ~AliHLTTRDCalibrationComponent();
- // 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<AliHLTComponent_DataType>& list);
- AliHLTComponent_DataType GetOutputDataType();
- virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
- AliHLTComponent* Spawn();
+ const char* GetComponentID();
+ void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+ AliHLTComponentDataType GetOutputDataType();
+ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+ AliHLTComponent* Spawn();
- protected:
+protected:
- // Protected functions to implement AliHLTComponent's interface.
- // These functions provide initialization as well as the actual processing
- // capabilities of the component.
+ // Protected functions to implement AliHLTComponent's interface.
+ // These functions provide initialization as well as the actual processing
+ // capabilities of the component.
- AliTRDCalibraFillHisto *fTRDCalibraFillHisto;
+ AliTRDCalibraFillHisto *fTRDCalibraFillHisto;
- virtual Int_t InitCalibration();
- virtual Int_t ScanArgument(int argc, const char** argv);
- virtual Int_t DeinitCalibration();
- virtual Int_t ProcessCalibration(const AliHLTComponent_EventData& evtData,
- const AliHLTComponent_BlockData* blocks,
- AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr,
- AliHLTUInt32_t& size,
- vector<AliHLTComponent_BlockData>& outputBlocks);
-/* virtual Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); */
-// virtual Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+ virtual Int_t InitCalibration();
+ virtual Int_t ScanArgument(int argc, const char** argv);
+ virtual Int_t DeinitCalibration();
+ virtual Int_t ProcessCalibration(const AliHLTComponent_EventData& evtData,
+ const AliHLTComponent_BlockData* blocks,
+ AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size,
+ vector<AliHLTComponent_BlockData>& outputBlocks);
+ /* virtual Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); */
+ virtual Int_t ShipDataToFXS(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
- using AliHLTCalibrationProcessor::ProcessCalibration;
-// using AliHLTCalibrationProcessor::ShipDataToFXS;
+ using AliHLTCalibrationProcessor::ProcessCalibration;
+ //using AliHLTCalibrationProcessor::ShipDataToFXS;
- private:
- /** copy constructor prohibited */
- AliHLTTRDCalibrationComponent(const AliHLTTRDCalibrationComponent&);
- /** assignment operator prohibited */
- AliHLTTRDCalibrationComponent& operator=(const AliHLTTRDCalibrationComponent&);
- TObjArray* FormOutput();
+private:
+ /** copy constructor prohibited */
+ AliHLTTRDCalibrationComponent(const AliHLTTRDCalibrationComponent&);
+ /** assignment operator prohibited */
+ AliHLTTRDCalibrationComponent& operator=(const AliHLTTRDCalibrationComponent&);
+ void FormOutput();
- // The size of the output data produced, as a percentage of the input data's size.
- // Can be greater than 100 (%)
- unsigned fOutputPercentage; // Output volume in percentage of the input
-
- ClassDef(AliHLTTRDCalibrationComponent, 1)
+ AliHLTUInt32_t fOutputSize; // output size
+ TClonesArray* fTracksArray; // array containing the input
+ TObjArray* fOutArray; // array containing the output
+ UInt_t fNevent; // number of processed events
+ UInt_t feveryNevent; // push back every nth event
+ Bool_t fRecievedTimeBins; // already recived the number of time bins?
+
+ ClassDef(AliHLTTRDCalibrationComponent, 1)
- };
+};
#endif
fY(0),
fZ(0),
fQ(0),
- fIsInChamber(kFALSE),
- fIsShared(kFALSE),
fDetector(-1),
fLocalTimeBin(0),
fClusterMasking(0),
fPadCol(0),
fPadRow(0),
- fPadTime(0)
+ fPadTime(0),
+ fIsInChamber(kFALSE),
+ fIsShared(kFALSE)
{
}
* Main Constructor
*/
//============================================================================
-AliHLTTRDCluster::AliHLTTRDCluster(AliTRDcluster * inCluster):
+AliHLTTRDCluster::AliHLTTRDCluster(const AliTRDcluster* const inCluster):
fX (inCluster->GetX()),
fY (inCluster->GetY()),
fZ (inCluster->GetZ()),
- fQ (inCluster->GetQ()),
+ fQ (inCluster->fQ),
+ fDetector (inCluster->fDetector),
+ fLocalTimeBin (inCluster->fLocalTimeBin),
+ fClusterMasking (inCluster->fClusterMasking),
+ fPadCol (inCluster->fPadCol),
+ fPadRow (inCluster->fPadRow),
+ fPadTime (inCluster->fPadTime),
fIsInChamber(inCluster->IsInChamber()),
- fIsShared (inCluster->IsShared()),
- fDetector (inCluster->GetDetector()),
- fLocalTimeBin (inCluster->GetLocalTimeBin()),
- fClusterMasking (inCluster->IsMasked()),
- fPadCol (inCluster->GetPadCol()),
- fPadRow (inCluster->GetPadRow()),
- fPadTime ( inCluster->GetPadTime())
+ fIsShared (inCluster->IsShared())
{
- // fNPads = inCluster->GetNPads();
- // fCenter = inCluster->GetCenter();
+ for(int i=0; i<3; i++)
+ fSignals[i]=inCluster->fSignals[i+2];
}
* Copy data to the output TRDcluster
*/
//============================================================================
-void AliHLTTRDCluster::ExportTRDCluster(AliTRDcluster *outCluster)
+void AliHLTTRDCluster::ExportTRDCluster(AliTRDcluster* const outCluster) const
{
// Print();
outCluster->SetX(fX);
outCluster->SetY(fY);
outCluster->SetZ(fZ);
- outCluster->SetQ(fQ);
+ outCluster->fQ=fQ;
outCluster->SetInChamber(fIsInChamber);
outCluster->SetShared(fIsShared);
- outCluster->SetDetector(fDetector);
- outCluster->SetLocalTimeBin(fLocalTimeBin);
- outCluster->SetClusterMasking(fClusterMasking);
+ outCluster->fDetector=fDetector;
+ outCluster->fLocalTimeBin=fLocalTimeBin;
+ outCluster->fClusterMasking=fClusterMasking;
+ outCluster->fPadCol=fPadCol;
+ outCluster->fPadRow=fPadRow;
+ outCluster->fPadTime=fPadTime;
- outCluster->SetPadCol(fPadCol);
- outCluster->SetPadRow(fPadRow);
- outCluster->SetPadTime(fPadTime);
- // outCluster->SetNPads(fNPads);
- // outCluster->SetCenter(fCenter);
-
-
+ for(int i=0; i<3; i++)
+ outCluster->fSignals[i+2]=fSignals[i];
}
/**
* Prints main info about cluster
*/
//============================================================================
-void AliHLTTRDCluster::Print()
+void AliHLTTRDCluster::Print() const
{
- //printf(" --hltCluster-- addr 0x%x(%i); sizeof(*this) %i\n", this, (int)this, this->GetSize());
- //printf(" fX %f; fY %f; fZ %f\n",fX,fY,fZ);
-
+ printf(" --hltCluster-- addr %p; sizeof(*this) %i\n", (void*)this, sizeof(*this));
+ printf(" fX %f; fY %f; fZ %f\n",fX,fY,fZ);
}
+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDCLUSTER_H
#define ALIHLTTRDCLUSTER_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 *
#include "AliTRDcluster.h"
#include "AliHLTDataTypes.h"
{
public:
AliHLTTRDCluster();
- AliHLTTRDCluster(AliTRDcluster* inCluster);
- void ExportTRDCluster(AliTRDcluster* outCluster);
-
- AliHLTUInt8_t *GetEndPointer() // Returns pointer to the end of the cluster
- { return ((AliHLTUInt8_t *) this + sizeof(*this)); };
- AliHLTUInt32_t GetSize(){ return sizeof(*this); };
- void Print();
+ AliHLTTRDCluster(const AliTRDcluster* const inCluster);
+ void ExportTRDCluster(AliTRDcluster* const outCluster) const;
+ void Print() const;
private:
// From AliCluster
- Float_t fX; // X of the cluster in the tracking c.s.
- Float_t fY; // Y of the cluster in the tracking c.s.
- Float_t fZ; // Z of the cluster in the tracking c.s.
- Float_t fQ; // Amplitude
-
- Bool_t fIsInChamber;
- Bool_t fIsShared;
- Short_t fDetector; // TRD detector number
+ Float_t fX; // X of the cluster in the tracking c.s.
+ Float_t fY; // Y of the cluster in the tracking c.s.
+ Float_t fZ; // Z of the cluster in the tracking c.s.
+ Float_t fQ; // Amplitude
+
+ Short_t fSignals[3]; // Signals in the cluster
+ Short_t fDetector; // TRD detector number
Char_t fLocalTimeBin; // T0-calibrated time bin number
UChar_t fClusterMasking; // Bit field containing cluster status information;
UChar_t fPadCol; // Central pad number in column direction
UChar_t fPadRow; // Central pad number in row direction
UChar_t fPadTime; // Uncalibrated time bin number
- // Short_t fSignals[7]; // Signals in the cluster
+
+ Bool_t fIsInChamber;
+ Bool_t fIsShared;
+
// UChar_t fNPads; // Number of pads in cluster
// Float_t fCenter; // Center of the cluster relative to the pad
-
+
};
#endif
using namespace std;
#endif
+#include <time.h>
+
#include "AliHLTTRDClusterHistoComponent.h"
#include "AliHLTTRDDefinitions.h"
#include "AliHLTTRDCluster.h"
#include <TString.h>
#include "TObjString.h"
#include "TClonesArray.h"
+#include "TTimeStamp.h"
#include "AliHLTTRDUtils.h"
+#include "TH2F.h"
//#include "AliHLTTRD.h"
//#include <stdlib.h>
ClassImp(AliHLTTRDClusterHistoComponent)
AliHLTTRDClusterHistoComponent::AliHLTTRDClusterHistoComponent()
-: fClusterArray(NULL),
+: AliHLTProcessor(),
+ fOutputSize(100000),
+ fClusterArray(NULL),
+ fNevent(0),
+ feveryNevent(20),
fNClsDet(NULL),
fClsAmp(NULL),
fClsAmpDrift(NULL),
fClsTB(NULL),
fClsAmpDist(NULL),
- fSClsDist(NULL)
+ fSClsDist(NULL),
+ fNScls(NULL),
+ fClusterDist(NULL),
+ fClusterCandCharge(NULL)
{
// see header file for class documentation
// or
void AliHLTTRDClusterHistoComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
{
// see header file for class documentation
- constBase = 5000;
- inputMultiplier = 3;
+ constBase = fOutputSize;
+ inputMultiplier = 0;
}
AliHLTComponent* AliHLTTRDClusterHistoComponent::Spawn()
return new AliHLTTRDClusterHistoComponent;
}
-int AliHLTTRDClusterHistoComponent::DoInit(int /*argc*/, const char** /*argv*/ )
+int AliHLTTRDClusterHistoComponent::DoInit(int argc, const char** argv)
{
// Initialize histograms
+ int iResult=0;
+
+ TString configuration="";
+ TString argument="";
+ for (int i=0; i<argc && iResult>=0; i++) {
+ argument=argv[i];
+ if (!configuration.IsNull()) configuration+=" ";
+ configuration+=argument;
+ }
+
+ if (!configuration.IsNull()) {
+ iResult=Configure(configuration.Data());
+ }
fClusterArray = new TClonesArray("AliTRDcluster");
fClsTB = new TH1D("trdClsTB", ";time bin", 35, -0.5, 34.5);
fClsAmpDist = new TH1D("trdClsAmpDist", "mean amplitude", 200, 0, 1000);
fSClsDist = new TH1D("sclsdist", "Super cluster spectrum", 200, 0, 8000);
+ fNScls = new TH1D("nscls", "No. of Kr clusters per event", 540, 0, 540);
+ fClusterDist = new TH2F("cldist", "Cluster distribution;padrow;padcol", 16*5, -0.5, 79.5, 8*6*18, -0.5, 863.5);
+ fClusterCandCharge = new TH1D("qClsCand", "Cluster candidate charge;charge (ADC counts);counts", 200, 0, 8000);
- for(int i=0; i<540; i++)
+ for(int i=0; i<540; i++) {
fClsAmpDriftDet[i] = new TH1D(Form("trdClsDriftDet_%d",i), "", 200, -0.5, 199.5);
-
- return 0;
+ fSlidingWindow[i].SetBins(9, -0.5, 8.5, 17, -0.5, 16.5);
+ }
+
+ return 0;
}
int AliHLTTRDClusterHistoComponent::DoDeinit()
if (fClsTB) delete fClsTB;
if (fClsAmpDist) delete fClsAmpDist;
if (fSClsDist) delete fSClsDist;
+ if (fClusterDist) delete fClusterDist;
+ if (fClusterCandCharge) delete fClusterCandCharge;
+ if (fNScls) delete fNScls;
for(int i=0; i<540; i++)
if (fClsAmpDriftDet[i]) delete fClsAmpDriftDet[i];
return 0;
}
-int AliHLTTRDClusterHistoComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
+int AliHLTTRDClusterHistoComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
AliHLTComponentTriggerData& /*trigData*/)
{
+ // if (GetFirstInputBlock(kAliHLTDataTypeSOR)) return 0;
+ // else if (GetFirstInputBlock(kAliHLTDataTypeEOR))
+ // {
+ // TString fileName="/tmp/ClusterHistoDump_run";
+ // fileName+=AliCDBManager::Instance()->GetRun();
+ // fileName+=".root";
+ // HLTInfo("Dumping Histogram file to %s",fileName.Data());
+ // TFile* file = TFile::Open(fileName, "RECREATE");
+ // fNClsDet->Write();
+ // fClsAmp->Write();
+ // fClsAmpDrift->Write();
+ // fClsTB->Write();
+ // fClsAmpDist->Write();
+ // fSClsDist->Write();
+ // fNScls->Write();
+ // fClusterDist->Write();
+ // fClusterCandCharge->Write();
+ // file->Close();
+ // HLTInfo("Histogram file dumped");
+ // return 0;
+ // }
+
if (GetFirstInputBlock(kAliHLTDataTypeSOR) || GetFirstInputBlock(kAliHLTDataTypeEOR)) return 0;
-
+
const AliHLTComponentBlockData* iter = NULL;
Float_t sClusterCharge[540] = { 0 };
+ for (Int_t iDet = 0; iDet < 540; iDet++) {
+ fSlidingWindow[iDet].Reset();
+ }
for ( iter = GetFirstInputBlock(AliHLTTRDDefinitions::fgkClusterDataType);
iter != NULL; iter = GetNextInputBlock() ) {
cls=(AliTRDcluster*)fClusterArray->At(i);
fNClsDet->Fill(cls->GetDetector());
- sClusterCharge[cls->GetDetector()] += cls->GetQ();
fClsAmp->Fill(cls->GetQ());
int tb = cls->GetPadTime();
fClsAmpDrift->Fill(cls->GetQ());
fClsAmpDriftDet[cls->GetDetector()]->Fill(cls->GetQ());
+
+ Int_t det = cls->GetDetector();
+ sClusterCharge[det] += cls->GetQ();
+
+ fSlidingWindow[det].Fill((cls->GetPadCol() / 18), cls->GetPadRow(), cls->GetQ());
+ fSlidingWindow[det].Fill((cls->GetPadCol() / 18), cls->GetPadRow() + 1, cls->GetQ());
+ fSlidingWindow[det].Fill((cls->GetPadCol() / 18) + 1, cls->GetPadRow(), cls->GetQ());
+ fSlidingWindow[det].Fill((cls->GetPadCol() / 18) + 1, cls->GetPadRow() + 1, cls->GetQ());
}
fClusterArray->Delete();
}
fClsAmpDist->Reset();
+ Int_t nSClusters = 0;
for(int det=0; det<540; det++) {
if (fClsAmpDriftDet[det]->GetSum() > 0)
fClsAmpDist->Fill(fClsAmpDriftDet[det]->GetMean());
fSClsDist->Fill(sClusterCharge[det]);
+
+ Int_t xmax;
+ Int_t ymax;
+ Int_t zmax;
+ fSlidingWindow[det].GetMaximumBin(xmax, ymax, zmax);
+ Float_t charge = fSlidingWindow[det].GetBinContent(xmax, ymax);
+ fClusterCandCharge->Fill(charge);
+ if (charge > 2000. && charge < 6500.) {
+ nSClusters++;
+ fClusterDist->Fill((ymax-1) + 16 * ((det % 30) / 6), (det / 30) * 48 + 8 * (det % 6) + (xmax-1));
+ }
}
- PushBack((TObject*)fNClsDet, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
- PushBack((TObject*)fClsAmp, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
- PushBack((TObject*)fClsAmpDrift, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
- PushBack((TObject*)fClsTB, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
- PushBack((TObject*)fClsAmpDist, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
- PushBack((TObject*)fSClsDist, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
-
+ fNScls->Fill(nSClusters);
+
+ if(fNevent%feveryNevent==0){
+ PushBack((TObject*)fNClsDet, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ PushBack((TObject*)fClsAmp, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ // PushBack((TObject*)fClsAmpDrift, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ // PushBack((TObject*)fClsTB, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ // PushBack((TObject*)fClsAmpDist, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ PushBack((TObject*)fNScls, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ PushBack((TObject*)fSClsDist, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ PushBack((TObject*)fClusterDist, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ PushBack((TObject*)fClusterCandCharge, kAliHLTDataTypeHistogram | kAliHLTDataOriginTRD, 0);
+ }
+
+ fNevent++;
return 0;
}
+
+int AliHLTTRDClusterHistoComponent::Configure(const char* arguments){
+ int iResult=0;
+ if (!arguments) return iResult;
+
+ TString allArgs=arguments;
+ TString argument;
+ int bMissingParam=0;
+
+ TObjArray* pTokens=allArgs.Tokenize(" ");
+ if (pTokens) {
+ for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
+ argument=((TObjString*)pTokens->At(i))->GetString();
+ if (argument.IsNull()) continue;
+
+ if (argument.CompareTo("output_size")==0) {
+ if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
+ HLTInfo("Setting output size to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
+ fOutputSize=((TObjString*)pTokens->At(i))->GetString().Atoi();
+ continue;
+ }
+ if (argument.CompareTo("-everyNevent")==0) {
+ if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
+ HLTInfo("Pushing back every %s event.", ((TObjString*)pTokens->At(i))->GetString().Data());
+ feveryNevent=((TObjString*)pTokens->At(i))->GetString().Atoi();
+ continue;
+ }
+ else {
+ HLTError("unknown argument: %s", argument.Data());
+ iResult=-EINVAL;
+ break;
+ }
+ }
+ delete pTokens;
+ }
+ if (bMissingParam) {
+ HLTError("missing parameter for argument %s", argument.Data());
+ iResult=-EINVAL;
+ }
+ return iResult;
+}
+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDCLUSTERHISTOCOMPONENT_H
#define ALIHLTTRDCLUSTERHISTOCOMPONENT_H
//* This file is property of and copyright by the ALICE HLT Project *
#include "AliHLTProcessor.h"
#include "TH1D.h"
+#include "TH2F.h"
/**
* @class AliHLTTRDQHistoComponent
/** interface function, see AliHLTComponent for description */
int DoDeinit();
/** interface function, see AliHLTComponent for description */
- int DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& trigData );
+ int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
using AliHLTProcessor::DoEvent;
+
+ int Configure(const char* arguments);
private:
/** copy constructor prohibited */
* properties.
*/
- TClonesArray* fClusterArray;
+ AliHLTUInt32_t fOutputSize; // output size
+ TClonesArray* fClusterArray; // input array
+ UInt_t fNevent; // number of processed events
+ UInt_t feveryNevent; // push back every nth event
TH1D *fNClsDet;
TH1D *fClsAmp;
TH1D *fClsAmpDist;
TH1D *fSClsDist;
+ TH1D *fNScls;
+
+ // kryptogramm
+ TH2F fSlidingWindow[540];
+ TH2F *fClusterDist;
+ TH1D *fClusterCandCharge;
ClassDef(AliHLTTRDClusterHistoComponent, 0);
};
+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDCLUSTERIZER_H
#define ALIHLTTRDCLUSTERIZER_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+//* 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 *
////////////////////////////////////////////////////////////////////////////
// //
#include "AliHLTDataTypes.h"
#include "AliHLTTRDTrackletWordArray.h"
-class AliHLTTRDTrackletWord;
-
class AliHLTTRDClusterizer : public AliTRDclusterizer
{
public:
void SetMemBlock(AliHLTUInt8_t* ptr){
if(fReconstructor->IsProcessingTracklets()){
fTrMemBlock=ptr; fTrMemCurrPtr=ptr;
- fClMemBlock=ptr+GetTrMemBlockSize(); fNoOfClusters=0; //if IsProcessingTracklets() is enabled we always reserve a data block of size GetTrMemBlockSize() for the tracklets
+ fClMemBlock=ptr+GetTrMemBlockSize(); //if IsProcessingTracklets() is enabled we always reserve a data block of size GetTrMemBlockSize() for the tracklets
}else{
- fClMemBlock=ptr; fNoOfClusters=0;
+ fClMemBlock=ptr;
}
+ fNoOfClusters=0;
}
AliHLTUInt8_t* GetClMemBlock(){return fClMemBlock;}
AliHLTUInt8_t* GetTrMemBlock(){return fTrMemBlock;}
UInt_t GetAddedClSize(){return fNoOfClusters*sizeof(AliHLTTRDCluster);}
UInt_t GetAddedTrSize(){return (AliHLTUInt8_t*)fTrMemCurrPtr-(AliHLTUInt8_t*)fTrMemBlock;}
UInt_t GetTrMemBlockSize(){return 30*(sizeof(AliHLTTRDTrackletWordArray)+512*sizeof(UInt_t));}
+ Int_t GetNTimeBins() const {return fTimeTotal;}
protected:
void AddClusterToArray(AliTRDcluster *cluster);
#include <cerrno>
#include <string>
+#include "AliTRDrawStream.h"
+#include "AliTRDrawFastStream.h"
+
ClassImp(AliHLTTRDClusterizerComponent)
-AliHLTTRDClusterizerComponent::AliHLTTRDClusterizerComponent():
- AliHLTProcessor(),
+AliHLTTRDClusterizerComponent::AliHLTTRDClusterizerComponent()
+: AliHLTProcessor(),
fOutputPercentage(500),
fOutputConst(0),
fClusterizer(NULL),
fyPosMethod(1),
fgeometryFileName(""),
fProcessTracklets(kFALSE),
- fHLTstreamer(kFALSE)
+ fHLTstreamer(kTRUE)
{
// Default constructor
{
// Get the list of input data
list.clear(); // We do not have any requirements for our input data type(s).
- list.push_back( (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) );
+ list.push_back(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD);
}
-AliHLTComponent_DataType AliHLTTRDClusterizerComponent::GetOutputDataType()
+AliHLTComponentDataType AliHLTTRDClusterizerComponent::GetOutputDataType()
{
// Get the output data type
return kAliHLTMultipleDataType;
if(fReconstructor->IsProcessingTracklets())
fOutputConst = fClusterizer->GetTrMemBlockSize();
-
+
+ AliTRDrawStream::SetSubtractBaseline(10);
+ AliTRDrawFastStream::SetSubtractBaseline(10);
+
return iResult;
}
fMemReader->SetEquipmentID( id );
fClusterizer->SetMemBlock(outputPtr+offset);
- Bool_t iclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
- if (iclustered == kTRUE)
+ Bool_t bclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
+ if(bclustered)
{
- HLTDebug( "Clustered successfully");
+ HLTDebug("Clustered successfully");
}
else
{
return -1;
}
- // put the tree into output
- //fcTree->Print();
-
AliHLTUInt32_t addedSize;
if(fReconstructor->IsProcessingTracklets()){
addedSize = fClusterizer->GetAddedTrSize();
bd.fSpecification = block.fSpecification;
bd.fDataType = AliHLTTRDDefinitions::fgkMCMtrackletDataType;
outputBlocks.push_back( bd );
- HLTDebug( "BD fPtr 0x%x, fOffset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
+ HLTDebug( "BD ptr 0x%x, offset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
}
offset = totalSize;
}
addedSize = fClusterizer->GetAddedClSize();
if (addedSize > 0){
- // Using low-level interface
- // with interface classes
+
+ Int_t* nTimeBins = (Int_t*)(outputPtr+offset+fClusterizer->GetAddedClSize());
+ *nTimeBins = fClusterizer->GetNTimeBins();
+ addedSize += sizeof(*nTimeBins);
+
totalSize += addedSize;
if ( totalSize > size )
{
totalSize, size );
return EMSGSIZE;
}
-
+
// Fill block
AliHLTComponentBlockData bd;
FillBlockData( bd );
bd.fSpecification = block.fSpecification;
bd.fDataType = AliHLTTRDDefinitions::fgkClusterDataType;
outputBlocks.push_back( bd );
- HLTDebug( "BD fPtr 0x%x, fOffset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
+ HLTDebug( "BD ptr 0x%x, offset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
offset = totalSize;
-
}
else
HLTDebug("Array of clusters is empty!");
fgeometryFileName=((TObjString*)pTokens->At(i))->GetString();
continue;
}
- if (argument.CompareTo("-lowflux")==0) {
+ else if (argument.CompareTo("-lowflux")==0) {
fRecoParamType = 0;
HLTInfo("Low flux reconstruction selected");
continue;
}
- if (argument.CompareTo("-highflux")==0) {
+ else if (argument.CompareTo("-highflux")==0) {
fRecoParamType = 1;
HLTInfo("High flux reconstruction selected");
continue;
}
- if (argument.CompareTo("-cosmics")==0) {
+ else if (argument.CompareTo("-cosmics")==0) {
fRecoParamType = 2;
HLTInfo("Cosmics reconstruction selected");
continue;
}
- if (argument.CompareTo("-simulation")==0) {
+ else if (argument.CompareTo("-simulation")==0) {
fRecoDataType = 0;
HLTInfo("Awaiting simulated data");
continue;
}
- if (argument.CompareTo("-experiment")==0) {
+ else if (argument.CompareTo("-experiment")==0) {
fRecoDataType = 1;
HLTInfo("Awaiting real data");
continue;
}
- if (argument.CompareTo("-processTracklets")==0) {
+ else if (argument.CompareTo("-processTracklets")==0) {
fProcessTracklets = kTRUE;
- HLTInfo("Processing L1 Tracklets");
+ HLTInfo("Writing L1 tracklets to output");
continue;
}
- if (argument.CompareTo("-noZS")==0) {
+ else if (argument.CompareTo("-noZS")==0) {
fOutputPercentage = 100;
HLTInfo("Awaiting non zero surpressed data");
continue;
}
- if (argument.CompareTo("-faststreamer")==0) {
+ else if (argument.CompareTo("-faststreamer")==0) {
fHLTstreamer = kTRUE;
HLTInfo("Useing fast raw streamer");
continue;
}
+ else if (argument.CompareTo("-nofaststreamer")==0) {
+ fHLTstreamer = kFALSE;
+ HLTInfo("Don't use fast raw streamer");
+ continue;
+ }
else if (argument.CompareTo("-rawver")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
HLTInfo("Raw data version is: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
break;
}
continue;
- }
+ }
else {
HLTError("unknown argument: %s", argument.Data());
// These functions are required for the registration process
const char* GetComponentID();
- void GetInputDataTypes( vector<AliHLTComponent_DataType>& list);
- AliHLTComponent_DataType GetOutputDataType();
+ void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+ AliHLTComponentDataType GetOutputDataType();
int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
AliHLTComponent* Spawn();
Int_t fRawDataVersion;
Int_t fyPosMethod; // 0=COG 1=LUT 2=Gauss
TString fgeometryFileName;
- Bool_t fProcessTracklets;
- Bool_t fHLTstreamer;
+ Bool_t fProcessTracklets; // write the L! tracklets to output
+ Bool_t fHLTstreamer; // use FastStreamer
ClassDef(AliHLTTRDClusterizerComponent, 3)
ClassImp(AliHLTTRDDefinitions)
-const AliHLTComponentDataType AliHLTTRDDefinitions::fgkDDLRawDataType = { sizeof(AliHLTComponentDataType), {'D','D','L','_','R','A','W',' '},{'T','R','D',' '}};;
-
const AliHLTComponentDataType AliHLTTRDDefinitions::fgkClusterDataType = { sizeof(AliHLTComponentDataType), {'C','L','U','S','T','E','R','S'},{'T','R','D',' '}};;
const AliHLTComponentDataType AliHLTTRDDefinitions::fgkTRDSATracksDataType = { sizeof(AliHLTComponentDataType), {'T','R','A','C','K','S','S','A'},{'T','R','D',' '}};;
-// XEmacs -*-C++-*-
-// @(#) $Id$
+//-*- Mode: C++ -*-
+// $Id$
#ifndef ALIHLTTRDDEFINITIONS_H
#define ALIHLTTRDDEFINITIONS_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+//* 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 *
/* AliHLTTRDDefinitions
*/
AliHLTTRDDefinitions();
virtual ~AliHLTTRDDefinitions();
- static const AliHLTComponentDataType fgkDDLRawDataType; // Raw Data
static const AliHLTComponentDataType fgkClusterDataType; // TRD Cluster Data
static const AliHLTComponentDataType fgkTRDSATracksDataType; // Stand Alone tracks
static const AliHLTComponentDataType fgkTRDSAEsdDataType; // Stand Alone tracks
+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDESDWRITERCOMPONENT_H
#define ALIHLTTRDESDWRITERCOMPONENT_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+//* 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 AliHLTTRDEsdWriterComponent.h
@author Mateusz Ploskon
*/
//============================================================================
AliHLTTRDTrack::AliHLTTRDTrack():
- fSize(sizeof(AliHLTTRDTrack)),
- fTRDtrack(NULL),
- fPIDquality(0),
fDE(-1),
fFakeRatio(-1),
fChi2(-1),
- fMass(-1),
- fLab(-1),
fN(-1),
fIntegratedLength(-1),
fX(-1),
- fAlpha(-1)
+ fAlpha(-1),
+ fSize(sizeof(AliHLTTRDTrack))
{
InitArrays();
// not to be used
* Creates hltTrack from TRDtrackV1
*/
//============================================================================
-AliHLTTRDTrack::AliHLTTRDTrack(AliTRDtrackV1 * inTrack):
- fSize(sizeof(AliHLTTRDTrack)),
- fTRDtrack(NULL),
- fPIDquality(0),
- fDE(-1),
- fFakeRatio(-1),
- fChi2(-1),
- fMass(-1),
- fLab(-1),
- fN(-1),
- fIntegratedLength(-1),
- fX(-1),
- fAlpha(-1)
+AliHLTTRDTrack::AliHLTTRDTrack(const AliTRDtrackV1* const inTrack):
+ fDE(inTrack->fDE),
+ fFakeRatio(inTrack->fFakeRatio),
+ fChi2(inTrack->fChi2),
+ fN(inTrack->fN),
+ fIntegratedLength(inTrack->GetIntegratedLength()),
+ fX(inTrack->GetX()),
+ fAlpha(inTrack->GetAlpha()),
+ fSize(sizeof(AliHLTTRDTrack))
{
- InitArrays();
-
- fTRDtrack = inTrack;
-
- CopyDataMembers();
-
- AddTracklets();
-
+ CopyDataMembers(inTrack);
}
/**
}
-/**
- * Copy tracklets to the HLTTRDTrack
- */
-//============================================================================
-void AliHLTTRDTrack::AddTracklets()
-{
- for (Int_t iTracklet = 0; iTracklet < kNplane; iTracklet++)
- {
- // if (fTracklet[iTracklet])
- // HLTWarning("Trying to rewrite tracklets in the Track. Not good.");
- AliTRDseedV1 * trdTracklet = fTRDtrack->GetTracklet(iTracklet);
- if (trdTracklet){
- AliHLTTRDTracklet * hltTracklet = new (GetEndPointer()) AliHLTTRDTracklet(trdTracklet);
- fSize += hltTracklet->GetSize();
- //HLTDebug("tracklet %i; adr 0x%x; endPointer 0x%x; fSize %i", iTracklet, hltTracklet, hltTracklet->GetEndPointer(), fSize);
- fTracklet[iTracklet] = hltTracklet;
- }
- else
- fTracklet[iTracklet] = NULL;
- }
-}
-
-
/**
* Copy data members (except tracklets) from TRDtrackV1 to HLTTRDTrack.
*/
//============================================================================
-void AliHLTTRDTrack::CopyDataMembers()
+void AliHLTTRDTrack::CopyDataMembers(const AliTRDtrackV1* const inTrack)
{
-
- fPIDquality = fTRDtrack->GetNumberOfTrackletsPID();
-
for(Int_t i = 0; i < AliPID::kSPECIES; i++)
{
- fPID[i] = fTRDtrack->GetPID(i);
+ fPID[i] = inTrack->fPID[i];
}
for (Int_t i = 0; i < 3; i++)
{
- fBudget[i] = fTRDtrack->GetBudget(i);
+ fBudget[i] = inTrack->GetBudget(i);
}
- fDE = fTRDtrack->GetEdep();
- fFakeRatio = fTRDtrack->GetFakeRatio();
- fChi2 = fTRDtrack->GetChi2();
- fMass = fTRDtrack->GetMass();
- fLab = fTRDtrack->GetLabel();
- fN = fTRDtrack->GetNumberOfClusters();
- fIntegratedLength = fTRDtrack->GetIntegratedLength();
- fX = fTRDtrack->GetX();
- fAlpha = fTRDtrack->GetAlpha();
- const Double_t *Ptemp = fTRDtrack->GetParameter();
+ const Double_t* const Ptemp = inTrack->GetParameter();
for (Int_t i = 0; i < 5; i++)
{
fP[i] = Ptemp[i];
}
- const Double_t *Ctemp = fTRDtrack->GetCovariance();
+ const Double_t* const Ctemp = inTrack->GetCovariance();
for (Int_t i = 0; i < 15; i++)
{
fC[i] = Ctemp[i];
}
-
+
+ for (Int_t iTracklet = 0; iTracklet < AliTRDtrackV1::kNplane; iTracklet++)
+ {
+ AliTRDseedV1* trdTracklet = inTrack->GetTracklet(iTracklet);
+ if (trdTracklet){
+ AliHLTTRDTracklet* hltTracklet = new (GetEndPointer()) AliHLTTRDTracklet(trdTracklet);
+ fSize += hltTracklet->GetSize();
+ fTrackletAtPlane[iTracklet] = kTRUE;
+ }
+ else fTrackletAtPlane[iTracklet] = kFALSE;
+ }
}
/**
* Copy data to the output TRDtrackV1
*/
//============================================================================
-void AliHLTTRDTrack::ExportTRDTrack(AliTRDtrackV1 *outTrack)
+void AliHLTTRDTrack::ExportTRDTrack(AliTRDtrackV1* const outTrack) const
{
- outTrack->Reset();
+ //outTrack->Reset(); we always use a new fresh trdtrack as input, so this is useless
- //Set members from AliTRDtrackV1
- outTrack->SetPIDquality(fPIDquality);
- outTrack->SetEdep(fDE);
+ outTrack->fDE=fDE;
+ outTrack->fFakeRatio=fFakeRatio;
+ outTrack->fChi2=fChi2;
+ outTrack->fN=fN;
+ outTrack->SetIntegratedLength(fIntegratedLength);
+ outTrack->Set(fX, fAlpha, fP, fC);
+
for(Int_t i = 0; i < AliPID::kSPECIES; i++)
{
- outTrack->SetPID(i,fPID[i]);
+ outTrack->fPID[i] = fPID[i];
}
for (Int_t i = 0; i < 3; i++)
{
outTrack->SetBudget(i, fBudget[i]);
}
- for (Int_t iTracklet = 0; iTracklet < kNplane; iTracklet++){
- if (fTracklet[iTracklet]){
+
+ AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*)this+sizeof(*this);
+ AliHLTTRDTracklet* hltTracklet;
+
+ for (Int_t iTracklet = 0; iTracklet < AliTRDtrackV1::kNplane; iTracklet++){
+ if (fTrackletAtPlane[iTracklet]){
AliTRDseedV1* trdTracklet = new AliTRDseedV1();
- fTracklet[iTracklet]->ExportTRDTracklet(trdTracklet);
+ hltTracklet = (AliHLTTRDTracklet*) iterPtr;
+ hltTracklet->ExportTRDTracklet(trdTracklet);
outTrack->SetTracklet(trdTracklet,iTracklet);
+ iterPtr += hltTracklet->GetSize();
}
}
- //Set members from AliKalmanTrack
- outTrack->SetFakeRatio(fFakeRatio);
- //outTrack->SetChi2(fChi2);
- outTrack->SetMass(fMass);
- outTrack->SetLabel(fLab);
- (dynamic_cast<AliKalmanTrack*>(outTrack))->SetNumberOfClusters(fN);
- outTrack->SetIntegratedLength(fIntegratedLength);
-
- //Set members from AliExternalTrackParam
- outTrack->Set(fX, fAlpha, fP, fC);
}
//============================================================================
void AliHLTTRDTrack::InitArrays()
{
- for(Int_t i = 0; i < kNplane; i++){
- fTracklet[i]=NULL;
+ for(Int_t i = 0; i < AliTRDtrackV1::kNplane; i++){
+ fTrackletAtPlane[i]=kFALSE;
}
for(Int_t i = 0; i < AliPID::kSPECIES; i++)
* Print main values for HLTTrack
*/
//============================================================================
-void AliHLTTRDTrack::Print(Bool_t printTracklets)
+void AliHLTTRDTrack::Print(Bool_t printTracklets) const
{
- //printf("--hltTrack-- addr 0x%p(%i); fSize %i\n", this, (int)this, fSize);
- //printf(" fPIDquality = %s; fX = %f; fAlpha = %f\n", fPIDquality, fX, fAlpha);
+ printf("--hltTrack-- addr 0x%p(%i); fSize %i\n", this, this, fSize);
+ printf(" fX = %f; fAlpha = %f\n", fX, fAlpha);
printf(" ");
for(Int_t i = 0; i < AliPID::kSPECIES; i++)
if (printTracklets)
{
- for (Int_t i = 0; i < kNplane; i++){
- if (fTracklet[i]){
+ AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*)this+sizeof(*this);
+ AliHLTTRDTracklet* hltTracklet;
+
+ for (Int_t i = 0; i < AliTRDtrackV1::kNplane; i++){
+ if (fTrackletAtPlane[i]){
printf("[%i]",i);
- fTracklet[i]->Print();
+ hltTracklet = (AliHLTTRDTracklet*) iterPtr;
+ hltTracklet->Print();
+ iterPtr += hltTracklet->GetSize();
}
else
printf(" NULL ");
* Number of tracklets should be already known
*/
//============================================================================
-void AliHLTTRDTrack::ReadTrackletsFromMemory(void* input)
-{
- AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*) input;
- AliHLTTRDTracklet* hltTracklet = NULL;
+// void AliHLTTRDTrack::ReadTrackletsFromMemory(void* input)
+// {
+// AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*) input;
+// AliHLTTRDTracklet* hltTracklet = NULL;
- for (Int_t iTracklet = 0; iTracklet < kNplane; iTracklet++){
- if (fTracklet[iTracklet]){
- hltTracklet = (AliHLTTRDTracklet*) iterPtr;
- hltTracklet->ReadClustersFromMemory(iterPtr+sizeof(AliHLTTRDTracklet));
- fTracklet[iTracklet] = hltTracklet;
- iterPtr += hltTracklet->GetSize();
- //hltTracklet->Print(kFALSE);
- }
- }
-}
+// for (Int_t iTracklet = 0; iTracklet < AliTRDtrackV1::kNplane; iTracklet++){
+// if (fTracklet[iTracklet]){
+// hltTracklet = (AliHLTTRDTracklet*) iterPtr;
+// //hltTracklet->ReadClustersFromMemory(iterPtr+sizeof(AliHLTTRDTracklet));
+// fTracklet[iTracklet] = hltTracklet;
+// iterPtr += hltTracklet->GetSize();
+// //hltTracklet->Print(kFALSE);
+// }
+// }
+// }
+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDTRACK_H
#define ALIHLTTRDTRACK_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 *
-#include "AliESDtrack.h"
#include "AliTRDtrackV1.h"
#include "AliHLTLogging.h"
-class AliHLTTRDTracklet;
+class AliHLTTRDTracklet;
class AliHLTTRDTrack
{
public:
AliHLTTRDTrack();
+ AliHLTTRDTrack(const AliTRDtrackV1* const inTrack);
~AliHLTTRDTrack();
- AliHLTTRDTrack( AliTRDtrackV1* inTrack);
- void AddTracklets();
- void CopyDataMembers();
- void ExportTRDTrack(AliTRDtrackV1* outTrack);
- AliHLTUInt8_t *GetEndPointer() // Returns pointer to the end of the track
+ void CopyDataMembers(const AliTRDtrackV1* const inTrack);
+ void ExportTRDTrack(AliTRDtrackV1* const outTrack) const;
+ AliHLTUInt8_t *GetEndPointer() const // Returns pointer to the end of the track
{ return ((AliHLTUInt8_t *) this + fSize); };
- AliHLTUInt32_t GetSize(){return fSize;};
- void Print(Bool_t printTracklets = kTRUE);
- void ReadTrackletsFromMemory(void* );
+ AliHLTUInt32_t GetSize() const {return fSize;};
+ void Print(Bool_t printTracklets = kTRUE) const;
+ // void ReadTrackletsFromMemory(void* );
private:
AliHLTTRDTrack(const AliHLTTRDTrack& inTrack);
AliHLTTRDTrack& operator=(const AliHLTTRDTrack& inTrack);
void InitArrays();
- AliHLTUInt32_t fSize; // Size of the track with tracklets and clusters in the memory
- AliTRDtrackV1* fTRDtrack;
-
- /* ======== From AliTRDtrackV1 ======== */
- enum { kNdet = 540
- , kNstacks = 90
- , kNplane = AliESDtrack::kTRDnPlanes
- , kNcham = 5
- , kNsect = 18
- , kNslice = 3
- , kNMLPslice = 8 };
-
/* Defenitely need */
- UChar_t fPIDquality; // No of planes used for PID calculation
- AliHLTTRDTracklet *fTracklet[kNplane]; // Tracklets array defining the track
+ //UChar_t fPIDquality; // No of planes used for PID calculation
/* Probably need */
- Double32_t fPID[AliPID::kSPECIES];// PID probabilities
- Double32_t fBudget[3]; // Integrated material budget
- Double32_t fDE; // Integrated delta energy
+ Float_t fPID[AliPID::kSPECIES];// PID probabilities
+ Float_t fBudget[3]; // Integrated material budget
+ Float_t fDE; // Integrated delta energy
/* ======== From AliKalmanTrack ======== */
/* Defenitely need */
- Double32_t fFakeRatio; // fake ratio
- Double32_t fChi2; // total chi2 value for this track
- Double32_t fMass; // mass hypothesis
- Int_t fLab; // track label
+ Float_t fFakeRatio; // fake ratio
+ Float_t fChi2; // total chi2 value for this track
+ //Float_t fMass; // mass hypothesis
+ //Int_t fLab; // track label
/* Probably need */
- Int_t fN; // number of associated clusters
- Double32_t fIntegratedLength; // integrated length // variables for time integration (S.Radomski@gsi.de)
+ Int_t fN; // number of associated clusters
+ Float_t fIntegratedLength; // integrated length // variables for time integration (S.Radomski@gsi.de)
/* ======= From AliExternalTrackParam ======== */
/* Defenitely need */
- Double32_t fX; // X coordinate for the point of parametrisation
- Double32_t fAlpha; // Local <-->global coor.system rotation angle
- Double32_t fP[5]; // The track parameters
- Double32_t fC[15]; // The track parameter covariance matrix
+ Float_t fX; // X coordinate for the point of parametrisation
+ Float_t fAlpha; // Local <-->global coor.system rotation angle
+ Float_t fP[5]; // The track parameters
+ Float_t fC[15]; // The track parameter covariance matrix
+
+ /* Not need */
+ // static Float_t fgMostProbablePt; // "Most probable" pt (to be used if Bz=0)
+
+ AliHLTUInt32_t fSize; // Size of the track with tracklets and clusters in the memory
+ Bool_t fTrackletAtPlane[AliTRDtrackV1::kNplane]; // Used positions in the original array of tracklets
- /* Probably need */
- // static Double32_t fgMostProbablePt; // "Most probable" pt (to be used if Bz=0)
};
fPIDmethod(1),
fgeometryFileName(""),
fieldStrength(-101),
- fSlowTracking(kFALSE)
+ fSlowTracking(kFALSE),
+ fOutputV1Tracks(kTRUE)
{
// Default constructor
{
// Get the list of input data
list.clear(); // We do not have any requirements for our input data type(s).
- list.push_back( AliHLTTRDDefinitions::fgkClusterDataType );
+ list.push_back(AliHLTTRDDefinitions::fgkClusterDataType);
}
-AliHLTComponent_DataType AliHLTTRDTrackerV1Component::GetOutputDataType()
+AliHLTComponentDataType AliHLTTRDTrackerV1Component::GetOutputDataType()
{
// Get the output data type
- //return AliHLTTRDDefinitions::fgkClusterDataType;
- return kAliHLTDataTypeTrack | kAliHLTDataOriginTRD;
+ return kAliHLTMultipleDataType;
+}
+
+int AliHLTTRDTrackerV1Component::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
+{
+ // Get the output data types
+ tgtList.clear();
+ //tgtList.push_back(AliHLTTRDDefinitions::fgkTimeBinPropagationDataType);
+ tgtList.push_back(kAliHLTDataTypeTrack | kAliHLTDataOriginTRD);
+ tgtList.push_back(AliHLTTRDDefinitions::fgkTRDSATracksDataType);
+ return tgtList.size();
}
void AliHLTTRDTrackerV1Component::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
fTracker->SetClustersOwner(kFALSE);
delete fTracker;
- fTracker = 0x0;
+ fTracker = NULL;
fClusterArray->Delete();
delete fClusterArray;
+ fClusterArray = NULL;
// We need to set clusters in Reconstructor to null to prevent from
- // double deleting, since we delete TClonesArray by ourself in DoEvent.
+ // double deleting, since we delete TClonesArray by ourself.
fReconstructor->SetClusters(0x0);
delete fReconstructor;
- fReconstructor = 0x0;
+ fReconstructor = NULL;
delete fESD;
- fESD=NULL;
+ fESD = NULL;
AliTRDcalibDB::Terminate();
//fESD->SetMagneticField(fSolenoidBz);
AliHLTUInt32_t totalSize = 0, offset = 0;
- AliHLTUInt32_t dBlockSpecification = 0;
vector<AliHLTComponent_DataType> expectedDataTypes;
GetInputDataTypes(expectedDataTypes);
DataType2Text(inputDataType).c_str(),
block.fSize);
}
-
+
#ifndef NDEBUG
unsigned long constBase;
double inputMultiplier;
}
#endif
- AliHLTTRDUtils::ReadClusters(fClusterArray, block.fPtr, block.fSize);
+ AliHLTTRDUtils::ReadClusters(fClusterArray, block.fPtr, block.fSize, &fNtimeBins);
+ HLTDebug("Reading number of time bins from input block. Changing number of timebins to %d", fNtimeBins);
+ AliTRDtrackerV1::SetNTimeBins(fNtimeBins);
+
HLTDebug("TClonesArray of clusters: nbEntries = %i", fClusterArray->GetEntriesFast());
fTracker->LoadClusters(fClusterArray);
Int_t nTracks = fESD->GetNumberOfTracks();
HLTInfo("Number of tracks == %d ==", nTracks);
- TClonesArray* trdTracks = 0x0;
- //trdTracks = fTracker->GetListOfTracks();
+ TClonesArray* trdTracks;
+ trdTracks = fTracker->GetListOfTracks();
if(nTracks>0){
HLTDebug("We have an output ESDEvent: 0x%x with %i tracks", fESD, nTracks);
bd.fSpecification = block.fSpecification;
bd.fDataType = kAliHLTDataTypeTrack | kAliHLTDataOriginTRD;
outputBlocks.push_back( bd );
- HLTDebug("BD fPtr 0x%x, fOffset %i, fSize %i, fSpec 0x%x", bd.fPtr, bd.fOffset, bd.fSize, bd.fSpecification);
+ HLTDebug("BD ptr 0x%x, offset %i, size %i, datav1Type %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), bd.fSpecification);
offset = totalSize;
- if (trdTracks){
- //Int_t nbTracks=trdTracks->GetEntriesFast();
- //if (nbTracks>0){
+ if (fOutputV1Tracks && trdTracks){
HLTDebug("We have an output array: pointer to trdTracks = 0x%x, nbEntries = %i", trdTracks, trdTracks->GetEntriesFast());
- addedSize = AliHLTTRDUtils::AddTracksToOutput(trdTracks, outputPtr+offset);
+ addedSize = AliHLTTRDUtils::AddTracksToOutput(trdTracks, outputPtr+offset, fNtimeBins);
totalSize += addedSize;
// Fill block
bd.fSpecification = block.fSpecification;
bd.fDataType = AliHLTTRDDefinitions::fgkTRDSATracksDataType;
outputBlocks.push_back( bd );
- HLTDebug("BD fPtr 0x%x, fOffset %i, fSize %i, fSpec 0x%x", bd.fPtr, bd.fOffset, bd.fSize, bd.fSpecification);
+ HLTDebug("BD ptr 0x%x, offset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), bd.fSpecification);
offset = totalSize;
}
}
fgeometryFileName=((TObjString*)pTokens->At(i))->GetString();
continue;
}
- if (argument.CompareTo("-lowflux")==0) {
+ else if (argument.CompareTo("-lowflux")==0) {
fRecoParamType = 0;
HLTInfo("Low flux reconstruction selected");
continue;
}
- if (argument.CompareTo("-highflux")==0) {
+ else if (argument.CompareTo("-highflux")==0) {
fRecoParamType = 1;
HLTInfo("High flux reconstruction selected");
continue;
}
- if (argument.CompareTo("-cosmics")==0) {
+ else if (argument.CompareTo("-cosmics")==0) {
fRecoParamType = 2;
HLTInfo("Cosmics reconstruction selected");
continue;
}
- if (argument.CompareTo("-magnetic_field_ON")==0) {
+ else if (argument.CompareTo("-magnetic_field_ON")==0) {
fMagneticField = 1;
HLTInfo("Reconstructon with magnetic field");
continue;
}
- if (argument.CompareTo("-magnetic_field_OFF")==0) {
+ else if (argument.CompareTo("-magnetic_field_OFF")==0) {
fMagneticField = 0;
HLTInfo("Reconstructon without magnetic field");
continue;
}
- if (argument.CompareTo("-slowTracking")==0) {
+ else if (argument.CompareTo("-slowTracking")==0) {
fSlowTracking = kTRUE;
HLTInfo("Using slow tracking");
continue;
}
+ else if (argument.CompareTo("-outputV1Tracks")==0) {
+ if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
+ TString toCompareTo=((TObjString*)pTokens->At(i))->GetString();
+ if (toCompareTo.CompareTo("yes")==0){
+ HLTInfo("Setting OutputV1Tracks to: %s", toCompareTo.Data());
+ fOutputV1Tracks=kTRUE;
+ }
+ else if (toCompareTo.CompareTo("no")==0){
+ HLTInfo("Setting OutputV1Tracks to: %s", toCompareTo.Data());
+ fOutputV1Tracks=kFALSE;
+ }
+ else {
+ HLTError("unknown argument for OutputV1Tracks: %s", toCompareTo.Data());
+ iResult=-EINVAL;
+ break;
+ }
+ continue;
+ }
else if (argument.CompareTo("-PIDmethod")==0) {
if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
TString toCompareTo=((TObjString*)pTokens->At(i))->GetString();
// These functions are required for the registration process
const char* GetComponentID();
- void GetInputDataTypes( vector<AliHLTComponent_DataType>& list);
- AliHLTComponent_DataType GetOutputDataType();
+ void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+ AliHLTComponentDataType GetOutputDataType();
+ int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
AliHLTComponent* Spawn();
TString fgeometryFileName;
Double_t fieldStrength;
Bool_t fSlowTracking;
+ Bool_t fOutputV1Tracks;
ClassDef(AliHLTTRDTrackerV1Component, 3)
#include "AliHLTTRDTracklet.h"
-#include "AliHLTTRDCluster.h"
-
/**
* Default Constructor
*/
//============================================================================
AliHLTTRDTracklet::AliHLTTRDTracklet():
- fTRDtracklet(NULL),
- fSize(sizeof(AliHLTTRDTracklet)),
- //fSigmaY(-1),
- fSigmaY2(-1),
- fTilt(-1),
- fPadLength(-1),
- fX0(-1),
- //fMeanz(-1),
- //fZProb(-1),
- //fN(-1),
- fN2(-1),
- fNUsed(-1),
- //fFreq(-1),
- //fNChange(-1),
- //fMPads(-1),
- fC(-1),
- //fCC(-1),
- fChi2(-1),
- //fChi2Z(-1),
+ fN(0),
fDet(-1),
+ fdX(-1),
+ fS2Y(-1),
fPt(-1),
- fdX(-1)
-{
- InitArrays();
-}
-
-/**
- * Main Constructor
- */
-//============================================================================
-AliHLTTRDTracklet::AliHLTTRDTracklet(AliTRDseedV1 * inTracklet):
- fTRDtracklet(NULL),
- fSize(sizeof(AliHLTTRDTracklet)),
- //fSigmaY(-1),
- fSigmaY2(-1),
- fTilt(-1),
- fPadLength(-1),
+ fPad3(-1),
+ fPad2(-1),
fX0(-1),
- //fMeanz(-1),
- //fZProb(-1),
- //fN(-1),
- fN2(-1),
- fNUsed(-1),
- //fFreq(-1),
- //fNChange(-1),
- //fMPads(-1),
fC(-1),
- //fCC(-1),
fChi2(-1),
- //fChi2Z(-1),
- fDet(-1),
- fPt(-1),
- fdX(-1)
+#if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
+ fSize(sizeof(AliHLTTRDTracklet)-sizeof(IndexAndCluster)),
+#else
+ fSize(sizeof(AliHLTTRDTracklet)),
+#endif
+ fCount(0)
{
InitArrays();
-
- fTRDtracklet = inTracklet;
- CopyDataMembers();
- // Print(kFALSE);
- AddClusters();
}
/**
- * Add clusters to the HLTTRDTracklet
+ * Main Constructor
*/
//============================================================================
-void AliHLTTRDTracklet::AddClusters()
+AliHLTTRDTracklet::AliHLTTRDTracklet(const AliTRDseedV1* const inTracklet):
+ fN(inTracklet->fN),
+ fDet(inTracklet->fDet),
+ fdX(inTracklet->fdX),
+ fS2Y(inTracklet->fS2Y),
+ fPt(inTracklet->fPt),
+ fPad3(inTracklet->fPad[3]),
+ fPad2(inTracklet->fPad[2]),
+ fX0(inTracklet->fX0),
+ fC(inTracklet->fC),
+ fChi2(inTracklet->fChi2),
+#if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
+ fSize(sizeof(AliHLTTRDTracklet)-sizeof(IndexAndCluster)),
+#else
+ fSize(sizeof(AliHLTTRDTracklet)),
+#endif
+ fCount(0)
{
- for (Int_t iTimeBin = 0; iTimeBin < AliTRDseedV1::kNclusters; iTimeBin++)
- {
-// if (fClusters[iTimeBin])
-// HLTWarning("Trying to rewrite cluster in tracklet. Not good.");
- AliTRDcluster* trdCluster = fTRDtracklet->GetClusters(iTimeBin);
- if (trdCluster){
- AliHLTTRDCluster * hltCluster = new (GetEndPointer()) AliHLTTRDCluster(trdCluster);
- fSize += hltCluster->GetSize();
- //HLTInfo("cluster %i; adr 0x%x; endPointer 0x%x; fSize %i", iTimeBin, hltCluster, GetEndPointer(), fSize);
- fClusters[iTimeBin] = hltCluster;
- }
- else
- fClusters[iTimeBin] = NULL;
-
- }
+ CopyDataMembers(inTracklet);
}
/**
* Copy simple (non-pointer) data members from TRDTracklet to HLTTRDTracklet
*/
//============================================================================
-void AliHLTTRDTracklet::CopyDataMembers()
+void AliHLTTRDTracklet::CopyDataMembers(const AliTRDseedV1* const inTracklet)
{
+ //fChi2Z = inTracklet->GetChi2Z();
+
for (Int_t i=0; i < 2; i++){
- fYref[i] = fTRDtracklet->GetYref(i);
- fZref[i] = fTRDtracklet->GetZref(i);
+ fYref[i] = inTracklet->fYref[i];
+ fZref[i] = inTracklet->fZref[i];
+ fYfit[i] = inTracklet->fYfit[i];
+ fZfit[i] = inTracklet->fZfit[i];
}
- //fSigmaY = fTRDtracklet->GetSigmaY();
- fSigmaY2 = fTRDtracklet->GetS2Y();
- fTilt = fTRDtracklet->GetTilt();
- fPadLength = fTRDtracklet->GetPadLength();
- fX0 = fTRDtracklet->GetX0();
- for (Int_t i = 0; i < AliTRDseedV1::kNclusters; i++){
-// fX[i] = fTRDtracklet->GetX(i);
-// fY[i] = fTRDtracklet->GetY(i);
-// fZ[i] = fTRDtracklet->GetZ(i);
- fIndexes[i] = fTRDtracklet->GetIndexes(i);
+ for (Int_t i=0; i < AliPID::kSPECIES; i++){
+ fProb[i] = inTracklet->fProb[i];
}
- for (Int_t i=0; i < 2; i++){
- fYfit[i] = fTRDtracklet->GetYfit(i);
- fZfit[i] = fTRDtracklet->GetZfit(i);
- fLabels[i] = fTRDtracklet->GetLabels(i);
- }
- fLabels[2] = fTRDtracklet->GetLabels(2);
- fN2 = fTRDtracklet->GetN2();
- fNUsed = fTRDtracklet->GetNUsed();
-
- fC = fTRDtracklet->GetC();
- fChi2 = fTRDtracklet->GetChi2();
- //fChi2Z = fTRDtracklet->GetChi2Z();
+ for (Int_t iTimeBin = 0; iTimeBin < AliTRDseedV1::kNclusters; iTimeBin++)
+ {
+ AliTRDcluster* trdCluster = inTracklet->GetClusters(iTimeBin);
+ if (trdCluster){
+ fClusters[fCount].Index = inTracklet->fIndexes[iTimeBin];
+ new (&fClusters[fCount].Cluster) AliHLTTRDCluster(trdCluster);
+ fCount++;
+ fSize += sizeof(IndexAndCluster);
+ }
+ }
- fDet = fTRDtracklet->GetDetector();
- fPt = fTRDtracklet->GetPt();
- fdX = fTRDtracklet->GetdX();
+ //if((void*)&fClusters[fCount].Index!=(void*)GetEndPointer()){printf("ERRR");return;}
}
/**
* Copy data to the output TRDseedV1
*/
//============================================================================
-void AliHLTTRDTracklet::ExportTRDTracklet(AliTRDseedV1 *outTracklet)
+void AliHLTTRDTracklet::ExportTRDTracklet(AliTRDseedV1* const outTracklet) const
{
- outTracklet->Reset();
- /* ======= From AliTRDseedV1 ======== */
- outTracklet->SetDetector(fDet);
- outTracklet->SetPt(fPt);
- outTracklet->SetDX(fdX);
-
- /* ======= From AliTRDseed ======== */
+ //outTracklet->Reset(); we always use a fresh trdtracklet as input, so this is useless
+
+ outTracklet->fN = fN;
+ outTracklet->fDet = fDet;
+ outTracklet->fPad[3] = fPad3;
+ outTracklet->fPad[2] = fPad2;
+ outTracklet->fdX = fdX;
+ outTracklet->fX0 = fX0;
+ outTracklet->fS2Y = fS2Y;
+ outTracklet->fPt = fPt;
+ outTracklet->fC = fC;
+ outTracklet->fChi2 = fChi2;
+
for (Int_t i=0; i < 2; i++){
- outTracklet->SetYref(i, fYref[i]);
- outTracklet->SetZref(i, fZref[i]);
+ outTracklet->fYref[i] = fYref[i];
+ outTracklet->fZref[i] = fZref[i];
+ outTracklet->fYfit[i] = fYfit[i];
+ outTracklet->fZfit[i] = fZfit[i];
}
-
- //outTracklet->SetSigmaY(fSigmaY);
- //outTracklet->SetSigmaY2(fSigmaY2);
- outTracklet->SetTilt(fTilt);
- outTracklet->SetPadLength(fPadLength);
- outTracklet->SetX0(fX0);
- for (Int_t i=0; i < AliTRDseedV1::kNclusters; i++){
-// outTracklet->SetX(i,fX[i]);
-// outTracklet->SetX(i,fY[i]);
-// outTracklet->SetX(i,fZ[i]);
- outTracklet->SetIndexes(i, fIndexes[i]);
+ for (Int_t i=0; i < AliPID::kSPECIES; i++){
+ outTracklet->fProb[i] = fProb[i];
}
-// for (Int_t i=0; i < 2; i++){
-// outTracklet->SetYfit(i,fYfit[i]);
-// outTracklet->SetZfit(i,fZfit[i]);
-// }
- outTracklet->SetLabels(fLabels);
-
- //outTracklet->SetN2(fN2);
- //outTracklet->SetNUsed(fNUsed);
- outTracklet->SetC(fC);
- outTracklet->SetChi2(fChi2);
-
- for (Int_t iCluster = 0; iCluster < AliTRDseedV1::kNclusters; iCluster++){
- if (fClusters[iCluster]){
- AliTRDcluster *trdCluster = new AliTRDcluster();
- fClusters[iCluster]->ExportTRDCluster(trdCluster);
- //outTracklet->SetClusters(iCluster, trdCluster);
- }
+ for (UInt_t iCluster=0; iCluster < fCount; iCluster++){
+ AliTRDcluster *trdCluster = new AliTRDcluster();
+ fClusters[iCluster].Cluster.ExportTRDCluster(trdCluster);
+ outTracklet->fClusters[iCluster] = trdCluster;
+ outTracklet->fIndexes[iCluster] = fClusters[iCluster].Index;
+ iCluster++;
}
}
//============================================================================
void AliHLTTRDTracklet::InitArrays()
{
- for (Int_t i=0; i < AliTRDseedV1::kNclusters; i++){
- fClusters[i] = NULL;
- }
-
for (Int_t i=0; i < 2; i++){
fYref[i] = -1;
fZref[i] = -1;
- }
- for (Int_t i = 0; i < AliTRDseedV1::kNclusters; i++){
-// fX[i] = -1;
-// fY[i] = -1;
-// fZ[i] = -1;
- fIndexes[i] = -1;
- }
-
- for (Int_t i=0; i < 2; i++){
fYfit[i] = -1;
fZfit[i] = -1;
-// fYfitR[i] = -1;
-// fZfitR[i] = -1;
- fLabels[i] = -1;
}
- fLabels[2] = 0;
+ for (Int_t i=0; i < AliPID::kSPECIES; i++)
+ fProb[i]=0;
}
/**
* Prints main info about tracklet
*/
//============================================================================
-void AliHLTTRDTracklet::Print(Bool_t printClusters)
+void AliHLTTRDTracklet::Print(Bool_t printClusters) const
{
//printf("--hltTracklet-- addr 0x%p(%i); fSize %i\n", this, (int)this, fSize);
- printf(" fDet %i; fPt %f; fdX %f fN %i\n", fDet, fPt, fdX, fN2);
+ printf(" fDet %i; fPt %f; fdX %f fN %i\n", fDet, fPt, fdX, fN);
if(!printClusters) return;
- for (Int_t iCluster = 0; iCluster < AliTRDseedV1::kNclusters; iCluster++){
- printf(" [%i] ",iCluster);
- if (fClusters[iCluster]) fClusters[iCluster]->Print();
- else printf(" NULL\n");
+ for (UInt_t iCount=0, iCluster = 0; iCluster < fCount; iCount++){
+ printf(" [%i] ",iCount);
+ fClusters[iCluster].Cluster.Print();
+ iCluster++;
}
}
* Read clusters to TRDtracklet from the memory
*/
//============================================================================
-void AliHLTTRDTracklet::ReadClustersFromMemory(void *input)
-{
- AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*) input;
- AliHLTTRDCluster* hltCluster = NULL;
+// void AliHLTTRDTracklet::ReadClustersFromMemory(void *input)
+// {
+// AliHLTUInt8_t *iterPtr = (AliHLTUInt8_t*) input;
+// AliHLTTRDCluster* hltCluster = NULL;
- for (Int_t iCluster = 0; iCluster < AliTRDseedV1::kNclusters; iCluster++){
- // if we had something in the fClusters[iCluster] before copying,
- // then this entry in the array should not be empty. Fill it.
- if (fClusters[iCluster]){
- hltCluster = (AliHLTTRDCluster*) iterPtr;
- fClusters[iCluster] = hltCluster;
- iterPtr += hltCluster->GetSize();
- //hltCluster->Print();
- }
+// for (Int_t iCluster = 0; iCluster < AliTRDseedV1::kNclusters; iCluster++){
+// // if we had something in the fClusters[iCluster] before copying,
+// // then this entry in the array should not be empty. Fill it.
+// if (fClusters[iCluster]){
+// hltCluster = (AliHLTTRDCluster*) iterPtr;
+// fClusters[iCluster] = hltCluster;
+// iterPtr += hltCluster->GetSize();
+// //hltCluster->Print();
+// }
- }
-}
+// }
+// }
+//-*- Mode: C++ -*-
+// $Id$
+
#ifndef ALIHLTTRDTRACKLET_H
#define ALIHLTTRDTRACKLET_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 *
#include "AliTRDseedV1.h"
#include "AliHLTDataTypes.h"
#include "AliHLTLogging.h"
-class AliHLTTRDCluster;
+#include "AliHLTTRDCluster.h"
class AliHLTTRDTracklet
{
public:
AliHLTTRDTracklet();
- AliHLTTRDTracklet(AliTRDseedV1* inTracklet);
+ AliHLTTRDTracklet(const AliTRDseedV1* const inTracklet);
- void ExportTRDTracklet(AliTRDseedV1* outTracklet);
- void AddClusters();
- void CopyDataMembers();
- AliHLTUInt8_t *GetEndPointer() // Returns pointer to the end of the tracklet
- { return ((AliHLTUInt8_t *) this + fSize); };
- AliHLTUInt32_t GetSize(){ return fSize; };
- void Print(Bool_t printClusters = kTRUE);
- void ReadClustersFromMemory(void *input);
+ void CopyDataMembers(const AliTRDseedV1* const inTracklet);
+ void ExportTRDTracklet(AliTRDseedV1* const outTracklet) const;
+ AliHLTUInt8_t *GetEndPointer() const // Returns pointer to the end of the tracklet
+ { return ((AliHLTUInt8_t *)this + fSize); };
+ AliHLTUInt32_t GetSize() const { return fSize; };
+ void Print(Bool_t printClusters = kTRUE) const;
+ // void ReadClustersFromMemory(void *input);
private:
AliHLTTRDTracklet(const AliHLTTRDTracklet&);
AliHLTTRDTracklet& operator=(const AliHLTTRDTracklet&);
void InitArrays();
-
- AliTRDseedV1* fTRDtracklet;
- AliHLTUInt32_t fSize; // Size of the tracklet with clusters in the memory
-
- /* Defenitely need */
- AliHLTTRDCluster *fClusters[AliTRDseedV1::kNclusters]; // Clusters
- Float_t fYref[2]; // Reference y
- Float_t fZref[2]; // Reference z
- //Float_t fSigmaY; // "Robust" sigma in Y - constant fit
- Float_t fSigmaY2; // "Robust" sigma in Y - line fit
+ /* Defenitely need */
+ UShort_t fN; // number of clusters attached/used/shared
+ Short_t fDet; // TRD detector
+ Float_t fdX; // length of time bin
+ Float_t fYref[2]; // Reference y
+ Float_t fZref[2]; // Reference z
+ Float_t fS2Y; // "Robust" sigma in Y - line fit
+ Float_t fPt; // Momentum estimate for tracklet [GeV/c]
+
/* Probably need */
- Float_t fTilt; // Tilting angle
- Float_t fPadLength; // Pad length
- Float_t fX0; // X0 position
-// Float_t fX[knTimebins]; //! X position
-// Float_t fY[knTimebins]; //! Y position
-// Float_t fZ[knTimebins]; //! Z position
- Int_t fIndexes[AliTRDseedV1::kNclusters]; //! Indexes
- Float_t fYfit[2]; // Y fit position +derivation
+ Float_t fPad3; // Tilting angle
+ Float_t fPad2; // Pad length
+ Float_t fX0; // X0 position
+ Float_t fYfit[2]; // Y fit position +derivation
+ Float_t fZfit[2]; // Z fit position
+ Float_t fC; // Curvature
+ Float_t fChi2; // Global chi2
+ Float_t fProb[AliPID::kSPECIES];// PID probabilities
+
+ /* Not needed */
+ //Int_t fLabels[3]; // Labels
+ //Float_t fX[knTimebins]; //! X position
+ //Float_t fY[knTimebins]; //! Y position
+ //Float_t fZ[knTimebins]; //! Z position
//Float_t fYfitR[2]; // Y fit position +derivation
- Float_t fZfit[2]; // Z fit position
//Float_t fZfitR[2]; // Z fit position
//Float_t fMeanz; // Mean vaue of z
//Float_t fZProb; // Max probbable z
- Int_t fLabels[3]; // Labels
- //Int_t fN; // Number of associated clusters
- Int_t fN2; // Number of not crossed
- Int_t fNUsed; // Number of used clusters
//Int_t fFreq; // Frequency
//Int_t fNChange; // Change z counter
//Float_t fMPads; // Mean number of pads per cluster
- Float_t fC; // Curvature
//Float_t fCC; // Curvature with constrain
- Float_t fChi2; // Global chi2
//Float_t fChi2Z; // Global chi2
- /* ======= From AliTRDseedV1 ======== */
-
- /* Defenitely need */
- Int_t fDet; // TRD detector
- Float_t fPt; // Momentum estimate for tracklet [GeV/c]
- Float_t fdX; // length of time bin
+ AliHLTUInt32_t fSize; // Size of the tracklet with clusters in the memory
+ AliHLTUInt32_t fCount; // Number of clusters saved in the open array
- /* Probably need */
+ struct IndexAndCluster{
+ Int_t Index;
+ AliHLTTRDCluster Cluster;
+ IndexAndCluster():Index(-1),Cluster() {}
+ }
+#if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
+ fClusters[1]; // Open array of clusters and their index
+#else
+ fClusters[0]; // Open array of clusters and their index
+#endif
};
//* See cxx source for full Copyright notice *
#ifndef _ALIHLTTRDTRACKLETWORDARRAY_H_
-#define _ALITHLTTRDTRACKLETWORDARRAY_H_
+#define _ALIHLTTRDTRACKLETWORDARRAY_H_
#include "AliHLTDataTypes.h"
#include "AliHLTStdIncludes.h"
-// $Id:$
+// $Id$
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
ClassImp(AliHLTTRDUtils)
-AliHLTUInt32_t AliHLTTRDUtils::AddClustersToOutput(TClonesArray* inClusterArray, AliHLTUInt8_t* outBlockPtr)
+AliHLTUInt32_t AliHLTTRDUtils::AddClustersToOutput(TClonesArray* inClusterArray, AliHLTUInt8_t* outBlockPtr, Int_t nTimeBins)
{
AliTRDcluster* cluster = 0;
AliHLTUInt32_t addedSize = 0;
// == OUTdatatype pointer
- AliHLTTRDCluster * outPtr = (AliHLTTRDCluster*)outBlockPtr;
+ AliHLTTRDCluster* outPtr = (AliHLTTRDCluster*)outBlockPtr;
if (inClusterArray){
Int_t nbEntries = inClusterArray->GetEntries();
for (Int_t iCluster = 0; iCluster<nbEntries; iCluster++){
//cout << "Geting cluster #" << iCluster << endl;
- UInt_t blockSize=0;
- cluster = dynamic_cast<AliTRDcluster*>(inClusterArray->At(iCluster));
+ cluster = (AliTRDcluster*)(inClusterArray->At(iCluster));
AliHLTTRDCluster *hltCluster = new (outPtr) AliHLTTRDCluster(cluster);
//cout << Form("cluster added at 0x%x (%i)\n",outPtr,outPtr);
- blockSize = sizeof(*hltCluster);
-
- addedSize += blockSize;
- outBlockPtr += blockSize;
+ addedSize += sizeof(*hltCluster);
+ outBlockPtr += sizeof(*hltCluster);
outPtr = (AliHLTTRDCluster*)outBlockPtr;
}
}
+
+ Int_t *TBptr = (Int_t*)outPtr;
+ *TBptr = nTimeBins;
+
+ addedSize += sizeof(*TBptr);
+ outBlockPtr += sizeof(*TBptr);
+
return addedSize;
}
-AliHLTUInt32_t AliHLTTRDUtils::AddTracksToOutput(TClonesArray* inTrackArray, AliHLTUInt8_t* output)
+AliHLTUInt32_t AliHLTTRDUtils::AddTracksToOutput(TClonesArray* inTrackArray, AliHLTUInt8_t* output, Int_t nTimeBins)
{
//cout << "\nWriting tracks to the Memory\n ============= \n";
+
+ Int_t *TBptr = (Int_t*)output;
+ *TBptr = nTimeBins;
+
AliTRDtrackV1* track = 0;
- AliHLTUInt32_t addedSize = 0;
- AliHLTUInt8_t *iterPtr = output;
- AliHLTTRDTrack * outPtr = (AliHLTTRDTrack*)iterPtr;
-
+ AliHLTUInt32_t addedSize = sizeof(*TBptr);
+ AliHLTUInt8_t* iterPtr = output+addedSize;
+ AliHLTTRDTrack* outPtr = (AliHLTTRDTrack*)iterPtr;
+
if (inTrackArray){
Int_t nbTracks = inTrackArray->GetEntries();
for (Int_t iTrack = 0; iTrack<nbTracks; iTrack++){
AliHLTUInt32_t trackSize=0;
- track = dynamic_cast<AliTRDtrackV1*>(inTrackArray->At(iTrack));
+ track = (AliTRDtrackV1*)(inTrackArray->At(iTrack));
//track->Print();
AliHLTTRDTrack *hltTrack = new (outPtr) AliHLTTRDTrack(track);
* Read cluster to the TClonesArray from the memory
*/
//============================================================================
-AliHLTUInt32_t AliHLTTRDUtils::ReadClusters(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size)
+AliHLTUInt32_t AliHLTTRDUtils::ReadClusters(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins)
{
//HLTDebug("\nReading clusters from the Memory\n ============= \n");
AliHLTTRDCluster * curCluster;
UInt_t clusterSize = sizeof(AliHLTTRDCluster), curSize = 0;
Int_t i=0;
-
+
+ if(nTimeBins){
+ *nTimeBins=*(Int_t*)(((AliHLTUInt8_t*)inputPtr)+size-sizeof(Int_t));
+ //HLTDebug("Reading number of time bins from input block: %d", *nTimeBins);
+ }
+ size-=sizeof(*nTimeBins);
+
curCluster = (AliHLTTRDCluster*) inputPtr;
while (curSize + clusterSize <= size)
{
return i;
}
-AliHLTUInt32_t AliHLTTRDUtils::ReadTracks(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size)
+AliHLTUInt32_t AliHLTTRDUtils::ReadTracks(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins)
{
- AliHLTUInt8_t* iterPtr = (AliHLTUInt8_t* )inputPtr;
+ if(nTimeBins){
+ *nTimeBins=*(Int_t*)inputPtr;
+ //HLTDebug("Reading number of time bins from input block: %d", *nTimeBins);
+ }
+
+ AliHLTUInt8_t* iterPtr = ((AliHLTUInt8_t*)inputPtr)+sizeof(*nTimeBins);
//cout << "\nReading tracks from the Memory\n ============= \n";
//HLTDebug ("\nReading tracks from the Memory\n ============= \n");
AliHLTTRDTrack * hltTrack;
- AliHLTUInt32_t trackSize = 0, curSize = 0;
+ AliHLTUInt32_t trackSize = 0, curSize = sizeof(*nTimeBins);
Int_t counter=0;
while (curSize < size)
trackSize = hltTrack->GetSize();
//HLTDebug("GetSize() %i", trackSize);
- hltTrack->ReadTrackletsFromMemory(iterPtr + sizeof(AliHLTTRDTrack));
+ // hltTrack->ReadTrackletsFromMemory(iterPtr + sizeof(AliHLTTRDTrack));
AliTRDtrackV1* curTRDTrack = new((*outArray)[counter]) AliTRDtrackV1();
hltTrack->ExportTRDTrack(curTRDTrack);
// $Id$
#ifndef ALIHLTTRDUTILS_H
#define ALIHLTTRDUTILS_H
-/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+//* 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 *
////////////////////////////////////////////////////////////////////////////
// //
{
public:
virtual ~AliHLTTRDUtils(){}
- static AliHLTUInt32_t AddClustersToOutput(TClonesArray* inClusterArray, AliHLTUInt8_t* outBlockPtr);
- static AliHLTUInt32_t AddTracksToOutput(TClonesArray* inTrackArray,AliHLTUInt8_t* output);
- static AliHLTUInt32_t ReadClusters(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size);
- static AliHLTUInt32_t ReadTracks(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size);
+ static AliHLTUInt32_t AddClustersToOutput(TClonesArray* inClusterArray, AliHLTUInt8_t* outBlockPtr, Int_t nTimeBins=24);
+ static AliHLTUInt32_t AddTracksToOutput(TClonesArray* inTrackArray, AliHLTUInt8_t* output, Int_t nTimeBins=24);
+ static AliHLTUInt32_t ReadClusters(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins=0x0);
+ static AliHLTUInt32_t ReadTracks(TClonesArray *outArray, void* inputPtr, AliHLTUInt32_t size, Int_t* nTimeBins=0x0);
static AliHLTUInt32_t AddESDToOutput(const AliESDEvent* const esd, AliHLTUInt8_t* const outBlockPtr);
ClassDef(AliHLTTRDUtils, 0)