@brief A TRDCalibration processing component for the HLT. */
#if __GNUC__ >= 3
- using namespace std;
+using namespace std;
#endif
#include "TTree.h"
#include "AliHLTTRDUtils.h"
#include "AliCDBManager.h"
+#include "AliCDBStorage.h"
#include "AliRawReaderMemory.h"
#include "AliTRDCalibraFillHisto.h"
#include "AliTRDtrackV1.h"
ClassImp(AliHLTTRDCalibrationComponent);
AliHLTTRDCalibrationComponent::AliHLTTRDCalibrationComponent():
- AliHLTCalibrationProcessor(),
- fTRDCalibraFillHisto(NULL),
- fOutputPercentage(100), // By default we copy to the output exactly what we got as input
- fStrorageDBpath("local://$ALICE_ROOT/OCDB"),
- fCDB(NULL)
+ AliHLTCalibrationProcessor(),
+ fTRDCalibraFillHisto(NULL),
+ fOutputPercentage(100) // By default we copy to the output exactly what we got as input
{
- // Default constructor
+ // Default constructor
}
AliHLTTRDCalibrationComponent::~AliHLTTRDCalibrationComponent()
{
- // Destructor
- ;
+ // Destructor
+ ;
}
const char* AliHLTTRDCalibrationComponent::GetComponentID()
{
- // Return the component ID const char *
- return "TRDCalibration"; // The ID of this component
+ // Return the component ID const char *
+ return "TRDCalibration"; // The ID of this component
}
void AliHLTTRDCalibrationComponent::GetInputDataTypes( vector<AliHLTComponent_DataType>& 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 );
+ // 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 );
}
AliHLTComponent_DataType AliHLTTRDCalibrationComponent::GetOutputDataType()
{
- // Get the output data type
- return AliHLTTRDDefinitions::fgkCalibrationDataType;
+ // 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;
+ // Get the output data size
+ constBase = 0;
+ inputMultiplier = ((double)fOutputPercentage)/100.0;
}
AliHLTComponent* AliHLTTRDCalibrationComponent::Spawn()
{
- // Spawn function, return new instance of this class
- return new AliHLTTRDCalibrationComponent;
+ // Spawn function, return new instance of this class
+ return new AliHLTTRDCalibrationComponent;
};
Int_t AliHLTTRDCalibrationComponent::ScanArgument( int argc, const char** argv )
{
- // perform initialization. We check whether our relative output size is specified in the arguments.
- int i = 0;
- char* cpErr;
- while ( i < argc )
+ // perform initialization. We check whether our relative output size is specified in the arguments.
+ int i = 0;
+ char* cpErr;
+ while ( i < argc )
+ {
+ HLTDebug("argv[%d] == %s", i, argv[i] );
+ if ( !strcmp( argv[i], "output_percentage" ) )
{
- HLTDebug("argv[%d] == %s", i, argv[i] );
- if ( !strcmp( argv[i], "output_percentage" ) )
- {
- if ( i+1>=argc )
- {
- HLTError("Missing output_percentage parameter");
- return ENOTSUP;
- }
- HLTDebug("argv[%d+1] == %s", i, argv[i+1] );
- fOutputPercentage = strtoul( argv[i+1], &cpErr, 0 );
- if ( *cpErr )
- {
- HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
- return EINVAL;
- }
- HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
- i += 2;
- continue;
- }
- else if ( strcmp( argv[i], "-cdb" ) == 0)
- {
- if ( i+1 >= argc )
- {
- HLTError("Missing -cdb argument");
- return ENOTSUP;
- }
- fStrorageDBpath = argv[i+1];
- HLTInfo("DB storage is %s", fStrorageDBpath.c_str() );
- i += 2;
- continue;
- }
- else {
- HLTError("Unknown option '%s'", argv[i] );
- return EINVAL;
+ if ( i+1>=argc )
+ {
+ HLTError("Missing output_percentage parameter");
+ return ENOTSUP;
}
+ HLTDebug("argv[%d+1] == %s", i, argv[i+1] );
+ fOutputPercentage = strtoul( argv[i+1], &cpErr, 0 );
+ if ( *cpErr )
+ {
+ HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
+ return EINVAL;
+ }
+ HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
+ i += 2;
+ continue;
}
- return 0;
+ else {
+ HLTError("Unknown option '%s'", argv[i] );
+ return EINVAL;
+ }
+ }
+ return 0;
}
Int_t AliHLTTRDCalibrationComponent::InitCalibration()
{
- //init the calibration
- fCDB = AliCDBManager::Instance();
- if (!fCDB)
- {
- HLTError("Could not get CDB instance, fCDB 0x%x", fCDB);
- }
+ if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
+ HLTError("DefaultStorage is not Set in CDBManager");
+ return -1;
+ }
+ 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
- {
- fCDB->SetRun(0); // THIS HAS TO BE RETRIEVED !!!
- fCDB->SetDefaultStorage(fStrorageDBpath.c_str());
- HLTDebug("fCDB 0x%x", fCDB);
- }
- 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
- return 0;
+ {
+ HLTError("Could not get CDB instance", "cdb 0x%x", cdb);
+ return -1;
+ }
+ }
+ 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
+ return 0;
}
Int_t AliHLTTRDCalibrationComponent::DeinitCalibration()
{
- HLTDebug("DeinitCalibration");
+ HLTDebug("DeinitCalibration");
- // Deinitialization of the component
+ // Deinitialization of the component
- if (fCDB)
- {
- HLTDebug("destroy fCDB");
- fCDB->Destroy();
- fCDB = 0;
- }
- return 0;
+ return 0;
}
Int_t AliHLTTRDCalibrationComponent::ProcessCalibration(const AliHLTComponent_EventData& evtData,
AliHLTUInt32_t& /*size*/,
vector<AliHLTComponent_BlockData>& /*outputBlocks*/)
{
- HLTDebug("NofBlocks %lu", evtData.fBlockCnt );
- // Process an event
-
- // Loop over all input blocks in the event
- vector<AliHLTComponent_DataType> expectedDataTypes;
- GetInputDataTypes(expectedDataTypes);
- for ( unsigned long iBlock = 0; iBlock < evtData.fBlockCnt; iBlock++ )
- {
- const AliHLTComponentBlockData &block = blocks[iBlock];
- AliHLTComponentDataType inputDataType = block.fDataType;
- Bool_t correctDataType = kFALSE;
-
- for(UInt_t i = 0; i < expectedDataTypes.size(); i++)
- if( expectedDataTypes.at(i) == inputDataType)
- correctDataType = kTRUE;
- if (!correctDataType) {
- HLTDebug( "Block # %i/%i; Event 0x%08LX (%Lu) Wrong received datatype: %s - Skipping",
- iBlock, evtData.fBlockCnt,
- evtData.fEventID, evtData.fEventID,
- DataType2Text(inputDataType).c_str());
- continue;
- }
- else {
- HLTDebug("We get the right data type: Block # %i/%i; Event 0x%08LX (%Lu) Received datatype: %s",
- iBlock, evtData.fBlockCnt-1,
- evtData.fEventID, evtData.fEventID,
- DataType2Text(inputDataType).c_str());
- }
-
- 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);
- }
- }
+ HLTDebug("NofBlocks %lu", evtData.fBlockCnt );
+ // Process an event
+
+ // Loop over all input blocks in the event
+ vector<AliHLTComponent_DataType> expectedDataTypes;
+ GetInputDataTypes(expectedDataTypes);
+ for ( unsigned long iBlock = 0; iBlock < evtData.fBlockCnt; iBlock++ )
+ {
+ const AliHLTComponentBlockData &block = blocks[iBlock];
+ AliHLTComponentDataType inputDataType = block.fDataType;
+ Bool_t correctDataType = kFALSE;
+
+ for(UInt_t i = 0; i < expectedDataTypes.size(); i++)
+ if( expectedDataTypes.at(i) == inputDataType)
+ correctDataType = kTRUE;
+ if (!correctDataType) {
+ HLTDebug( "Block # %i/%i; Event 0x%08LX (%Lu) Wrong received datatype: %s - Skipping",
+ iBlock, evtData.fBlockCnt,
+ evtData.fEventID, evtData.fEventID,
+ DataType2Text(inputDataType).c_str());
+ continue;
+ }
+ else {
+ HLTDebug("We get the right data type: Block # %i/%i; Event 0x%08LX (%Lu) Received datatype: %s",
+ iBlock, evtData.fBlockCnt-1,
+ evtData.fEventID, evtData.fEventID,
+ DataType2Text(inputDataType).c_str());
+ }
+
+ 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);
+ }
+ }
- TObjArray *outArray = FormOutput();
- if (outArray) {
- PushBack(outArray, AliHLTTRDDefinitions::fgkCalibrationDataType);
- delete outArray;
- }
+ TObjArray *outArray = FormOutput();
+ if (outArray) {
+ PushBack(outArray, AliHLTTRDDefinitions::fgkCalibrationDataType);
+ delete outArray;
+ }
- }
- return 0;
+ }
+ return 0;
}
//============================================================================
TObjArray* AliHLTTRDCalibrationComponent::FormOutput()
{
- TObjArray *outArray=new TObjArray(3);
+ TObjArray *outArray=new TObjArray(3);
- // gain histo
- TH2I *hCH2d = fTRDCalibraFillHisto->GetCH2d();
- outArray->Add(hCH2d);
+ // gain histo
+ TH2I *hCH2d = fTRDCalibraFillHisto->GetCH2d();
+ outArray->Add(hCH2d);
- // drift velocity histo
- TProfile2D *hPH2d = fTRDCalibraFillHisto->GetPH2d();
- outArray->Add(hPH2d);
+ // drift velocity histo
+ TProfile2D *hPH2d = fTRDCalibraFillHisto->GetPH2d();
+ outArray->Add(hPH2d);
- // PRF histo
- TProfile2D *hPRF2d = fTRDCalibraFillHisto->GetPRF2d();
- outArray->Add(hPRF2d);
+ // PRF histo
+ TProfile2D *hPRF2d = fTRDCalibraFillHisto->GetPRF2d();
+ outArray->Add(hPRF2d);
- HLTDebug("GetCH2d = 0x%x; NEntries = %i; size = %i", hCH2d, hCH2d->GetEntries(), sizeof(hCH2d));
- hCH2d->Print();
- HLTDebug("GetPH2d = 0x%x; NEntries = %i; size = %i", hPH2d, hPH2d->GetEntries(), sizeof(hPH2d));
- 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));
+ HLTDebug("GetCH2d = 0x%x; NEntries = %i; size = %i", hCH2d, hCH2d->GetEntries(), sizeof(hCH2d));
+ hCH2d->Print();
+ HLTDebug("GetPH2d = 0x%x; NEntries = %i; size = %i", hPH2d, hPH2d->GetEntries(), sizeof(hPH2d));
+ 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;
+ return outArray;
}
// 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
- string fStrorageDBpath; // Default path for OCDB
- AliCDBManager *fCDB; //! Pointer to OCDB
- ClassDef(AliHLTTRDCalibrationComponent, 0)
+ ClassDef(AliHLTTRDCalibrationComponent, 1)
};
#endif
//_____________________________________________________________________________
AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliTRDReconstructor *const rec)
:AliTRDclusterizer(rec)
- , fMemBlock(NULL)
+ ,fClMemBlock(NULL)
+ ,fTrMemBlock(NULL)
+ ,fTrMemCurrPtr(NULL)
{
//
// AliHLTTRDClusterizer default constructor
//_____________________________________________________________________________
AliHLTTRDClusterizer::AliHLTTRDClusterizer(const Text_t *const name, const Text_t *const title, const AliTRDReconstructor *const rec)
: AliTRDclusterizer(name,title,rec)
- , fMemBlock(NULL)
+ ,fClMemBlock(NULL)
+ ,fTrMemBlock(NULL)
+ ,fTrMemCurrPtr(NULL)
{
//
// AliHLTTRDClusterizer constructor
//_____________________________________________________________________________
AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliHLTTRDClusterizer& c)
: AliTRDclusterizer(c)
- , fMemBlock(NULL)
+ ,fClMemBlock(NULL)
+ ,fTrMemBlock(NULL)
+ ,fTrMemCurrPtr(NULL)
{
//
// AliHLTTRDClusterizer copy constructor
// Copy function
//
- ((AliHLTTRDClusterizer&)c).fMemBlock = NULL;
+ ((AliHLTTRDClusterizer&)c).fClMemBlock = NULL;
+ ((AliHLTTRDClusterizer&)c).fTrMemBlock = NULL;
+ ((AliHLTTRDClusterizer&)c).fTrMemCurrPtr = NULL;
}
//_____________________________________________________________________________
// Add a cluster to the array
//
- AliHLTTRDCluster *ptr = &(((AliHLTTRDCluster*)GetMemBlock())[fNoOfClusters]);
+ AliHLTTRDCluster *ptr = &(((AliHLTTRDCluster*)GetClMemBlock())[fNoOfClusters]);
new(ptr) AliHLTTRDCluster(cluster);
}
+
+//_____________________________________________________________________________
+void AliHLTTRDClusterizer::AddTrackletsToArray()
+{
+ //
+ // Add the online tracklets of this chamber to the array
+ //
+
+ // memcpy(&(((UInt_t*)GetTrMemBlock())[fNoOfTracklets]),fTrackletContainer[0],256*sizeof(UInt_t));
+ // memcpy(&(((UInt_t*)GetTrMemBlock())[fNoOfTracklets+256]),fTrackletContainer[1],256*sizeof(UInt_t));
+
+ // fNoOfTracklets += 512;
+
+ UInt_t* trackletword;
+ AliHLTTRDTrackletWordArray* trklArr = new(fTrMemCurrPtr) AliHLTTRDTrackletWordArray(fDet);
+ fTrMemCurrPtr += sizeof(AliHLTTRDTrackletWordArray);
+ for(Int_t side=0; side<2; side++)
+ {
+ Int_t trkl=0;
+ trackletword=fTrackletContainer[side];
+ while(trackletword[trkl]>0){
+ trkl++;
+ }
+ memcpy(fTrMemCurrPtr,fTrackletContainer[side],trkl*sizeof(UInt_t));
+ fTrMemCurrPtr += trkl*sizeof(UInt_t);
+ trklArr->fCount += trkl;
+ }
+
+ // fTrackletContainer[0]+=256;
+ // fTrackletContainer[1]+=256;
+ // fNoOfTracklets += 512;
+
+}
////////////////////////////////////////////////////////////////////////////
#include "AliTRDclusterizer.h"
+#include "AliTRDReconstructor.h"
#include "AliHLTTRDCluster.h"
#include "AliHLTDataTypes.h"
+#include "AliHLTTRDTrackletWordArray.h"
-class AliTRDReconstructor;
-class TClonesArray;
+class AliHLTTRDTrackletWord;
class AliHLTTRDClusterizer : public AliTRDclusterizer
{
AliHLTTRDClusterizer& operator=(const AliHLTTRDClusterizer& c);
void Copy(TObject& c) const;
- void SetMemBlock(AliHLTUInt8_t* ptr){fMemBlock=ptr;fNoOfClusters=0;}
- AliHLTUInt8_t* GetMemBlock(){return fMemBlock;}
- UInt_t GetAddedSize(){return fNoOfClusters*sizeof(AliHLTTRDCluster);}
+ 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
+ }else{
+ 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));}
protected:
void AddClusterToArray(AliTRDcluster *cluster);
+ void AddTrackletsToArray();
- TClonesArray* RecPoints(){return 0x0;} //these are functions in the parents class. must not be used in hlt!
- void SetClustersOwner(Bool_t /*own*/){} //if used accidentally it may give an compilation error because are protected,
- //but the error can also appear in run time
+ TClonesArray* RecPoints(){return 0x0;} //these are functions in the parents class and must not be used in hlt!
+ TClonesArray* TrackletsArray(){return 0x0;} //if used accidentally it may give a compilation error because they are protected,
+ void SetClustersOwner(Bool_t /*own*/){} //but it could be that the error appears only in run time
- AliHLTUInt8_t* fMemBlock;
+ AliHLTUInt8_t* fClMemBlock;
+ AliHLTUInt8_t* fTrMemBlock;
+ AliHLTUInt8_t* fTrMemCurrPtr;
- ClassDef(AliHLTTRDClusterizer, 0)
+ ClassDef(AliHLTTRDClusterizer, 1)
};
#endif
#include "AliGeomManager.h"
#include "AliTRDReconstructor.h"
#include "AliCDBManager.h"
+#include "AliCDBStorage.h"
#include "AliHLTTRDClusterizer.h"
#include "AliTRDrecoParam.h"
#include "AliTRDrawStreamBase.h"
AliHLTTRDClusterizerComponent::AliHLTTRDClusterizerComponent():
AliHLTProcessor(),
- fOutputPercentage(100), // By default we copy to the output exactly what we got as input
- fStrorageDBpath("local://$ALICE_ROOT/OCDB"),
+ fOutputPercentage(500),
+ fOutputConst(0),
fClusterizer(NULL),
fRecoParam(NULL),
- fCDB(NULL),
fMemReader(NULL),
- fReconstructor(NULL),
- fGeometryFileName("")
+ fReconstructor(NULL)
{
// Default constructor
- fGeometryFileName = getenv("ALICE_ROOT");
- fGeometryFileName += "/HLT/TRD/geometry.root";
}
AliHLTTRDClusterizerComponent::~AliHLTTRDClusterizerComponent()
{
// Get the list of input data
list.clear(); // We do not have any requirements for our input data type(s).
- list.push_back( AliHLTTRDDefinitions::fgkDDLRawDataType );
+ list.push_back( (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) );
}
AliHLTComponent_DataType AliHLTTRDClusterizerComponent::GetOutputDataType()
{
// Get the output data type
- return AliHLTTRDDefinitions::fgkClusterDataType;
+ return kAliHLTMultipleDataType;
}
+int AliHLTTRDClusterizerComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
+{
+ // Get the output data type
+ tgtList.clear();
+ tgtList.push_back(AliHLTTRDDefinitions::fgkClusterDataType);
+ tgtList.push_back(AliHLTTRDDefinitions::fgkMCMtrackletDataType);
+ return tgtList.size();
+}
+
+
void AliHLTTRDClusterizerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
{
// Get the output data size
- constBase = 0;
+ constBase = fOutputConst;
inputMultiplier = ((double)fOutputPercentage)/100.0;
}
int AliHLTTRDClusterizerComponent::DoInit( int argc, const char** argv )
{
// perform initialization. We check whether our relative output size is specified in the arguments.
- fOutputPercentage = 100;
Int_t iRawDataVersion = 2;
int i = 0;
char* cpErr;
// the data type will become obsolete as soon as the formats are established
Int_t iRecoDataType = -1; // default will be simulation
Int_t iyPosMethod = 1; // 0=COG 1=LUT 2=Gauss
+ Bool_t bProcessTracklets = kFALSE;
+ string geometryFileName = "";
while ( i < argc )
{
HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
return EINVAL;
}
- HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
- i += 2;
- }
- else if ( strcmp( argv[i], "-cdb" ) == 0)
- {
- if ( i+1 >= argc )
- {
- HLTError("Missing -cdb argument");
- return ENOTSUP;
- }
- fStrorageDBpath = argv[i+1];
- HLTInfo("DB storage is %s", fStrorageDBpath.c_str() );
+ HLTInfo("Output percentage set to %i %%", fOutputPercentage );
i += 2;
}
else if ( strcmp( argv[i], "-lowflux" ) == 0)
HLTError("Missing -geometry argument");
return ENOTSUP;
}
- fGeometryFileName = argv[i+1];
- HLTInfo("GeomFile storage is %s", fGeometryFileName.c_str() );
+ geometryFileName = argv[i+1];
+ HLTInfo("GeomFile storage is %s", geometryFileName.c_str() );
i += 2;
- }
-
+ }
+ else if ( strcmp( argv[i], "-processTracklets" ) == 0)
+ {
+ bProcessTracklets = kTRUE;
+ i++;
+ }
else if ( strcmp( argv[i], "-yPosMethod" ) == 0)
{
if ( i+1 >= argc )
}
i += 2;
}
+ else if ( strcmp( argv[i], "-noZS" ) == 0) //no zero surpression in the input data
+ {
+ fOutputPercentage = 100;
+ i++;
+ }
else{
HLTError("Unknown option '%s'", argv[i] );
// THE "REAL" INIT COMES HERE
- if (iRecoParamType < 0 || iRecoParamType > 2)
+if (iRecoParamType < 0 || iRecoParamType > 2)
{
HLTWarning("No reco param selected. Use -lowflux or -highflux flag. Defaulting to low flux.");
iRecoParamType = 0;
case 1: recoOptions += ",!gs,lut"; break;
case 2: recoOptions += ",gs,!lut"; break;
}
-
+ if(bProcessTracklets) recoOptions += ",tp";
+ else recoOptions += ",!tp";
+
+ HLTInfo("Reconstructor options: %s",recoOptions.Data());
fReconstructor->SetOption(recoOptions.Data());
// init the raw data type to be used...
}
// the DATA BASE STUFF
- fCDB = AliCDBManager::Instance();
- if (!fCDB)
- {
- HLTError("Could not get CDB instance", "fCDB 0x%x", fCDB);
- }
- else
- {
- fCDB->SetRun(0); // THIS HAS TO BE RETRIEVED !!!
- fCDB->SetDefaultStorage(fStrorageDBpath.c_str());
- HLTDebug("CDB instance; fCDB 0x%x", fCDB);
- }
-
- if((AliGeomManager::GetGeometry()) == NULL){
-
- if ( TFile::Open(fGeometryFileName.c_str())) {
- AliGeomManager::LoadGeometry(fGeometryFileName.c_str());
+
+ if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
+ HLTError("DefaultStorage is not Set in CDBManager");
+ return -1;
+ }
+ 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;
+ }
+ }
+ HLTInfo("CDB default storage: %s; RunNo: %i", (AliCDBManager::Instance()->GetDefaultStorage()->GetBaseFolder()).Data(), AliCDBManager::Instance()->GetRun());
+
+ if(!AliGeomManager::GetGeometry()){
+ if(!TFile::Open(geometryFileName.c_str())){
+ HLTInfo("Loading standard geometry file");
+ AliGeomManager::LoadGeometry();
+ }else{
+ HLTWarning("Loading non-standard geometry file");
+ AliGeomManager::LoadGeometry(geometryFileName.c_str());
}
- else {
- HLTError("Cannot load geometry from file %s",fGeometryFileName.c_str());
+ if(!AliGeomManager::GetGeometry()){
+ HLTError("Cannot load geometry");
return EINVAL;
}
}
- else
+ else{
HLTInfo("Geometry Already Loaded");
+ }
fMemReader = new AliRawReaderMemory;
fClusterizer->SetReconstructor(fReconstructor);
fClusterizer->SetUseLabels(kFALSE);
fClusterizer->SetRawVersion(iRawDataVersion);
+
+ if(fReconstructor->IsProcessingTracklets())
+ fOutputConst = fClusterizer->GetTrMemBlockSize();
return 0;
}
fReconstructor = 0x0;
return 0;
-
- if (fCDB)
- {
- HLTDebug("destroy fCDB");
- fCDB->Destroy();
- fCDB = 0;
- }
-
if (fRecoParam)
{
HLTDebug("Deleting fRecoParam");
vector<AliHLTComponent_BlockData>& outputBlocks )
{
// Process an event
- HLTDebug( "NofBlocks %lu", evtData.fBlockCnt );
+
+ if (evtData.fEventID == 1)
+ CALLGRIND_START_INSTRUMENTATION;
+
+ HLTDebug( "NofBlocks %i", evtData.fBlockCnt );
// Process an event
AliHLTUInt32_t totalSize = 0, offset = 0;
// Loop over all input blocks in the event
AliHLTComponentDataType expectedDataType = (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD);
- for ( unsigned long i = 0; i < evtData.fBlockCnt; i++ )
- {
- if (evtData.fEventID == 1)
- CALLGRIND_START_INSTRUMENTATION;
-
- const AliHLTComponentBlockData &block = blocks[i];
+ for ( UInt_t iBlock = 0; iBlock < evtData.fBlockCnt; iBlock++ )
+ {
+ const AliHLTComponentBlockData &block = blocks[iBlock];
// lets not use the internal TRD data types here : AliHLTTRDDefinitions::fgkDDLRawDataType
// which is depreciated - we use HLT global defs instead
// if ( block.fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) )
AliHLTComponentDataType inputDataType = block.fDataType;
if ( inputDataType != expectedDataType)
{
- HLTDebug( "Block # %i/%i; Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s; Skipping",
- i, evtData.fBlockCnt,
+ HLTDebug( "Block # %i/%i; Event 0x%08LX (%Lu) Wrong received datatype: %s - required datatype: %s; Skipping",
+ iBlock, evtData.fBlockCnt,
evtData.fEventID, evtData.fEventID,
DataType2Text(inputDataType).c_str(),
DataType2Text(expectedDataType).c_str());
}
else
{
- HLTDebug("We get the right data type: Block # %i/%i; Event 0x%08LX (%Lu) Received datatype: %s",
- i, evtData.fBlockCnt,
- evtData.fEventID, evtData.fEventID,
- DataType2Text(inputDataType).c_str());
+ HLTDebug("We get the right data type: Block # %i/%i; Event 0x%08LX (%Lu) Received datatype: %s; Block Size: %i",
+ iBlock, evtData.fBlockCnt,
+ evtData.fEventID, evtData.fEventID,
+ DataType2Text(inputDataType).c_str(),
+ block.fSize);
}
// fMemReader->Reset();
fMemReader->SetEquipmentID( id );
- fClusterizer->SetMemBlock((AliHLTUInt8_t*)(outputPtr+offset));
+ fClusterizer->SetMemBlock(outputPtr+offset);
Bool_t iclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
if (iclustered == kTRUE)
{
// put the tree into output
//fcTree->Print();
- AliHLTUInt32_t addedSize = fClusterizer->GetAddedSize();
+ AliHLTUInt32_t addedSize;
+ if(fReconstructor->IsProcessingTracklets()){
+ addedSize = fClusterizer->GetAddedTrSize();
+ totalSize += fClusterizer->GetTrMemBlockSize(); //if IsProcessingTracklets() is enabled we always reserve a data block of size GetTrMemBlockSize() for the tracklets
if (addedSize > 0){
// Using low-level interface
// with interface classes
- totalSize += addedSize;
if ( totalSize > size )
{
HLTError("Too much data; Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
totalSize, size );
return EMSGSIZE;
}
-
+
// Fill block
AliHLTComponentBlockData bd;
FillBlockData( bd );
bd.fSize = addedSize;
//bd.fSpecification = spec;
bd.fSpecification = gkAliEventTypeData;
- bd.fDataType = AliHLTTRDDefinitions::fgkClusterDataType;
+ 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);
- offset = totalSize;
-
}
- else
- HLTWarning("Array of clusters is empty!");
+ offset = totalSize;
+ }
+
+ addedSize = fClusterizer->GetAddedClSize();
+ if (addedSize > 0){
+ // Using low-level interface
+ // with interface classes
+ totalSize += addedSize;
+ if ( totalSize > size )
+ {
+ HLTError("Too much data; Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
+ totalSize, size );
+ return EMSGSIZE;
+ }
+
+ // Fill block
+ AliHLTComponentBlockData bd;
+ FillBlockData( bd );
+ bd.fOffset = offset;
+ bd.fSize = addedSize;
+ //bd.fSpecification = spec;
+ bd.fSpecification = gkAliEventTypeData;
+ 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);
+ offset = totalSize;
+
+ }
+ else
+ HLTWarning("Array of clusters is empty!");
}
fReconstructor->SetClusters(0x0);
}
}
-
* @ingroup alihlt_tutorial
*/
class AliHLTTRDClusterizerComponent : public AliHLTProcessor
- {
- public:
- AliHLTTRDClusterizerComponent();
- virtual ~AliHLTTRDClusterizerComponent();
-
- // 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();
-
- protected:
+{
+public:
+ AliHLTTRDClusterizerComponent();
+ virtual ~AliHLTTRDClusterizerComponent();
+
+ // 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();
+ int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
+ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+ AliHLTComponent* Spawn();
- // 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 AliHLTComponent_EventData& evtData, const AliHLTComponent_BlockData* blocks,
- AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr,
- AliHLTUInt32_t& size, vector<AliHLTComponent_BlockData>& outputBlocks );
-
- void PrintObject( TClonesArray* inClustersArray);
- using AliHLTProcessor::DoEvent;
+protected:
-
+ // 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 AliHLTComponent_EventData& evtData, const AliHLTComponent_BlockData* blocks,
+ AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, vector<AliHLTComponent_BlockData>& outputBlocks );
+
+ void PrintObject( TClonesArray* inClustersArray);
+ using AliHLTProcessor::DoEvent;
- private:
- /** copy constructor prohibited */
- AliHLTTRDClusterizerComponent(const AliHLTTRDClusterizerComponent&);
- /** assignment operator prohibited */
- AliHLTTRDClusterizerComponent& operator=(const AliHLTTRDClusterizerComponent&);
-
- // 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
- string fStrorageDBpath; // Default path for OCDB
-
- AliHLTTRDClusterizer *fClusterizer; //! Offline derived HLT clusterizer
- AliTRDrecoParam *fRecoParam; //! Offline reco params
- AliCDBManager *fCDB; //! Pointer to OCDB
- AliRawReaderMemory *fMemReader; //! Input raw data reader
- AliTRDReconstructor *fReconstructor;
-
- string fGeometryFileName; // Path to geometry file
+private:
+ /** copy constructor prohibited */
+ AliHLTTRDClusterizerComponent(const AliHLTTRDClusterizerComponent&);
+ /** assignment operator prohibited */
+ AliHLTTRDClusterizerComponent& operator=(const AliHLTTRDClusterizerComponent&);
+
+ // The size of the output data produced, as a percentage of the input data's size.
+ // Can be greater than 100 (%)
+
+ unsigned int fOutputPercentage; // Output volume in percentage of the input
+ unsigned int fOutputConst;
+
+ AliHLTTRDClusterizer *fClusterizer; //! Offline derived HLT clusterizer
+ AliTRDrecoParam *fRecoParam; //! Offline reco params
+ AliRawReaderMemory *fMemReader; //! Input raw data reader
+ AliTRDReconstructor *fReconstructor;
- ClassDef(AliHLTTRDClusterizerComponent, 0)
+ ClassDef(AliHLTTRDClusterizerComponent, 1)
- };
+};
#endif
#include "AliGeomManager.h"
#include "AliCDBManager.h"
+#include "AliCDBStorage.h"
#include "AliESDEvent.h"
#include "AliMagF.h"
#include "AliESDfriend.h"
AliHLTTRDTrackerV1Component::AliHLTTRDTrackerV1Component():
AliHLTProcessor(),
- fOutputPercentage(100), // By default we copy to the output exactly what we got as input
- fStrorageDBpath("local://$ALICE_ROOT/OCDB"),
- fCDB(NULL),
- fGeometryFileName(""),
+ fOutputPercentage(100), // By default we copy to the output exactly what we got as input
fTracker(NULL),
fRecoParam(NULL),
- fReconstructor(NULL)
+ fReconstructor(NULL),
+ fESD(NULL)
{
// Default constructor
- fGeometryFileName = getenv("ALICE_ROOT");
- fGeometryFileName += "/HLT/TRD/geometry.root";
}
AliHLTTRDTrackerV1Component::~AliHLTTRDTrackerV1Component()
Int_t iMagneticField = -1; // magnetic field: 0==OFF and 1==ON
Int_t iPIDmethod = 1; // 0=LikelyHood(LH) 1=NeuronalNetwork(NN) 2=TruncatedMean(TM)
Bool_t bHLTMode = kTRUE, bWriteClusters = kFALSE;
+ string geometryFileName = "";
while ( i < argc )
{
HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
return EINVAL;
}
- HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
+ HLTInfo("Output percentage set to %i %%", fOutputPercentage );
i += 2;
}
else if ( !strcmp( argv[i], "-NTimeBins" ) )
}
i += 2;
}
- else if ( strcmp( argv[i], "-cdb" ) == 0)
- {
- if ( i+1 >= argc )
- {
- HLTError( "Missing -cdb argument");
- return ENOTSUP;
- }
- fStrorageDBpath = argv[i+1];
- HLTInfo("DB storage is %s", fStrorageDBpath.c_str() );
- i += 2;
- }
else if ( strcmp( argv[i], "-geometry" ) == 0)
{
if ( i+1 >= argc )
HLTError("Missing -geometry argument");
return ENOTSUP;
}
- fGeometryFileName = argv[i+1];
+ geometryFileName = argv[i+1];
HLTInfo("GeomFile storage is %s",
- fGeometryFileName.c_str() );
+ geometryFileName.c_str() );
i += 2;
}
// the flux parametrizations
}
- // THE "REAL" INIT COMES HERE
- // offline condition data base
- fCDB = AliCDBManager::Instance();
- if (!fCDB)
- {
- HLTError("Could not get CDB instance", "fCDB 0x%x", fCDB);
- return -1;
+ // THE "REAL" INIT COMES HERE
+ // offline condition data base
+
+ if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
+ HLTError("DefaultStorage is not Set in CDBManager");
+ return -1;
+ }
+ 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;
+ }
+ }
+ HLTInfo("CDB default storage: %s; RunNo: %i", (AliCDBManager::Instance()->GetDefaultStorage()->GetBaseFolder()).Data(), AliCDBManager::Instance()->GetRun());
+
+ if(!AliGeomManager::GetGeometry()){
+ if(!TFile::Open(geometryFileName.c_str())){
+ HLTInfo("Loading standard geometry file");
+ AliGeomManager::LoadGeometry();
+ }else{
+ HLTWarning("Loading non-standard geometry file");
+ AliGeomManager::LoadGeometry(geometryFileName.c_str());
}
- else
- {
- fCDB->SetRun(0); // THIS HAS TO BE RETRIEVED !!!
- fCDB->SetDefaultStorage(fStrorageDBpath.c_str());
- HLTDebug("CDB instance", "fCDB 0x%x", fCDB);
+ if(!AliGeomManager::GetGeometry()){
+ HLTError("Cannot load geometry");
+ return EINVAL;
}
+ }
+ else{
+ HLTInfo("Geometry Already Loaded");
+ }
// check if the N of time bins make sense
if (iNtimeBins <= 0)
fReconstructor->SetOption(recoOptions.Data());
HLTDebug("Reconstructor options are: %s",recoOptions.Data());
- if((AliGeomManager::GetGeometry()) == NULL){
-
- if ( TFile::Open(fGeometryFileName.c_str())) {
- AliGeomManager::LoadGeometry(fGeometryFileName.c_str());
- }
- else {
- HLTError("Cannot load geometry from file %s",fGeometryFileName.c_str());
- return EINVAL;
- }
- }
- else
- HLTInfo("Geometry Already Loaded");
-
// create the tracker
fTracker = new AliTRDtrackerV1();
- fTracker->SetReconstructor(fReconstructor);
HLTDebug("TRDTracker at 0x%x", fTracker);
+ fTracker->SetReconstructor(fReconstructor);
- if (fTracker == 0)
- {
- HLTError("Unable to create the tracker!");
- return -1;
- }
+ fESD = new AliESDEvent;
+ fESD->CreateStdContent();
return 0;
}
fReconstructor->SetClusters(0x0);
delete fReconstructor;
fReconstructor = 0x0;
+ delete fESD;
+ fESD=NULL;
AliTRDcalibDB::Terminate();
vector<AliHLTComponent_BlockData>& outputBlocks )
{
// Process an event
+
+ if (evtData.fEventID == 1)
+ CALLGRIND_START_INSTRUMENTATION;
+
+ HLTDebug("NofBlocks %i", evtData.fBlockCnt );
- HLTDebug("NofBlocks %lu", evtData.fBlockCnt );
-
+ fESD->Reset();
+ //fESD->SetMagneticField(fSolenoidBz);
+
AliHLTUInt32_t totalSize = 0, offset = 0;
AliHLTUInt32_t dBlockSpecification = 0;
vector<AliHLTComponent_DataType> expectedDataTypes;
GetInputDataTypes(expectedDataTypes);
- if (evtData.fEventID > 1)
- CALLGRIND_START_INSTRUMENTATION;
for ( unsigned long iBlock = 0; iBlock < evtData.fBlockCnt; iBlock++ )
{
const AliHLTComponentBlockData &block = blocks[iBlock];
HLTDebug("TClonesArray of clusters: nbEntries = %i", clusterArray->GetEntriesFast());
fTracker->LoadClusters(clusterArray);
- // maybe it is not so smart to create it each event? clear is enough ?
- AliESDEvent *esd = new AliESDEvent();
- esd->CreateStdContent();
- fTracker->Clusters2Tracks(esd);
+ fTracker->Clusters2Tracks(fESD);
- Int_t nTracks = esd->GetNumberOfTracks();
+ Int_t nTracks = fESD->GetNumberOfTracks();
HLTInfo("Number of tracks == %d ==", nTracks);
TClonesArray* trdTracks = 0x0;
//trdTracks = fTracker->GetListOfTracks();
if(nTracks>0){
- HLTDebug("We have an output ESDEvent: 0x%x with %i tracks", esd, nTracks);
- AliHLTUInt32_t addedSize = AliHLTTRDUtils::AddESDToOutput(esd, (AliHLTUInt8_t*)(outputPtr+offset));
+ HLTDebug("We have an output ESDEvent: 0x%x with %i tracks", fESD, nTracks);
+ AliHLTUInt32_t addedSize = AliHLTTRDUtils::AddESDToOutput(fESD, (AliHLTUInt8_t*)(outputPtr+offset));
totalSize += addedSize;
// Fill block
//here we are deleting clusters (but not the TClonesArray itself)
fTracker->UnloadClusters();
AliTRDReconstructor::SetClusters(0x0);
- delete esd;
clusterArray->Delete();
delete clusterArray;
class AliTRDtrackerV1;
class AliTRDrecoParam;
class AliTRDReconstructor;
+class AliESDEvent;
/**
* @class AliHLTTRDTrackerV1Component
* @brief A TRDTrackerV1 HLT processing component.
*
* Uses the second generation TRD tracker AliTRDtrackerV1
-*/
+ */
class AliHLTTRDTrackerV1Component : public AliHLTProcessor
- {
- public:
- AliHLTTRDTrackerV1Component();
- virtual ~AliHLTTRDTrackerV1Component();
+{
+public:
+ AliHLTTRDTrackerV1Component();
+ virtual ~AliHLTTRDTrackerV1Component();
- // 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<AliHLTComponent_DataType>& list);
+ AliHLTComponent_DataType GetOutputDataType();
+ virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+ AliHLTComponent* Spawn();
- protected:
- AliHLTUInt32_t TransportTracks(TClonesArray *inTracksArray, AliHLTUInt8_t* output,
- vector<AliHLTComponent_BlockData>& outputBlocks, AliHLTUInt32_t inOffset, AliHLTUInt32_t inSpec);
+protected:
+ AliHLTUInt32_t TransportTracks(TClonesArray *inTracksArray, AliHLTUInt8_t* output,
+ vector<AliHLTComponent_BlockData>& outputBlocks, AliHLTUInt32_t inOffset, AliHLTUInt32_t inSpec);
- // 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.
- int DoInit( int argc, const char** argv );
- int DoDeinit();
- int DoEvent( const AliHLTComponentEventData& evtData,
- const AliHLTComponentBlockData* blocks,
- AliHLTComponent_TriggerData& /*trigData*/,
- AliHLTUInt8_t* outputPtr,
- AliHLTUInt32_t& size,
- vector<AliHLTComponent_BlockData>& outputBlocks );
- using AliHLTProcessor::DoEvent;
+ int DoInit( int argc, const char** argv );
+ int DoDeinit();
+ int DoEvent( const AliHLTComponentEventData& evtData,
+ const AliHLTComponentBlockData* blocks,
+ AliHLTComponent_TriggerData& /*trigData*/,
+ AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size,
+ vector<AliHLTComponent_BlockData>& outputBlocks );
+ using AliHLTProcessor::DoEvent;
- private:
- /** copy constructor prohibited */
- AliHLTTRDTrackerV1Component(const AliHLTTRDTrackerV1Component&);
- /** assignment operator prohibited */
- AliHLTTRDTrackerV1Component& operator=(const AliHLTTRDTrackerV1Component&);
+private:
+ /** copy constructor prohibited */
+ AliHLTTRDTrackerV1Component(const AliHLTTRDTrackerV1Component&);
+ /** assignment operator prohibited */
+ AliHLTTRDTrackerV1Component& operator=(const AliHLTTRDTrackerV1Component&);
- // 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
-
- string fStrorageDBpath; // Default path for OCDB
- AliCDBManager *fCDB; //! Pointer to OCDB
-
- string fGeometryFileName; // Path to geometry file
+ // 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
- AliTRDtrackerV1 *fTracker;//! Offline-pure/HLT tracker V1
- AliTRDrecoParam *fRecoParam; //! Offline reco params
- AliTRDReconstructor * fReconstructor;
-
- ClassDef(AliHLTTRDTrackerV1Component, 0)
+ AliTRDtrackerV1 *fTracker;//! Offline-pure/HLT tracker V1
+ AliTRDrecoParam *fRecoParam; //! Offline reco params
+ AliTRDReconstructor * fReconstructor;
+ AliESDEvent* fESD;
+
+ ClassDef(AliHLTTRDTrackerV1Component, 1)
- };
+};
#endif
--- /dev/null
+// $Id$
+//* 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 *
+
+#ifndef _ALIHLTTRDTRACKLETWORDARRAY_H_
+#define _ALITHLTTRDTRACKLETWORDARRAY_H_
+
+#include "AliHLTDataTypes.h"
+#include "AliHLTStdIncludes.h"
+
+struct AliHLTTRDTrackletWordArray {
+ AliHLTTRDTrackletWordArray(Int_t det):fDet(det),fCount(0){}
+ Int_t fDet;
+ AliHLTUInt32_t fCount;
+#if defined(__HP_aCC) || defined(__DECCXX) || defined(__SUNPRO_CC)
+ UInt_t fTracklets[1];
+#else
+ UInt_t fTracklets[];
+#endif
+};
+
+//typedef struct AliTRDHLTTrackletWordArray AliTRDHLTTrackletWordArray ?plain c!
+
+#endif
+// $Id:$
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
AliTRDcluster* curTRDCluster = new((*outArray)[i]) AliTRDcluster();
curCluster->ExportTRDCluster(curTRDCluster);
+ curTRDCluster->SetRPhiMethod(AliTRDcluster::kCOG);
//HLTDebug(" fX = %f; fY = %f; fZ = %f", curTRDCluster->GetX(), curTRDCluster->GetY(), curTRDCluster->GetZ());
curSize += clusterSize;
i++;
+// $Id:$
#ifndef ALIHLTTRDUTILS_H
#define ALIHLTTRDUTILS_H
/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
# library sources
MODULE_SRCS= \
+ AliHLTTRDTrackletWordArray.h \
$(CLASS_HDRS:.h=.cxx)
# library headers