From 94d06b79a195dec517c374e4978148b5aaf4cfe1 Mon Sep 17 00:00:00 2001 From: richterm Date: Fri, 30 Mar 2012 12:29:21 +0000 Subject: [PATCH] minor code cleanup and coding rules --- HLT/BASE/util/AliHLTRecoParamComponent.cxx | 3 +-- HLT/BASE/util/AliHLTRecoParamComponent.h | 18 ++++++------- .../AliHLTRootSchemaEvolutionComponent.cxx | 17 ++++++------ .../util/AliHLTRootSchemaEvolutionComponent.h | 27 +++++++++---------- 4 files changed, 31 insertions(+), 34 deletions(-) diff --git a/HLT/BASE/util/AliHLTRecoParamComponent.cxx b/HLT/BASE/util/AliHLTRecoParamComponent.cxx index 3991e22ad03..98190471797 100644 --- a/HLT/BASE/util/AliHLTRecoParamComponent.cxx +++ b/HLT/BASE/util/AliHLTRecoParamComponent.cxx @@ -1,11 +1,10 @@ // $Id$ //************************************************************************** -//* This file is property of and copyright by the ALICE HLT Project * +//* This file is property of and copyright by the ALICE * //* ALICE Experiment at CERN, All rights reserved. * //* * //* Primary Authors: Matthias Richter * -//* for The ALICE HLT Project. * //* * //* Permission to use, copy, modify and distribute this software and its * //* documentation strictly for non-commercial purposes is hereby granted * diff --git a/HLT/BASE/util/AliHLTRecoParamComponent.h b/HLT/BASE/util/AliHLTRecoParamComponent.h index d8e4463cb09..506df3b6185 100644 --- a/HLT/BASE/util/AliHLTRecoParamComponent.h +++ b/HLT/BASE/util/AliHLTRecoParamComponent.h @@ -3,7 +3,7 @@ #ifndef ALIHLTRECOPARAMCOMPONENT_H #define ALIHLTRECOPARAMCOMPONENT_H -//* This file is property of and copyright by the ALICE HLT Project * +//* This file is property of and copyright by the ALICE * //* ALICE Experiment at CERN, All rights reserved. * //* See cxx source for full Copyright notice * @@ -63,20 +63,20 @@ class AliHLTRecoParamComponent : public AliHLTCalibrationProcessor /// inherited from AliHLTComponent: return id of the component. virtual const char* GetComponentID() {return "RecoParamGenerator";}; /// inherited from AliHLTComponent: input data types - virtual void GetInputDataTypes(AliHLTComponentDataTypeList&); + virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list); /// inherited from AliHLTComponent: output data types virtual AliHLTComponentDataType GetOutputDataType(); /// inherited from AliHLTComponent: output data size virtual void GetOutputDataSize(unsigned long&, double&); /// inherited from AliHLTComponent: description of required CDB objects - void GetOCDBObjectDescription( TMap* const targetArray); + virtual void GetOCDBObjectDescription( TMap* const targetArray); /// inherited from AliHLTComponent: spawn function, create an instance. virtual AliHLTComponent* Spawn() {return new AliHLTRecoParamComponent;} protected: /// inherited from AliHLTCalibrationProcessor: custom initialization - int InitCalibration(); + virtual int InitCalibration(); /// inherited from AliHLTCalibrationProcessor: custom argument scan /// the AliHLTCalibrationProcessor so far does not use the base class /// methods for argument scan. @@ -84,7 +84,7 @@ class AliHLTRecoParamComponent : public AliHLTCalibrationProcessor int result=ScanConfigurationArgument(argc, argv); return result>0?result-1:result; } /// inherited from AliHLTCalibrationProcessor: cleanup - int DeinitCalibration(); + virtual int DeinitCalibration(); /// inherited from AliHLTCalibrationProcessor processing virtual int ProcessCalibration( const AliHLTComponentEventData& evtData, @@ -93,7 +93,7 @@ class AliHLTRecoParamComponent : public AliHLTCalibrationProcessor using AliHLTCalibrationProcessor::ProcessCalibration; /// inherited from AliHLTCalibrationProcessor processing - int ShipDataToFXS( const AliHLTComponentEventData& evtData, + virtual int ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); using AliHLTCalibrationProcessor::ShipDataToFXS; @@ -111,10 +111,10 @@ private: /** assignment operator prohibited */ AliHLTRecoParamComponent& operator=(const AliHLTRecoParamComponent&); - static const char* fgkConfigurationObject; //! configuration object + static const char* fgkConfigurationObject; //! component configuration object - AliHLTOnlineConfiguration fOnlineConfig; - int fOutputSize; + AliHLTOnlineConfiguration fOnlineConfig; //! online configuration object + int fOutputSize; //! output size estimator ClassDef(AliHLTRecoParamComponent, 0) // Online HLT RecoParam generator component }; diff --git a/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx b/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx index 426262c14f2..4822022b093 100644 --- a/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx +++ b/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.cxx @@ -1,11 +1,10 @@ // $Id$ //************************************************************************** -//* This file is property of and copyright by the ALICE HLT Project * +//* This file is property of and copyright by the ALICE * //* ALICE Experiment at CERN, All rights reserved. * //* * //* Primary Authors: Matthias Richter * -//* for The ALICE HLT Project. * //* * //* Permission to use, copy, modify and distribute this software and its * //* documentation strictly for non-commercial purposes is hereby granted * @@ -16,11 +15,11 @@ //* provided "as is" without express or implied warranty. * //************************************************************************** -/** @file AliHLTRootSchemaEvolutionComponent.cxx - @author Matthias Richter - @date 2009-10-18 - @brief Handler component for ROOT schema evolution of streamed objects -*/ +/// @file AliHLTRootSchemaEvolutionComponent.cxx +/// @author Matthias Richter +/// @date 2009-10-18 +/// @brief Handler component for ROOT schema evolution of streamed objects +/// #include "AliHLTRootSchemaEvolutionComponent.h" #include "AliHLTMessage.h" @@ -63,7 +62,7 @@ ClassImp(AliHLTRootSchemaEvolutionComponent) AliHLTRootSchemaEvolutionComponent::AliHLTRootSchemaEvolutionComponent() : AliHLTCalibrationProcessor() , fList() - , fFlags(kFXS) + , fPropertyFlags(kFXS) , fpStreamerInfos(NULL) , fpEventTimer(NULL) , fpCycleTimer(NULL) @@ -575,7 +574,7 @@ TObject* AliHLTRootSchemaEvolutionComponent::AliHLTDataBlockItem::Extract(const return pObj; } -int AliHLTRootSchemaEvolutionComponent::AliHLTDataBlockItem::Stream(TObject* obj, AliHLTMessage& msg) +int AliHLTRootSchemaEvolutionComponent::AliHLTDataBlockItem::Stream(const TObject* obj, AliHLTMessage& msg) { /// stream object and update performance parameters if (!obj) return -EINVAL; diff --git a/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.h b/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.h index 4c8812f6063..ac1cacc2ffd 100644 --- a/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.h +++ b/HLT/BASE/util/AliHLTRootSchemaEvolutionComponent.h @@ -3,15 +3,15 @@ #ifndef ALIHLTROOTSCHEMAEVOLUTIONCOMPONENT_H #define ALIHLTROOTSCHEMAEVOLUTIONCOMPONENT_H -//* This file is property of and copyright by the ALICE HLT Project * +//* This file is property of and copyright by the ALICE * //* ALICE Experiment at CERN, All rights reserved. * //* See cxx source for full Copyright notice * -/** @file AliHLTRootSchemaEvolutionComponent.h - @author Matthias Richter - @date 2009-10-18 - @brief Handler component for ROOT schema evolution of streamed objects -*/ +/// @file AliHLTRootSchemaEvolutionComponent.h +/// @author Matthias Richter +/// @date 2009-10-18 +/// @brief Handler component for ROOT schema evolution of streamed objects +/// #include "AliHLTCalibrationProcessor.h" #include "TString.h" @@ -86,7 +86,7 @@ class AliHLTRootSchemaEvolutionComponent : public AliHLTCalibrationProcessor /// inherited from AliHLTComponent: return id of the component. virtual const char* GetComponentID() {return "ROOTSchemaEvolutionComponent";}; /// inherited from AliHLTComponent: input data types - virtual void GetInputDataTypes(AliHLTComponentDataTypeList&); + virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list); /// inherited from AliHLTComponent: output data types virtual AliHLTComponentDataType GetOutputDataType(); /// inherited from AliHLTComponent: output data size @@ -131,13 +131,12 @@ class AliHLTRootSchemaEvolutionComponent : public AliHLTCalibrationProcessor TObject* Extract(const AliHLTComponentBlockData* bd); /// stream object and update performance parameters - int Stream(TObject* obj, AliHLTMessage& msg); + int Stream(const TObject* obj, AliHLTMessage& msg); bool IsObject() const {return fIsObject;} - bool operator==(AliHLTDataBlockItem& i) const {return fDt==i.fDt && fSpecification==i.fSpecification;} + bool operator==(const AliHLTDataBlockItem& i) const {return fDt==i.fDt && fSpecification==i.fSpecification;} bool operator==(AliHLTComponentDataType dt) const {return fDt==dt;} bool operator==(AliHLTUInt32_t spec) const {return fSpecification==spec;} - int operator+(AliHLTDataBlockItem& b) const; operator const AliHLTComponentDataType&() const {return fDt;} AliHLTUInt32_t GetSpecification() const {return fSpecification;} @@ -208,9 +207,9 @@ class AliHLTRootSchemaEvolutionComponent : public AliHLTCalibrationProcessor */ virtual int ScanConfigurationArgument(int argc, const char** argv); - void SetBits(AliHLTUInt32_t b) {fFlags|=b;} - void ClearBits(AliHLTUInt32_t b) {fFlags&=~b;} - bool TestBits(AliHLTUInt32_t b) {return (fFlags&b) != 0;} + void SetBits(AliHLTUInt32_t b) {fPropertyFlags|=b;} + void ClearBits(AliHLTUInt32_t b) {fPropertyFlags&=~b;} + bool TestBits(AliHLTUInt32_t b) const {return (fPropertyFlags&b) != 0;} int WriteToFile(const char* filename, const TObjArray* infos) const; private: @@ -221,7 +220,7 @@ private: vector fList; //! list of block properties - AliHLTUInt32_t fFlags; //! property flags + AliHLTUInt32_t fPropertyFlags; //! property flags TObjArray* fpStreamerInfos; //! array of streamer infos TStopwatch* fpEventTimer; //! stopwatch for event processing -- 2.43.0