- changing from AliCaloRawStream to AliAltroRawStream, causing a speed up of a factor ~100
- small bug fixes
#include "AliHLTPHOSClusterAnalyser.h"
#include "AliHLTPHOSRecPointHeaderStruct.h"
#include "AliHLTCaloClusterDataStruct.h"
+#include "AliPHOSGeoUtils.h"
#include "TGeoManager.h"
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
}
int
-AliHLTPHOSClusterAnalyserComponent::Reconfigure(const char *cdbEntry, const char *chainId)
+AliHLTPHOSClusterAnalyserComponent::Reconfigure(const char *cdbEntry, const char */*chainId*/)
{
// see header file for class documentation
// configure from the specified entry or the default
- ConfigureFromCDBObject(cdbEntry, chainId);
+ ConfigureFromCDBTObjString(cdbEntry);
return 0;
}
-int
-AliHLTPHOSClusterAnalyserComponent::ConfigureFromCDBObject(const char *cdbEntry, const char *chainId)
-{
- const char* entry=cdbEntry;
-
- if (!entry)
- {
- HLTDebug("No CDB path specified");
- entry = fOCDBEntry;
- }
-
- const char *path = cdbEntry;
-
-}
int
AliHLTPHOSClusterAnalyserComponent::ScanConfigurationArgument(int argc, const char **argv)
for (int i = 0; i < argc; i++)
{
- ScanConfigurationArgument(i, argv[i]);
+ ScanConfigurationArgument(i, argv);
}
return 0;
{
AliCDBPath path("GRP","Geometry","Data");
- if(path)
+ if(path.GetPath())
{
- HLTInfo("configure from entry %s, chain id %s", path, (chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
+ HLTInfo("configure from entry %s", path.GetPath());
AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
if (pEntry)
{
#include "AliHLTPHOSProcessor.h"
class AliHLTPHOSClusterAnalyser;
-
+class AliPHOSGeoUtils;
/**
* @class AliHLTPHOSClusterAnalyserComponent
*
/** interface function, see @ref AliHLTComponent for description */
int Deinit();
+ /** interface function, see @ref AliHLTComponent for description */
+ int Reconfigure(const char* cdbEntry, const char* chainId);
+
+ /** interface function, see @ref AliHLTComponent for description */
+ int ScanConfigurationArgument(int argc, const char** argv);
+
+ /** Get the PHOS geometry from OCDB */
+ int GetGeometryFromCDB();
+
private:
/** Copy constructor */
AliHLTPHOSClusterAnalyserComponent(const AliHLTPHOSClusterAnalyserComponent &);
/** The PHOS geometry */
AliPHOSGeoUtils *fPHOSGeometry; //!transient
-
+
};
#endif
{
continue;
}
- if(fAvailableSize <=0)
+ if(fAvailableSize < (sizeof(AliHLTPHOSRecPointDataStruct)))
{
HLTError("Out of buffer, stopping clusterisation");
return -1;
// Assigning digit data to the digit pointer
fRecPointDataPtr->fDigits = fDigitContainerPtr->fDigitDataStruct[i];
- fAvailableSize -= sizeof(AliHLTPHOSRecPointDataStruct) + sizeof(AliHLTPHOSDigitDataStruct);
- if(fAvailableSize <=0)
- {
- HLTError("Out of buffer, stopping clusterisation");
- return -1;
- }
+ fAvailableSize -= (sizeof(AliHLTPHOSRecPointDataStruct));
// Incrementing the pointer to be ready for new entry
fDigitDataPtr++;
}
totSize += sizeof(AliHLTPHOSRecPointDataStruct) + (fDigitsInCluster-1)*sizeof(AliHLTPHOSDigitDataStruct);
+ HLTDebug("Initial available size: %d, used size: %d, remaining available size: %d, should be: %d", availableSize, totSize, fAvailableSize, availableSize-totSize);
+
fRecPointDataPtr->fMultiplicity = fDigitsInCluster;
fRecPointDataPtr = reinterpret_cast<AliHLTPHOSRecPointDataStruct*>(fDigitDataPtr);
&(fDigitContainerPtr->fDigitDataStruct[j])))
{
// Assigning value to digit ptr
- *fDigitDataPtr = fDigitContainerPtr->fDigitDataStruct[j];
- // Incrementing digit pointer to be ready for new entry
- fAvailableSize -= sizeof(AliHLTPHOSRecPointDataStruct) + sizeof(AliHLTPHOSDigitDataStruct);
- if(fAvailableSize <=0)
+ if(fAvailableSize < sizeof(AliHLTPHOSDigitDataStruct))
{
HLTError("Out of buffer, stopping clusterisation");
return -1;
}
+ fAvailableSize -= sizeof(AliHLTPHOSDigitDataStruct);
+
+ *fDigitDataPtr = fDigitContainerPtr->fDigitDataStruct[j];
+ // Incrementing digit pointer to be ready for new entry
fDigitDataPtr++;
std::vector<AliHLTComponentBlockData>& outputBlocks)
{
//See headerfile for documentation
+
+ if(blocks == 0) return 0;
UInt_t offset = 0;
UInt_t mysize = 0;
const char *path = "HLT/ConfigPHOS/ClusterizerComponent";
- ConfigureFromCDBTObjString(path);
+ // ConfigureFromCDBTObjString(path);
for (int i = 0; i < argc; i++)
{
- ScanConfigurationArgument(i, argv[i]);
+ ScanConfigurationArgument(i, argv);
}
return 0;
fClusterizerPtr(0),
fRecPointStructArrayPtr(0),
fDigitCount(0),
- fModuleClusterizationMode(0),
fNoCrazyness(0)
{
//Copy constructor not implemented
/** interface function, see @ref AliHLTComponent for description */
int Deinit();
+ /** interface function, see @ref AliHLTComponent for description */
+ int Reconfigure(const char* cdbEntry, const char* chainId);
+
+ /** interface function, see @ref AliHLTComponent for description */
+ int ScanConfigurationArgument(int argc, const char** argv);
+
private:
/** All digits in the event */
while(currentchannel != 0)
{
- if(availableSize < totSize) return -1;
+ if(availableSize < totSize) return -1;
AliHLTPHOSMapper::GetChannelCoord(currentchannel->fChannelID, coord1);
}
else // Oh well, better use the low gain channel then
{
- // cout << "Reverse: Overflow!" << endl;
AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
AddDigit(currentchannelLG, coord1, locCoord);
j++;
mysize += digitCount*sizeof(AliHLTPHOSDigitDataStruct);
- HLTDebug("# of digits: %d, used memory size: %d, available size: %d", digitCount, mysize, size);
+ // HLTDebug("# of digits: %d, used memory size: %d, available size: %d", digitCount, mysize, size);
if(mysize > 0)
fRawReaderMemoryPtr = new AliRawReaderMemory();
fAltroRawStreamPtr = new AliAltroRawStreamV3(fRawReaderMemoryPtr);
-
+ // fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("PHOS"));
fSanityInspectorPtr = new AliHLTPHOSSanityInspector();
if( fDoPushRawData == true )
fRawReaderMemoryPtr->Reset();
fRawReaderMemoryPtr->NextEvent();
- if( fDoPushRawData == true)
- {
- fRawDataWriter->NewEvent( );
- }
+ // if( fDoPushRawData == true)
+// {
+// fRawDataWriter->NewEvent( );
+// }
if(fAltroRawStreamPtr != NULL)
{
delete fAltroRawStreamPtr;
fAltroRawStreamPtr=NULL;
}
- fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("PHOS"));
+ // fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("PHOS"));
+ fAltroRawStreamPtr = new AliAltroRawStreamV3(fRawReaderMemoryPtr);
if(fAltroRawStreamPtr->NextDDL())
{
UShort_t* firstBunchPtr = 0;
UShort_t chId = fMapperPtr->GetChannelID(iter->fSpecification, fAltroRawStreamPtr->GetHWAddress());
- if( fDoPushRawData == true)
- {
- fRawDataWriter->SetChannelId( chId );
- }
+// if( fDoPushRawData == true)
+// {
+// fRawDataWriter->SetChannelId( chId );
+// }
while( fAltroRawStreamPtr->NextBunch() == true )
{
nSamples = fAltroRawStreamPtr->GetBunchLength();
- if( fDoPushRawData == true)
- {
- fRawDataWriter->WriteBunchData( fAltroRawStreamPtr->GetSignals(), nSamples, fAltroRawStreamPtr->GetEndTimeBin() );
- }
+// if( fDoPushRawData == true)
+// {
+// fRawDataWriter->WriteBunchData( fAltroRawStreamPtr->GetSignals(), nSamples, fAltroRawStreamPtr->GetEndTimeBin() );
+// }
firstBunchPtr = const_cast< UShort_t* >( fAltroRawStreamPtr->GetSignals() );
}
if(firstBunchPtr)
HLTError("Buffer overflow: Trying to write data of size: %d bytes. Output buffer available: %d bytes.", totSize, size);
return -1;
}
- if(fInspectSanity)
- {
- crazyness = fSanityInspectorPtr->CheckAndHealInsanity(firstBunchPtr, nSamples);
- }
+// if(fInspectSanity)
+// {
+// crazyness = fSanityInspectorPtr->CheckAndHealInsanity(firstBunchPtr, nSamples);
+// }
fAnalyzerPtr->SetData( firstBunchPtr, nSamples);
fAnalyzerPtr->Evaluate(0, nSamples);
channelDataPtr++; // Updating position of the free output.
}
}
- if(fDoPushRawData)
- {
- fRawDataWriter->NewChannel();
- }
+// if(fDoPushRawData)
+// {
+// fRawDataWriter->NewChannel();
+// }
}
}
channelDataHeaderPtr->fAlgorithm = fAlgorithm;
channelDataHeaderPtr->fInfo = 0;
- if( fDoPushRawData == true)
- {
- tmpsize += fRawDataWriter->CopyBufferToSharedMemory( (UShort_t *)channelDataPtr, size, totSize);
- }
+// if( fDoPushRawData == true)
+// {
+// tmpsize += fRawDataWriter->CopyBufferToSharedMemory( (UShort_t *)channelDataPtr, size, totSize);
+// }
// channelDataHeaderPtr->fHasRawData = false;
channelDataHeaderPtr->fHasRawData = fDoPushRawData;
#include "Rtypes.h"
-class AliHLTAltroData;
-
/**
* @class AliHLTPHOSSanityInspector
* Sanity inspector for PHOS HLT. It takes raw data as input and checks it for insanity
/** Check for insanity */
- Int_t CheckInsanity(const UInt_t* data, const Int_t nSamples) const;
+ Int_t CheckInsanity(const UShort_t* data, const Int_t nSamples) const;
- /** Check for and heal insanity */
- Int_t CheckAndHealInsanity(UInt_t* data, Int_t nSamples); //Not completely reliable
-
- /** Check for and heal insanity */
- Int_t CheckAndHealInsanity(Int_t* data, Int_t nSamples); //Not completely reliable
-
/** Check for and heal insanity */
Int_t CheckAndHealInsanity(UShort_t* data, Int_t nSamples); //Not completely reliable