*/\r
AliHLTCaloRecPointDataStruct** GetRecPoints() const { return fRecPointArray; }\r
\r
- Int_t CheckDigits(AliHLTCaloRecPointDataStruct **recArray = 0, AliHLTCaloDigitDataStruct **digArray = 0, Int_t nRP = 0);\r
-\r
- Int_t CheckDigits(AliHLTCaloRecPointDataStruct **recArray, AliHLTCaloDigitDataStruct *digArray, Int_t nRP = 0);\r
-\r
+ /** \r
+ * Sort the digits by energy\r
+ */\r
+ void SetSortDigitsByEnergy();\r
+ \r
+ /** \r
+ * Sort the digits by position\r
+ */\r
+ void SetSortDigitsByPosition();\r
+ \r
+ /** \r
+ * Set the sorting function (as required by stdlib's qsort) if you don't want to use the provided ones \r
+ */\r
+ void SetSortingFunction(Int_t (*compare)(const void*, const void*)) { fCompareFunction = compare; }\r
+ \r
+ \r
+ \r
protected:\r
\r
/** \r
* Check the rec point array size and resize the array if necessary\r
*/\r
virtual Int_t CheckArray(); //COMMENT\r
+ \r
+ /** \r
+ * Sort the digits\r
+ */\r
+ void SortDigits();\r
\r
+ /** \r
+ * Compare digits by position\r
+ */\r
+ static Int_t CompareDigitsByPosition(const void *dig0, const void *dig);\r
+ \r
+ /** \r
+ * Compare digits by energy\r
+ */\r
+ static Int_t CompareDigitsByEnergy(const void *dig0, const void *dig);\r
+ \r
+ /** \r
+ * Pointer to the compare function for the sorting of digits\r
+ */\r
+ //Int_t (AliHLTCaloClusterizer::*fCompareFunction)(const void*, const void*);\r
+ Int_t (*fCompareFunction)(const void*, const void*);\r
+ \r
/** Array of pointers to the rec point output */\r
AliHLTCaloRecPointDataStruct **fRecPointArray; //COMMENT\r
\r
\r
/** Number of digits in event */\r
Int_t fNDigits; //COMMENT\r
+ \r
+ /** Are we sorting digits by position? */\r
+ Bool_t fSortedByPosition; //COMMENT\r
+\r
+ /** Are we sorting digits by energy? */\r
+ Bool_t fSortedByEnergy; //COMMENT\r
+\r
+ /** Are we sorting at all? */\r
+ Bool_t fSortDigits; //COMMENT\r
\r
private:\r
\r