#include "AliHLTTRDClusterizerComponent.h"
#include "AliHLTTRDDefinitions.h"
+#include "AliGeomManager.h"
+#include "AliTRDReconstructor.h"
#include "AliCDBManager.h"
#include "AliTRDclusterizerHLT.h"
-#include "AliTRDReconstructor.h"
#include "AliTRDrecoParam.h"
#include "AliTRDrawStreamBase.h"
: AliHLTProcessor()
, fOutputPercentage(100) // By default we copy to the output exactly what we got as input
, fStrorageDBpath("local://$ALICE_ROOT")
- , fReconstructor(NULL)
, fClusterizer(NULL)
, fRecoParam(NULL)
, fCDB(NULL)
, fMemReader(NULL)
, fGeometryFileName("")
, fGeometryFile(NULL)
- , fGeoManager(NULL)
+ , fReconstructor(NULL)
{
// Default constructor
AliHLTTRDClusterizerComponent::~AliHLTTRDClusterizerComponent()
{
// Destructor
- ;
+ // Work is Done in DoDeInit()
}
-
const char* AliHLTTRDClusterizerComponent::GetComponentID()
{
// Return the component ID const char *
while ( i < argc )
{
- Logging( kHLTLogDebug, "HLT::TRDClusterizer::DoInit", "Arguments", "argv[%d] == %s", i, argv[i] );
+ HLTDebug("argv[%d] == %s", i, argv[i] );
if ( !strcmp( argv[i], "output_percentage" ) )
{
if ( i+1>=argc )
{
- Logging(kHLTLogError, "HLT::TRDClusterizer::DoInit", "Missing Argument", "Missing output_percentage parameter");
+ HLTError("Missing output_percentage parameter");
return ENOTSUP;
}
- Logging( kHLTLogDebug, "HLT::TRDClusterizer::DoInit", "Arguments", "argv[%d+1] == %s", i, argv[i+1] );
+ HLTDebug("argv[%d+1] == %s", i, argv[i+1] );
fOutputPercentage = strtoul( argv[i+1], &cpErr, 0 );
if ( *cpErr )
{
- Logging(kHLTLogError, "HLT::TRDClusterizer::DoInit", "Wrong Argument", "Cannot convert output_percentage parameter '%s'", argv[i+1] );
+ HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
return EINVAL;
}
- Logging( kHLTLogInfo, "HLT::TRDClusterizer::DoInit", "Output percentage set", "Output percentage set to %lu %%", fOutputPercentage );
+ HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
i += 2;
continue;
}
{
if ( i+1 >= argc )
{
- Logging(kHLTLogError, "HLT::TRDClusterizer::DoInit", "Missing Argument", "Missing -cdb argument");
+ HLTError("Missing -cdb argument");
return ENOTSUP;
}
fStrorageDBpath = argv[i+1];
- Logging( kHLTLogInfo, "HLT::TRDClusterizer::DoInit", "DB storage set", "DB storage is %s", fStrorageDBpath.c_str() );
+ HLTInfo("DB storage is %s", fStrorageDBpath.c_str() );
i += 2;
continue;
}
if ( strcmp( argv[i], "-highflux" ) == 0)
{
iRecoParamType = 1;
- HLTDebug("Low flux reco selected.");
+ HLTDebug("High flux reco selected.");
+ i++;
+ continue;
+ }
+
+ if ( strcmp( argv[i], "-cosmics" ) == 0)
+ {
+ iRecoParamType = 2;
+ HLTDebug("Cosmic test reco selected.");
i++;
continue;
}
{
if ( i+1 >= argc )
{
- Logging(kHLTLogError, "HLT::TRDClusterizer::DoInit", "Missing Argument", "Missing -rawver argument");
+ HLTError("Missing -rawver argument");
return ENOTSUP;
}
iRawDataVersion = atoi( argv[i+1] );
- Logging( kHLTLogInfo, "HLT::TRDClusterizer::DoInit", "Raw Data", "Version is %d", iRawDataVersion );
+ HLTInfo("Raw data version is %d", iRawDataVersion );
i += 2;
continue;
}
{
if ( i+1 >= argc )
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Missing Argument", "Missing -geometry argument");
+ HLTError("Missing -geometry argument");
return ENOTSUP;
}
fGeometryFileName = argv[i+1];
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoInit", "GeomFile storage set", "GeomFile storage is %s",
- fGeometryFileName.c_str() );
+ HLTInfo("GeomFile storage is %s", fGeometryFileName.c_str() );
i += 2;
continue;
}
- Logging(kHLTLogError, "HLT::TRDClusterizer::DoInit", "Unknown Option", "Unknown option '%s'", argv[i] );
+ HLTError("Unknown option '%s'", argv[i] );
return EINVAL;
}
// THE "REAL" INIT COMES HERE
- if (iRecoParamType < 0 || iRecoParamType > 1)
+ if (iRecoParamType < 0 || iRecoParamType > 2)
{
HLTWarning("No reco param selected. Use -lowflux or -highflux flag. Defaulting to low flux.");
iRecoParamType = 0;
HLTDebug("High flux params init.");
}
+ if (iRecoParamType == 2)
+ {
+ fRecoParam = AliTRDrecoParam::GetCosmicTestParam();
+ HLTDebug("Cosmic Test params init.");
+ }
+
if (fRecoParam == 0)
{
HLTError("No reco params initialized. Sniffing big trouble!");
return -1;
}
- //AliTRDReconstructor reconstructor; reconstructor.SetRecoParam(fRecoParam);
- // Alex Bercuci - quick fix on 10.Jul.08
- // HLT should decide how they get the recoParam
- // and who owns the TRD reconstructor
fReconstructor = new AliTRDReconstructor();
fReconstructor->SetRecoParam(fRecoParam);
fReconstructor->SetStreamLevel(0, AliTRDReconstructor::kClusterizer); // default value
fReconstructor->SetOption("!cw");
+ //fReconstructor->Init();
// init the raw data type to be used...
// the switch here will become obsolete as soon as the data structures is fixed
fCDB = AliCDBManager::Instance();
if (!fCDB)
{
- Logging(kHLTLogError, "HLT::TRDCalibration::DoInit", "Could not get CDB instance", "fCDB 0x%x", 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());
- Logging(kHLTLogDebug, "HLT::TRDCalibration::DoInit", "CDB instance", "fCDB 0x%x", fCDB);
+ HLTDebug("CDB instance; fCDB 0x%x", fCDB);
}
fGeometryFile = TFile::Open(fGeometryFileName.c_str());
if (fGeometryFile)
{
- fGeoManager = (TGeoManager *)fGeometryFile->Get("Geometry");
+ AliGeomManager::LoadGeometry(fGeometryFileName.c_str());
}
else
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "fGeometryFile", "Unable to open file. FATAL!");
+ HLTError("Unable to open file. FATAL!");
return -1;
}
fMemReader = new AliRawReaderMemory;
- fClusterizer = new AliTRDclusterizerHLT("TRDCclusterizer", "TRDCclusterizer");
- // AB 10.Jul.08
- fClusterizer->SetReconstructor(fReconstructor);
+ fClusterizer = new AliTRDclusterizerHLT("TRDCclusterizer", "TRDCclusterizer", fReconstructor);
fClusterizer->SetRawVersion(iRawDataVersion);
fClusterizer->InitClusterTree();
return 0;
fMemReader = 0;
delete fClusterizer;
fClusterizer = 0;
- // AB 10.Jul.08
delete fReconstructor;
fReconstructor = 0x0;
return 0;
if (fCDB)
{
- Logging( kHLTLogDebug, "HLT::TRDCalibration::DoDeinit", "destroy", "fCDB");
+ HLTDebug("destroy fCDB");
fCDB->Destroy();
fCDB = 0;
}
}
}
-int AliHLTTRDClusterizerComponent::DoEvent( const AliHLTComponent_EventData& evtData,
- const AliHLTComponent_BlockData* blocks,
- AliHLTComponent_TriggerData& trigData,
+int AliHLTTRDClusterizerComponent::DoEvent( const AliHLTComponentEventData& evtData,
+ const AliHLTComponentBlockData* blocks,
+ AliHLTComponent_TriggerData& /*trigData*/,
AliHLTUInt8_t* /*outputPtr*/,
AliHLTUInt32_t& size,
vector<AliHLTComponent_BlockData>& /*outputBlocks*/ )
{
// Process an event
- HLTDebug("NofBlocks %lu", evtData.fBlockCnt );
+ HLTDebug( "NofBlocks %lu", evtData.fBlockCnt );
// Process an event
- unsigned long totalSize = 0;
- AliHLTUInt32_t dBlockSpecification = 0;
//implement a usage of the following
// AliHLTUInt32_t triggerDataStructSize = trigData.fStructSize;
// AliHLTUInt32_t triggerDataSize = trigData.fDataSize;
// void *triggerData = trigData.fData;
- HLTDebug("Trigger data received. Struct size %d Data size %d Data location 0x%x", trigData.fStructSize, trigData.fDataSize, (UInt_t*)trigData.fData);
+ //HLTDebug( "Trigger data received. Struct size %d Data size %d Data location 0x%x", trigData.fStructSize, trigData.fDataSize, (UInt_t*)trigData.fData);
// Loop over all input blocks in the event
+ AliHLTComponentDataType expectedDataType = (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD);
for ( unsigned long i = 0; i < evtData.fBlockCnt; i++ )
{
// lets not use the internal TRD data types here : AliHLTTRDDefinitions::fgkDDLRawDataType
// which is depreciated - we use HLT global defs instead
- if ( blocks[i].fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) )
+ // if ( blocks[i].fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) )
+ AliHLTComponentDataType inputDataType = blocks[i].fDataType;
+ if ( inputDataType != expectedDataType)
{
- HLTWarning("COMPARE FAILED received type=%d expected-or-type=%d",
- blocks[i].fDataType, kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD);
+ HLTDebug( "Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s",
+ evtData.fEventID, evtData.fEventID,
+ DataType2Text(inputDataType).c_str(),
+ DataType2Text(expectedDataType).c_str());
continue;
}
- dBlockSpecification = blocks[i].fSpecification;
- unsigned long blockSize = blocks[i].fSize;
- totalSize += blockSize;
- }
-
- void *memBufIn = calloc(totalSize, 1);
- AliHLTUInt8_t *pBuf = (AliHLTUInt8_t *)memBufIn;
- if (memBufIn == NULL)
- {
- HLTError("Unable to allocate %lu bytes", totalSize);
- return -1;
- }
-
- // Make the memory continuous
- unsigned long copied = 0;
- for ( unsigned long i = 0; i < evtData.fBlockCnt; i++ )
- {
- // we process only the raw data from TRD
- if ( blocks[i].fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) )
- continue;
-
- void *pos = (void*)(pBuf + copied);
- void *copyret = memcpy(pos, blocks[i].fPtr, blocks[i].fSize);
- if (copyret < 0)
+ // fMemReader->Reset();
+ fMemReader->SetMemory((UChar_t*) blocks[i].fPtr, blocks[i].fSize);
+
+ AliHLTUInt32_t spec = blocks[i].fSpecification;
+
+ Int_t id = 1024;
+
+ for ( Int_t ii = 0; ii < 18 ; ii++ ) {
+ if ( spec & 0x00000001 ) {
+ id += ii;
+ break;
+ }
+ spec = spec >> 1 ;
+ }
+
+ fMemReader->SetEquipmentID( id );
+
+ fClusterizer->ResetTree();
+ Bool_t iclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
+ if (iclustered == kTRUE)
{
- //Logging( kHLTLogError, "HLT::TRDClusterizer::DoEvent", "MEMORY", "Unable to copy %lu bytes", blocks[i].fSize);
- // so here i am not sure which log scheme finaly to use...
- HLTError("MEMORY Unable to copy %lu bytes", blocks[i].fSize);
- // maybe put a reasonable return value here...
+ HLTDebug( "Clustered successfully");
+ }
+ else
+ {
+ HLTError("Clustering ERROR");
return -1;
}
- copied += blocks[i].fSize;
- }
-
- // lets see what we copied...
- HLTDebug("COPY STATS total=%lu copied=%lu", totalSize, copied);
-
- fMemReader->Reset();
- fMemReader->SetMemory((UChar_t*)memBufIn, totalSize);
- //fMemReader->SelectEquipment(0, 1024, 1041);
+ // put the tree into output blocks
+ TTree *fcTree = fClusterizer->GetClusterTree();
+ //fcTree->Print();
+
+ PushBack(fcTree, AliHLTTRDDefinitions::fgkClusterDataType, blocks[i].fSpecification);
- // 1024 is good for SM 0 - it should be good for any other too
- // but in principle the EquipmentID should come with the data
- fMemReader->SetEquipmentID(1024);
-
- fClusterizer->ResetTree();
- Bool_t iclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
- if (iclustered == kTRUE)
- {
- HLTDebug("Clustered successfully");
}
- else
- {
- HLTError("Clustering ERROR");
- return -1;
- }
-
- // free the memory
- free(memBufIn);
-
- // put the tree into output blocks
- TTree *fcTree = fClusterizer->GetClusterTree();
-
- PushBack(fcTree, AliHLTTRDDefinitions::fgkClusterDataType, dBlockSpecification);
size=0; // this function did not write data to the buffer directly
return 0;
class AliTRDclusterizerHLT;
class AliRawReaderMemory;
class TFile;
-class TGeoManager;
class AliTRDrecoParam;
class AliTRDReconstructor;
string fStrorageDBpath; // Default path for OCDB
- AliTRDReconstructor *fReconstructor; //!
AliTRDclusterizerHLT *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
TFile *fGeometryFile; //! // Pointer to the geom root file
- TGeoManager *fGeoManager; //! Pointer to geometry manager
ClassDef(AliHLTTRDClusterizerComponent, 0)
char* cpErr;
while ( i < argc )
{
- Logging( kHLTLogDebug, "HLT::TRDTracker::DoInit", "Arguments", "argv[%d] == %s", i, argv[i] );
+ HLTDebug("argv[%d] == %s", i, argv[i] );
if ( !strcmp( argv[i], "output_percentage" ) )
{
if ( i+1>=argc )
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Missing Argument", "Missing output_percentage parameter");
+ HLTError("Missing output_percentage parameter");
return ENOTSUP;
}
- Logging( kHLTLogDebug, "HLT::TRDTracker::DoInit", "Arguments", "argv[%d+1] == %s", i, argv[i+1] );
+ HLTDebug("Arguments", "argv[%d+1] == %s", i, argv[i+1] );
fOutputPercentage = strtoul( argv[i+1], &cpErr, 0 );
if ( *cpErr )
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Wrong Argument", "Cannot convert output_percentage parameter '%s'", argv[i+1] );
+ HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
return EINVAL;
}
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoInit", "Output percentage set", "Output percentage set to %lu %%", fOutputPercentage );
+ HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
i += 2;
continue;
}
{
if ( i+1 >= argc )
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Missing Argument", "Missing -cdb argument");
+ HLTError("Missing -cdb argument");
return ENOTSUP;
}
fStrorageDBpath = argv[i+1];
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoInit", "DB storage set", "DB storage is %s", fStrorageDBpath.c_str() );
+ HLTInfo("DB storage is %s", fStrorageDBpath.c_str() );
i += 2;
continue;
}
{
if ( i+1 >= argc )
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Missing Argument", "Missing -geometry argument");
+ HLTError("Missing -geometry argument");
return ENOTSUP;
}
fGeometryFileName = argv[i+1];
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoInit", "GeomFile storage set", "GeomFile storage is %s",
- fGeometryFileName.c_str() );
+ HLTInfo("GeomFile storage is %s", fGeometryFileName.c_str() );
i += 2;
continue;
}
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Unknown Option", "Unknown option '%s'", argv[i] );
+ HLTError("Unknown option '%s'", argv[i] );
return EINVAL;
}
if (fField)
AliTracker::SetFieldMap(fField,1);
else
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Field", "Unable to init the field");
+ HLTError("Unable to init the field");
fCDB = AliCDBManager::Instance();
if (!fCDB)
{
- Logging(kHLTLogError, "HLT::TRDCalibration::DoInit", "Could not get CDB instance", "fCDB 0x%x", 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());
- Logging(kHLTLogDebug, "HLT::TRDCalibration::DoInit", "CDB instance", "fCDB 0x%x", fCDB);
+ HLTDebug("fCDB 0x%x", fCDB);
}
fGeometryFile = TFile::Open(fGeometryFileName.c_str());
{
fGeoManager = (TGeoManager *)fGeometryFile->Get("Geometry");
//fTracker = new AliTRDtrackerHLT(fGeometryFile);
- AliTRDrecoParam *fPars = AliTRDrecoParam::GetLowFluxParam();
- //AB 10.Jul.08 - Memory leak - please consider a better strategy on HLT
- AliTRDReconstructor *fReconstructor = new AliTRDReconstructor();
- fReconstructor->SetRecoParam(fPars);
- fReconstructor->SetOption("sa,!cw");
- fReconstructor->SetStreamLevel(0);
+ AliTRDrecoParam *fPars = AliTRDrecoParam::GetLowFluxParam();
+ //fPars->SetSeeding(kTRUE);
+ //fPars->SetStreamLevel(0);
+ AliTRDReconstructor reconstructor; reconstructor.SetRecoParam(fPars);
+ // write clusters [cw] = true
+ // track seeding (stand alone tracking) [sa] = true
+ // PID method in reconstruction (NN) [nn] = true
+ // write online tracklets [tw] = false
+ // drift gas [ar] = false
+ reconstructor.SetOption("cw,sa");
fTracker = new AliTRDtracker(fGeometryFile);
- fTracker->SetReconstructor(fReconstructor);
+ //fTracker = new AliTRDtracker(fGeometryFile);
}
else
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "fGeometryFile", "Unable to open file. FATAL!");
+ HLTError("Unable to open file. FATAL!");
return -1;
}
AliTRDCalibraFillHisto *calibra = AliTRDCalibraFillHisto::Instance();
if (calibra == 0)
{
- Logging(kHLTLogError, "HLT::TRDTracker::DoInit", "Calibration Histos", "::Instance failed");
+ HLTError("Calibration Histos ::Instance failed");
return -1;
}
else
{
// should not write in here!
calibra->Write2d();
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoDeinit", "CALIBRA", "before destroy");
calibra->Destroy();
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoDeinit", "CALIBRA", "after destroy");
}
return 0;
{
// Process an event
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "Output percentage set", "Output percentage set to %lu %%", fOutputPercentage );
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "BLOCKS", "NofBlocks %lu", evtData.fBlockCnt );
+ HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
+ HLTInfo("NofBlocks %lu", evtData.fBlockCnt );
AliHLTUInt32_t dBlockSpecification = 0;
//implement a usage of the following
-// AliHLTUInt32_t triggerDataStructSize = trigData.fStructSize;
-// AliHLTUInt32_t triggerDataSize = trigData.fDataSize;
-// void *triggerData = trigData.fData;
- Logging( kHLTLogDebug, "HLT::TRDTracker::DoEvent", "Trigger data received",
- "Struct size %d Data size %d Data location 0x%x", trigData.fStructSize, trigData.fDataSize, (UInt_t*)trigData.fData);
+ // AliHLTUInt32_t triggerDataStructSize = trigData.fStructSize;
+ // AliHLTUInt32_t triggerDataSize = trigData.fDataSize;
+ // void *triggerData = trigData.fData;
+ HLTDebug("Struct size %d Data size %d Data location 0x%x", trigData.fStructSize, trigData.fDataSize, (UInt_t*)trigData.fData);
AliHLTComponentBlockData *dblock = (AliHLTComponentBlockData *)GetFirstInputBlock( AliHLTTRDDefinitions::fgkClusterDataType );
if (dblock != 0)
}
else
{
- Logging( kHLTLogWarning, "HLT::TRDTracker::DoEvent", "DATAIN", "First Input Block not found! 0x%x", dblock);
+ HLTWarning("First Input Block not found! 0x%x", dblock);
return -1;
}
int ibForce = 0;
TObject *tobjin = (TObject *)GetFirstInputObject( AliHLTTRDDefinitions::fgkClusterDataType, "TTree", ibForce);
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "1stBLOCK", "Pointer = 0x%x", tobjin);
+ HLTInfo("Pointer = 0x%x", tobjin);
TTree *clusterTree = (TTree*)tobjin;
if (!clusterTree)
{
- Logging( kHLTLogWarning, "HLT::TRDTracker::DoEvent", "DATAIN", "First Input Block not a tree! 0x%x", tobjin);
+ HLTWarning("First Input Block not a tree! 0x%x", tobjin);
return -1;
}
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "1stBLOCK", "Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
+ HLTInfo("Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
while (tobjin != 0)
{
if (clusterTree)
{
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "CLUSTERS", "Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
+ HLTInfo("Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
Int_t iNentries = clusterTree->GetEntries();
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "COUNT", "N of tree entries = %d", iNentries);
+ HLTInfo("N of tree entries = %d", iNentries);
fTracker->LoadClusters(clusterTree);
}
else
{
- Logging( kHLTLogError, "HLT::TRDTracker::DoEvent", "CLUSTERS", "Tree Pointer = 0x%x", clusterTree);
+ HLTError("Tree Pointer = 0x%x", clusterTree);
}
tobjin = (TObject *)GetNextInputObject( ibForce );
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "nextBLOCK", "Pointer = 0x%x", tobjin);
+ HLTInfo("Pointer = 0x%x", tobjin);
clusterTree = (TTree*)tobjin;
}
Int_t nTracks = esd->GetNumberOfTracks();
Int_t nTRDTracks = esd->GetNumberOfTrdTracks();
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "DONE", "Number of tracks %d Number of TRD tracks %d", nTracks, nTRDTracks);
+ HLTInfo( "Number of tracks %d Number of TRD tracks %d", nTracks, nTRDTracks);
-// AliTRDCalibraFillHisto *calibra = AliTRDCalibraFillHisto::Instance();
-// calibra->Init2Dhistostrack();
for (Int_t it = 0; it < nTracks; it++)
{
AliESDtrack* track = esd->GetTrack(it);
-
-// Int_t nCalibObjects = 0;
-// Int_t idx = 0;
-// while (track->GetCalibObject(idx) != 0)
-// {
-// nCalibObjects++;
-// idx++;
-// }
-// Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "DONE", "Track 0x%x NcalibObjects %d", track, nCalibObjects);
-
- Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "DONE", "Track %d 0x%x Pt %1.2f", it, track, track->Pt());
+ HLTInfo("Track %d 0x%x Pt %1.2f", it, track, track->Pt());
PushBack(track, AliHLTTRDDefinitions::fgkTRDSATracksDataType, ++dBlockSpecification);
-// if (calibra->GetMItracking())
-// {
-// calibra->UpdateHistograms(track);
-// }
}
- //PushBack(esd, AliHLTTRDDefinitions::fgkTRDSAEsdDataType, dBlockSpecification);
- //PushBack(esdFriend, AliHLTTRDDefinitions::fgkTRDSAEsdDataType, dBlockSpecification);
-
- //no receiver defined yet(!)
- //Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "DONE", "now deleting");
delete esd;
delete esdFriend;
- //Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "DONE", "after delete esd");
delete clusterTree;
- //Logging( kHLTLogInfo, "HLT::TRDTracker::DoEvent", "DONE", "after delete clusterTree");
return 0;
}
#include "TFile.h"
#include "TChain.h"
+#include "AliGeomManager.h"
#include "AliCDBManager.h"
#include "AliESDEvent.h"
#include "AliMagFMaps.h"
, fField(NULL)
, fGeometryFileName("")
, fGeometryFile(NULL)
- , fGeoManager(NULL)
- , fReconstructor(NULL)
, fTracker(NULL)
, fRecoParam(NULL)
{
AliHLTTRDTrackerV1Component::~AliHLTTRDTrackerV1Component()
{
- // Destructor
+// Destructor
}
const char* AliHLTTRDTrackerV1Component::GetComponentID()
// Spawn function, return new instance of this class
AliHLTComponent* AliHLTTRDTrackerV1Component::Spawn()
{
- // Spawn function, return new instance of this class
return new AliHLTTRDTrackerV1Component;
};
while ( i < argc )
{
- Logging( kHLTLogDebug, "HLT::TRDTrackerV1::DoInit", "Arguments", "argv[%d] == %s", i, argv[i] );
+ HLTDebug("argv[%d] == %s", i, argv[i] );
if ( !strcmp( argv[i], "output_percentage" ) )
{
if ( i+1>=argc )
{
- Logging(kHLTLogError, "HLT::TRDTrackerV1::DoInit", "Missing Argument", "Missing output_percentage parameter");
+ HLTError("Missing output_percentage parameter");
return ENOTSUP;
}
- Logging( kHLTLogDebug, "HLT::TRDTrackerV1::DoInit", "Arguments", "argv[%d+1] == %s", i, argv[i+1] );
+ HLTDebug("argv[%d+1] == %s", i, argv[i+1] );
fOutputPercentage = strtoul( argv[i+1], &cpErr, 0 );
if ( *cpErr )
{
- Logging(kHLTLogError, "HLT::TRDTrackerV1::DoInit", "Wrong Argument", "Cannot convert output_percentage parameter '%s'", argv[i+1] );
+ HLTError("Cannot convert output_percentage parameter '%s'", argv[i+1] );
return EINVAL;
}
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoInit", "Output percentage set", "Output percentage set to %lu %%", fOutputPercentage );
+ HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
i += 2;
continue;
}
{
if ( i+1 >= argc )
{
- Logging(kHLTLogError, "HLT::TRDTrackerV1::DoInit", "Missing Argument", "Missing -cdb argument");
+ HLTError( "Missing -cdb argument");
return ENOTSUP;
}
fStrorageDBpath = argv[i+1];
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoInit", "DB storage set", "DB storage is %s", fStrorageDBpath.c_str() );
+ HLTInfo("DB storage is %s", fStrorageDBpath.c_str() );
i += 2;
continue;
}
{
if ( i+1 >= argc )
{
- Logging(kHLTLogError, "HLT::TRDTrackerV1::DoInit", "Missing Argument", "Missing -geometry argument");
+ HLTError("Missing -geometry argument");
return ENOTSUP;
}
fGeometryFileName = argv[i+1];
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoInit", "GeomFile storage set", "GeomFile storage is %s",
+ HLTInfo("GeomFile storage is %s",
fGeometryFileName.c_str() );
i += 2;
continue;
i++;
continue;
}
+
+ if ( strcmp( argv[i], "-cosmics" ) == 0)
+ {
+ iRecoParamType = 2;
+ HLTDebug("Cosmic test reco selected.");
+ i++;
+ continue;
+ }
if ( strcmp( argv[i], "-magnetic_field_ON" ) == 0)
{
continue;
}
- Logging(kHLTLogError, "HLT::TRDTrackerV1::DoInit", "Unknown Option", "Unknown option '%s'", argv[i] );
+ HLTError("Unknown option '%s'", argv[i] );
return EINVAL;
}
fCDB = AliCDBManager::Instance();
if (!fCDB)
{
- Logging(kHLTLogError, "HLT::TRDCalibration::DoInit", "Could not get CDB instance", "fCDB 0x%x", fCDB);
+ HLTError("Could not get CDB instance", "fCDB 0x%x", fCDB);
return -1;
}
else
{
fCDB->SetRun(0); // THIS HAS TO BE RETRIEVED !!!
fCDB->SetDefaultStorage(fStrorageDBpath.c_str());
- Logging(kHLTLogDebug, "HLT::TRDCalibration::DoInit", "CDB instance", "fCDB 0x%x", fCDB);
+ HLTDebug("CDB instance", "fCDB 0x%x", fCDB);
}
// check if the N of time bins make sense
AliTracker::SetFieldMap(fField,kTRUE);
// reconstruction parameters
- if (iRecoParamType < 0 || iRecoParamType > 1)
+ if (iRecoParamType < 0 || iRecoParamType > 2)
{
HLTWarning("No reco param selected. Use -lowflux or -highflux flag. Defaulting to low flux.");
iRecoParamType = 0;
HLTDebug("High flux params init.");
}
+ if (iRecoParamType == 2)
+ {
+ fRecoParam = AliTRDrecoParam::GetCosmicTestParam();
+ HLTDebug("Cosmic Test params init.");
+ }
+
if (fRecoParam == 0)
{
HLTError("No reco params initialized. Sniffing big trouble!");
return -1;
}
- // this is important in case we want to ::PropagateBack - see the TrackerV1.cxx
- //fRecoParam->SetSeeding(kTRUE);
- // no debug stream -> no debug files! on HLT
- //fRecoParam->SetStreamLevel(0);
-
- //AliTRDReconstructor reconstructor; reconstructor.SetRecoParam(fRecoParam);
- // AB 10.Jul.08
- // temporary until recoParam in the OCDB
fReconstructor = new AliTRDReconstructor();
fReconstructor->SetRecoParam(fRecoParam);
- fReconstructor->SetStreamLevel(0); // default value
+ // no debug stream -> no debug files! on HLT
+ fReconstructor->SetStreamLevel(0);
+// write clusters [cw] = true
+// track seeding (stand alone tracking) [sa] = true
+// PID method in reconstruction (NN) [nn] = true
+// write online tracklets [tw] = false
+// drift gas [ar] = false
fReconstructor->SetOption("sa,!cw");
-
+ //fReconstructor->Init();
+
+
// geometry:
// for some unknown at this point reason (30th of April 2008)
// the TrackerV1 initializes new TRDgeometry in the constructor
// we avoid it here
fGeometryFile = 0;
- // fGeometryFile = TFile::Open(fGeometryFileName.c_str());
- // if (fGeometryFile)
- // {
- // fGeoManager = (TGeoManager *)fGeometryFile->Get("Geometry");
- // // for the old tracker we would do this:
- // fTracker = new AliTRDtracker(fGeometryFile);
- // }
- // else
- // {
- // Logging(kHLTLogError, "HLT::TRDTrackerV1::DoInit", "fGeometryFile", "Unable to open file. FATAL!");
- // return -1;
- // }
+ fGeometryFile = TFile::Open(fGeometryFileName.c_str());
+ if (fGeometryFile)
+ {
+ AliGeomManager::LoadGeometry(fGeometryFileName.c_str());
+ }
+ else
+ {
+ HLTError("Unable to open file. FATAL!");
+ return -1;
+ }
// create the tracker
- fTracker = new AliTRDtrackerV1();
- fTracker->SetReconstructor(fReconstructor);
+ fTracker = new AliTRDtrackerV1(fReconstructor);
HLTDebug("TRDTracker at 0x%x", fTracker);
if (fTracker == 0)
// Deinitialization of the component
delete fField;
- fField = 0;
+ fField = 0x0;
delete fTracker;
- fTracker = 0;
-
- // AB 10.Jul.08
+ fTracker = 0x0;
+
delete fReconstructor;
fReconstructor = 0x0;
-
+
if (fGeometryFile)
{
fGeometryFile->Close();
delete fGeometryFile;
- fGeometryFile = 0;
+ fGeometryFile = 0x0;
}
return 0;
{
// Process an event
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoEvent", "Output percentage set", "Output percentage set to %lu %%", fOutputPercentage );
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoEvent", "BLOCKS", "NofBlocks %lu", evtData.fBlockCnt );
+ HLTInfo("Output percentage set to %lu %%", fOutputPercentage );
+ HLTInfo("NofBlocks %lu", evtData.fBlockCnt );
AliHLTUInt32_t dBlockSpecification = 0;
// AliHLTUInt32_t triggerDataStructSize = trigData.fStructSize;
// AliHLTUInt32_t triggerDataSize = trigData.fDataSize;
// void *triggerData = trigData.fData;
- Logging( kHLTLogDebug, "HLT::TRDTrackerV1::DoEvent", "Trigger data received",
- "Struct size %d Data size %d Data location 0x%x", trigData.fStructSize, trigData.fDataSize, (UInt_t*)trigData.fData);
+ HLTDebug("Struct size %d Data size %d Data location 0x%x", trigData.fStructSize, trigData.fDataSize, (UInt_t*)trigData.fData);
AliHLTComponentBlockData *dblock = (AliHLTComponentBlockData *)GetFirstInputBlock( AliHLTTRDDefinitions::fgkClusterDataType );
if (dblock != 0)
}
else
{
- Logging( kHLTLogWarning, "HLT::TRDTrackerV1::DoEvent", "DATAIN", "First Input Block not found! 0x%x", dblock);
+ HLTWarning("First Input Block not found! 0x%x", dblock);
return -1;
}
int ibForce = 0;
TObject *tobjin = (TObject *)GetFirstInputObject( AliHLTTRDDefinitions::fgkClusterDataType, "TTree", ibForce);
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoEvent", "1stBLOCK", "Pointer = 0x%x", tobjin);
+ HLTInfo("1stBLOCK; Pointer = 0x%x", tobjin);
TTree *clusterTree = (TTree*)tobjin;
if (!clusterTree)
{
- Logging( kHLTLogWarning, "HLT::TRDTrackerV1::DoEvent", "DATAIN", "First Input Block not a tree! 0x%x", tobjin);
+ HLTWarning("First Input Block not a tree! 0x%x", tobjin);
return -1;
}
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoEvent", "1stBLOCK", "Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
+ HLTInfo("1stBLOCK; Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
while (tobjin != 0)
{
if (clusterTree)
{
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoEvent", "CLUSTERS", "Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
+ HLTInfo("CLUSTERS; Pointer = 0x%x Name = %s", clusterTree, clusterTree->GetName());
Int_t iNentries = clusterTree->GetEntries();
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoEvent", "COUNT", "N of tree entries = %d", iNentries);
+ HLTInfo("N of tree entries = %d", iNentries);
fTracker->LoadClusters(clusterTree);
}
else
{
- Logging( kHLTLogError, "HLT::TRDTrackerV1::DoEvent", "CLUSTERS", "Tree Pointer = 0x%x", clusterTree);
+ HLTError("CLUSTERS; Tree Pointer = 0x%x", clusterTree);
}
tobjin = (TObject *)GetNextInputObject( ibForce );
- Logging( kHLTLogInfo, "HLT::TRDTrackerV1::DoEvent", "nextBLOCK", "Pointer = 0x%x", tobjin);
+ HLTInfo("nextBLOCK; Pointer = 0x%x", tobjin);
clusterTree = (TTree*)tobjin;
}
Int_t nTRDTracks = esd->GetNumberOfTrdTracks();
HLTInfo("Number of tracks %d Number of TRD tracks %d", nTracks, nTRDTracks);
//esd->Print();
- PushBack(esd, AliHLTTRDDefinitions::fgkTRDSAEsdDataType);
+ //PushBack(esd, AliHLTTRDDefinitions::fgkTRDSAEsdDataType);
// extract the friend ?
// AliESDfriend *esdFriend = new AliESDfriend();
// delete esdFriend;
//HLTInfo("now deleting");
+ TClonesArray* trdTracks = fTracker->GetListOfTracks();
+
+ if (trdTracks)
+ {
+ HLTDebug("Pointer to trdTracks = 0x%x, nbEntries = %i", trdTracks, trdTracks->GetEntries());
+ HLTInfo("Size of the TClonesArray of trdTracks for output is %i bytes (sizeof) or %i (GetSize)", sizeof(*trdTracks), trdTracks->GetSize());
+ PushBack(trdTracks, AliHLTTRDDefinitions::fgkTRDSATracksDataType);
+ }
+ else
+ HLTWarning("Bad array trdTracks = 0x%x", trdTracks);
+
+
delete esd;
delete clusterTree;
class AliTRDtrackerV1;
class AliTRDrecoParam;
class AliTRDReconstructor;
+
/**
* @class AliHLTTRDTrackerComponent
* @brief A TRDTrackerV1 HLT processing component.
TFile *fGeometryFile; //! // Pointer to the geom root file
TGeoManager *fGeoManager; //! Pointer to geometry manager
- AliTRDReconstructor *fReconstructor; //!
AliTRDtrackerV1 *fTracker;//! Offline-pure/HLT tracker V1
AliTRDrecoParam *fRecoParam; //! Offline reco params
-
+ AliTRDReconstructor * fReconstructor;
+
ClassDef(AliHLTTRDTrackerV1Component, 0)
};
ClassImp(AliTRDclusterizerHLT)
-//_____________________________________________________________________________
-AliTRDclusterizerHLT::AliTRDclusterizerHLT()
- : AliTRDclusterizer()
- , fTreeCreatedHere(kFALSE)
- , fNclusters(-1)
- , fRawDataSource(0)
- , fFeeParams(0)
+ //_____________________________________________________________________________
+ AliTRDclusterizerHLT::AliTRDclusterizerHLT()
+ : AliTRDclusterizer()
+ , fTreeCreatedHere(kFALSE)
+ , fNclusters(-1)
+ , fRawDataSource(0)
+ , fFeeParams(0)
{
//
// AliTRDclusterizerHLT default constructor
}
//_____________________________________________________________________________
-AliTRDclusterizerHLT::AliTRDclusterizerHLT(const Text_t *name, const Text_t *title)
- : AliTRDclusterizer(name,title)
- , fTreeCreatedHere(kFALSE)
- , fNclusters(-1)
- , fRawDataSource(0)
- , fFeeParams(0)
+AliTRDclusterizerHLT::AliTRDclusterizerHLT(const Text_t *name, const Text_t *title, AliTRDReconstructor * rec)
+ : AliTRDclusterizer(name,title,rec)
+ , fTreeCreatedHere(kFALSE)
+ , fNclusters(-1)
+ , fRawDataSource(0)
+ , fFeeParams(0)
{
//
// AliTRDclusterizerHLT constructor
//use the parameter c - no warning...
((AliTRDclusterizerHLT &) c).fDigitsManager = 0;
-// ((AliTRDclusterizerHLT &) c).fDigitsManager = 0;
-// ((AliTRDclusterizerHLT &) c).fTreeCreatedHere = kFALSE;
-// AliTRDclusterizer::Copy(c);
+ // ((AliTRDclusterizerHLT &) c).fDigitsManager = 0;
+ // ((AliTRDclusterizerHLT &) c).fTreeCreatedHere = kFALSE;
+ // AliTRDclusterizer::Copy(c);
}
public:
AliTRDclusterizerHLT();
- AliTRDclusterizerHLT(const Text_t* name, const Text_t* title);
+ AliTRDclusterizerHLT(const Text_t* name, const Text_t* title, AliTRDReconstructor* reconstructor);
AliTRDclusterizerHLT(const AliTRDclusterizerHLT &c);
virtual ~AliTRDclusterizerHLT();
AliTRDclusterizerHLT &operator=(const AliTRDclusterizerHLT &c);