//
// define the analysis chain to be run
//
+
+ bool sectorClusterer=true; // run clusterer on sector or DDL level
+ // check if the AliRawReaderMemory supports multiple buffers
+ TClass* info=TClass::GetClass("AliRawReaderMemory");
+ TList* methods=info->GetListOfAllPublicMethods();
+ if (sectorClusterer && !methods->FindObject("AddBuffer")) {
+ cerr << "warning: AliRawReaderMemory does not support multiple buffers, falling back to run clusterer on DDL level" << endl;
+ sectorClusterer=false;
+ }
+
int iMinSlice=0;
- int iMaxSlice=0;
+ int iMaxSlice=17;
int iMinPart=0;
int iMaxPart=5;
TString writerInput;
TString trackerInput;
for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
+ TString arg, clustererInput;
for (int part=iMinPart; part<=iMaxPart; part++) {
- TString arg, publisher, cf;
+ TString publisher, cf;
// raw data publisher components
int ddlno=DDLNoFromSlicePatch(slice, part);
publisher.Form("DP_%02d_%d", slice, part);
AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
+ if (!sectorClusterer) {
// cluster finder components
cf.Form("CF_%02d_%d", slice, part);
AliHLTConfiguration cfconf(cf.Data(), "TPCOfflineClusterer", publisher.Data(), "");
trackerInput+=cf;
//if (writerInput.Length()>0) writerInput+=" ";
//writerInput+=cf;
+ } else {
+ if (clustererInput.Length()>0) clustererInput+=" ";
+ clustererInput+=publisher;
+ }
+ }
+ if (sectorClusterer) {
+ // cluster finder components
+ cf.Form("CF_%02d", slice);
+ AliHLTConfiguration cfconf(cf.Data(), "TPCOfflineClusterer", clustererInput.Data(), "");
+
+ if (trackerInput.Length()>0) trackerInput+=" ";
+ trackerInput+=cf;
}
}
// Perfom initialisation. Checks arguments (argc,argv)
// and make initialisation. Returns 0 if success.
//
+#ifdef HAVE_NOT_TPCOFFLINE_REC
+ HLTError("AliRoot version > v4-13-Release required");
+ return -ENOSYS;
+#endif //HAVE_NOT_TPCOFFLINE_REC
+
int iResult=0;
HLTInfo("parsing %d arguments", argc);
HLTInfo("processing data");
int iResult=0;
+ int commonMinSlice=-1;
+ int commonMaxSlice=-1;
+ int commonMinPatch=-1;
+ int commonMaxPatch=-1;
+
for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC);
pBlock!=NULL && iResult>=0;
pBlock=GetNextInputBlock()) {
break;
}
+ if (commonMinPatch<0) {
+ commonMinSlice=slice;
+ commonMaxSlice=slice;
+ commonMinPatch=patch;
+ commonMaxPatch=patch;
+ } else {
+ if (commonMinSlice<slice) commonMinSlice=slice;
+ if (commonMaxSlice>slice) commonMinSlice=slice;
+ if (commonMinPatch<patch) commonMinPatch=patch;
+ if (commonMaxPatch>patch) commonMinPatch=patch;
+ }
+
if (fRawReader && fClusterer) {
// setup raw reader and cluster finder
- fRawReader->SetMemory( reinterpret_cast<UChar_t*>( pBlock->fPtr ), pBlock->fSize );
int ddlId=AliDAQ::DdlIDOffset("TPC");
if (patch<2) {
ddlId+=2*slice+patch;
ddlId+=72;
ddlId+=4*slice+patch-2;
}
+
+#ifdef HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER
+ // AliRawReaderMemory does not support mulriple blocks,
+ // process on block by block basis
+ fRawReader->SetMemory( reinterpret_cast<UChar_t*>( pBlock->fPtr ), pBlock->fSize );
fRawReader->SetEquipmentID(ddlId);
+ iResult=RunClusterer(pBlock->fSpecification);
+#else //!HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER
+ // add all raw data blocks to one clusterer
+ fRawReader->AddBuffer( reinterpret_cast<UChar_t*>( pBlock->fPtr ), pBlock->fSize, ddlId );
+#endif //HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER
+ }
+ }
+#ifndef HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER
+ iResult=RunClusterer(AliHLTTPCDefinitions::EncodeDataSpecification(commonMinSlice,
+ commonMaxSlice,
+ commonMinPatch,
+ commonMaxPatch));
+ fRawReader->ClearBuffers();
+#endif //HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER
+
+ return iResult;
+}
+
+int AliHLTTPCOfflineClustererComponent::RunClusterer(AliHLTUInt32_t outspec)
+{
+ // see header file for class documentation
+ int iResult=0;
+ {
+ if (fRawReader && fClusterer) {
// run the cluster finder
fClusterer->Digits2Clusters(fRawReader);
AliTPCClustersRow *clrow = 0x0;
Int_t nbClusters = 0;
- TObjArray* outClrow=fClusterer->GetOutputArray();
+ TObjArray* outClrow=NULL;
+#ifndef HAVE_NOT_TPCOFFLINE_REC
+ outClrow=fClusterer->GetOutputArray();
+#endif //HAVE_NOT_TPCOFFLINE_REC
if (outClrow) {
Int_t lower = outClrow->LowerBound();
Int_t entries = outClrow->GetEntriesFast();
}
// insert TObjArray of clusters into output stream
- PushBack(outClrow, kAliHLTDataTypeTObjArray|kAliHLTDataOriginTPC/*AliHLTTPCDefinitions::fgkOfflineClustersDataType*/, pBlock->fSpecification);
+ PushBack(outClrow, kAliHLTDataTypeTObjArray|kAliHLTDataOriginTPC/*AliHLTTPCDefinitions::fgkOfflineClustersDataType*/, outspec);
// clear array
outClrow->Clear();
}
- HLTInfo("processing done: DDL %d Number of clusters %d",ddlId, nbClusters);
+ HLTInfo("processing done: Number of clusters %d (specification 0x%08x)", nbClusters, outspec);
} else {
HLTError("component not initialized");
iResult=-EFAULT;
}
}
-
return iResult;
}
/** assignment operator prohibited */
AliHLTTPCOfflineClustererComponent& operator=(const AliHLTTPCOfflineClustererComponent&);
+ /**
+ * Run the clusterer and PushBack the clusters with the given specification.
+ * @param outspec data specification of the output block
+ */
+ int RunClusterer(AliHLTUInt32_t outspec);
+
/**
* Configure the component.
* Parse a string for the configuration arguments and set the component
// init configuration
//
int iResult=0;
-#ifdef HAVE_NOT_TPC_LOAD_CLUSTERS
- HLTError("AliRoot version > v4-13-Release required");
- return -EFAULT;
+#ifdef HAVE_NOT_TPCOFFLINE_REC
+ HLTFatal("AliRoot version > v4-13-Release required");
+ return -ENOSYS;
#endif
TString argument="";
// if (dynamic_cast<AliTPCClustersRow*>(clusterArray->At(lower))==NULL) continue;
HLTInfo("load %d cluster rows from block %s 0x%08x", clusterArray->GetEntries(), DataType2Text(GetDataType(pObj)).c_str(), GetSpecification(pObj));
-#ifndef HAVE_NOT_TPC_LOAD_CLUSTERS
+#ifndef HAVE_NOT_TPCOFFLINE_REC
fTracker->LoadClusters(clusterArray);
-#endif //HAVE_NOT_TPC_LOAD_CLUSTERS
+#endif //HAVE_NOT_TPCOFFLINE_REC
}// end loop over input objects
// set magnetic field for the ESD, assumes correct initialization of
dnl
dnl AliRawReaderMemory support for multiple buffers added
- dnl Jun 2008
+ dnl revision 26829 Jun 2008
dnl
CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS -I${ALICE_ROOT}/RAW"
have_rawreadermemory_multbuffers=no
rr.AddBuffer(NULL, 0, 0);])],
[have_rawreadermemory_multbuffers=yes],
[AC_DEFINE(HAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER)])
- AC_MSG_CHECKING(for AliRawReaderMemory for support of multiple buffers)
+ AC_MSG_CHECKING(AliRawReaderMemory support for multiple buffers)
AC_MSG_RESULT([$have_rawreadermemory_multbuffers])
dnl
fi
AC_MSG_RESULT([$have_alitpc])
- have_tpc_load_clusters=no
- AC_MSG_CHECKING(for on-line features of TPC offline tracker)
+ dnl
+ dnl Check for functionality in the TPC reconstruction required for online
+ dnl processing
+ dnl
+ have_tpc_hltoffline_rec=no
+ AC_MSG_CHECKING(for on-line features of TPC offline reconstruction)
ALITPC_LIBS="-lGui -lTPCbase -lTPCrec"
LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $ALITPC_LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliTPCtrackerMI.h>
+ #include <AliTPCclustererMI.h>
#include <TObjArray.h>],
[AliTPCtrackerMI tracker;
TObjArray* array=NULL;
- tracker.LoadClusters(array);])],
- [have_tpc_load_clusters=yes],
- [AC_DEFINE(HAVE_NOT_TPC_LOAD_CLUSTERS)])
- AC_MSG_RESULT([$have_tpc_load_clusters])
+ tracker.LoadClusters(array);
+ AliTPCclustererMI cl(NULL, NULL);
+ cl.GetOutputArray();])],
+ [have_tpc_hltoffline_rec=yes],
+ [AC_DEFINE(HAVE_NOT_TPCOFFLINE_REC)])
+ AC_MSG_RESULT([$have_tpc_hltoffline_rec])
fi
AC_CHECK_HEADER([AliTPCCalibPulser.h], [], [AC_DEFINE(HAVE_NOT_ALITPCCALIBPULSER)])