#include <numeric>
using std::accumulate;
+namespace
+{
+ // Helper class for std::accumulate algorithm.
+ class AliTimeSum {
+ public:
+ typedef int first_argument_type;
+ typedef AliHLTRootSchemaEvolutionComponent::AliHLTDataBlockItem second_argument_type;
+ typedef bool result_type;
+ int operator() (int a, AliHLTRootSchemaEvolutionComponent::AliHLTDataBlockItem b) {
+ return a+b.GetTotalTime();
+ }
+ };
+} // end of namespace
+
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTRootSchemaEvolutionComponent)
return 0;
}
- AliHLTUInt32_t listtime=accumulate(fList.begin(), fList.end(), int(0), AliHLTDataBlockItem::TimeSum());
+ AliHLTUInt32_t listtime=accumulate(fList.begin(), fList.end(), int(0), AliTimeSum());
AliHLTUInt32_t averageEventTime=0;
AliHLTUInt32_t averageCycleTime=0;
/// print status
void Print(const char* option) const;
- class TimeSum : public binary_function<int,AliHLTDataBlockItem,int> {
- public:
- int operator() (int a, AliHLTDataBlockItem b) {
- return a+b.GetTotalTime();
- }
- };
-
private:
/// data type of the block
AliHLTComponentDataType fDt; //! transient