From 9c01cac516766ff325deeef5278c88ebe2279d22 Mon Sep 17 00:00:00 2001 From: Kristian Bjoerke <krbjeork@cern.ch> Date: Mon, 23 Jul 2018 15:18:14 +0200 Subject: [PATCH] Implemented Doxygen comments, should be reviewed by author @oda According to ATLAS Coding Guidelines comments are to follow the Doxygen style commenting [doxygen-comments], written in complete English sentences [english-comments]. In a header file comments describing functions and attributes is to be included [comment-functions]. Former-commit-id: 8618f77c79c6f368e805e0a685d8122f3674fae6 --- .../src/SCTRawDataProviderTool.cxx | 32 +++++++++------ .../src/SCTRawDataProviderTool.h | 41 +++++++++++++++---- 2 files changed, 53 insertions(+), 20 deletions(-) diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx index 49fe6af34de3..d1164b61557e 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx @@ -2,13 +2,20 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ +/////////////////////////////////////////////////////////////////// +// SCTRawDataProviderTool.cxx +// Implementation file for class SCTRawDataProviderTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + #include "SCTRawDataProviderTool.h" #include "StoreGate/ReadHandle.h" using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment; -/// ------------------------------------------------------- -/// contructor +// ------------------------------------------------------- +// Constructor SCTRawDataProviderTool::SCTRawDataProviderTool (const std::string& type, const std::string& name, const IInterface* parent) @@ -17,8 +24,8 @@ SCTRawDataProviderTool::SCTRawDataProviderTool { } -/// ------------------------------------------------------- -/// initialize +// ------------------------------------------------------- +// Initialize StatusCode SCTRawDataProviderTool::initialize() { @@ -33,8 +40,8 @@ StatusCode SCTRawDataProviderTool::initialize() return StatusCode::SUCCESS; } -/// ------------------------------------------------------- -/// convert method +// ------------------------------------------------------- +// Convert method StatusCode SCTRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecRobs, ISCT_RDO_Container& rdoIdc, @@ -48,12 +55,11 @@ StatusCode SCTRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecR StatusCode sc{StatusCode::SUCCESS}; - /** loop over the ROB fragments */ - + // loop over the ROB fragments for(const ROBFragment* rob_it : vecRobs) { - /** get the ID of this ROB/ROD */ + // get the ID of this ROB/ROD uint32_t robid{(rob_it)->rod_source_id()}; - /** check if this ROBFragment was already decoded (EF case in ROIs) */ + // check if this ROBFragment was already decoded (EF case in ROIs) if (!m_robIdSet.insert(robid).second) { ATH_MSG_DEBUG(" ROB Fragment with ID " << std::hex<<robid << std::dec @@ -82,10 +88,10 @@ StatusCode SCTRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecR return sc; } -/// ------------------------------------------------------- -/// beginNewEvent method +// ------------------------------------------------------- +// beginNewEvent method void SCTRawDataProviderTool::beginNewEvent() { - /** reset list of known robIds */ + // reset list of known robIds m_robIdSet.clear(); } diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h index cc424ae08da1..3889c656cdc1 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h @@ -2,6 +2,13 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ +/////////////////////////////////////////////////////////////////// +// SCTRawDataProviderTool.h +// Header file for class SCTRawDataProviderTool +/////////////////////////////////////////////////////////////////// +// (c) ATLAS Detector software +/////////////////////////////////////////////////////////////////// + #ifndef SCT_RAWDATABYTESTREAMCNV_SCTRAWDATAPROVIDERTOOL_H #define SCT_RAWDATABYTESTREAMCNV_SCTRAWDATAPROVIDERTOOL_H @@ -16,38 +23,58 @@ #include <set> +/** @class SCTRawDataProviderTool + * + * @breif Athena Algorithm Tool to fill Collections of SCT RDO Containers. + * + * The class inherits from AthAlgTool and ISCTRawDataProviderTool. + * + * Contains a convert method that fills the SCT RDO Collection. + */ class SCTRawDataProviderTool : public extends<AthAlgTool, ISCTRawDataProviderTool> { public: - //! constructor + /** Constructor */ SCTRawDataProviderTool(const std::string& type, const std::string& name, const IInterface* parent); - //! destructor + /** Destructor */ virtual ~SCTRawDataProviderTool() = default; - //! initialize + /** Initialize */ virtual StatusCode initialize() override; - //! finalize is empty, unnecessary to override + // finalize is empty, unnecessary to override - //! this is the main decoding method + /** @brief Main decoding method. + * + * Loops over ROB fragments, get ROB/ROD ID, then decode if not allready decoded. + * + * @param vecRobs Vector containing ROB framgents. + * @param rdoIdc RDO ID Container to be filled. + * @param errs Byte stream error container. + * @param bsFracCont Byte stream fraction container. + * */ virtual StatusCode convert(std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs, ISCT_RDO_Container& rdoIdc, InDetBSErrContainer* errs, SCT_ByteStreamFractionContainer* bsFracCont) override; + /** Reset list of known ROB IDs */ virtual void beginNewEvent() override; private: - + + /** Algorithm Tool to decode ROD byte stream into RDO. */ ToolHandle<ISCT_RodDecoder> m_decoder{this, "Decoder", "SCT_RodDecoder", "Decoder"}; - // bookkeeping if we have decoded a ROB already + /** For bookkeeping of decoded ROBs */ std::set<uint32_t> m_robIdSet; + /** Number of decode errors encountered in decoding. + * Turning off error message after 100 errors are counted */ int m_decodeErrCount; }; -- GitLab