From 47281e1f7a2cefaeb2ee9662c88d16cad43ec690 Mon Sep 17 00:00:00 2001 From: Stefano Rosati <stefano.rosati@cern.ch> Date: Wed, 7 Mar 2018 01:30:10 +0100 Subject: [PATCH] Revert "First version of the MicroMega RDO->PRD conversion alg and tool" This reverts commit 02d4f9bc502bd53fcb4f4d44df90944800bdb355 [formerly 4f87a807f5babf5c7d9e3dabd90f9f469dca1d60]. Former-commit-id: 3f5c56c463c9b94fb87214a7cda60a5a83f81cf2 --- .../src/MmRdoToPrepDataTool.cxx | 81 +------------------ .../MuonRdoToPrepData/MM_RdoToMM_PrepData.h | 13 +-- .../src/MM_RdoToMM_PrepData.cxx | 35 ++------ .../components/MuonRdoToPrepData_entries.cxx | 2 - .../MuonPrepRawData/MMPrepData.h | 34 +------- .../MuonPrepRawData/src/MMPrepData.cxx | 20 ++--- 6 files changed, 21 insertions(+), 164 deletions(-) diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx index 5cdc2e6b0364..d1c5507192ea 100644 --- a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx @@ -38,7 +38,6 @@ Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t, m_muonMgr(0), m_mmIdHelper(0), m_muonIdHelper(0), - m_fullEventDone(false), m_mmPrepDataContainer(0) { declareInterface<Muon::IMuonRdoToPrepDataTool>(this); @@ -94,91 +93,19 @@ StatusCode Muon::MmRdoToPrepDataTool::finalize() StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollection *rdoColl, std::vector<IdentifierHash>& idWithDataVect) { - ATH_MSG_DEBUG(" ***************** Start of process MM Collection"); + ATH_MSG_DEBUG(" ***************** Start of processCsm"); return StatusCode::SUCCESS; } - -Muon::MmRdoToPrepDataTool::SetupMM_PrepDataContainerStatus Muon::MmRdoToPrepDataTool::setupMM_PrepDataContainer() -{ - - if(!evtStore()->contains<Muon::MMPrepDataContainer>(m_mmPrepDataContainerKey.key())){ - m_fullEventDone=false; - - SG::WriteHandle< Muon::MMPrepDataContainer > handle(m_mmPrepDataContainerKey); - StatusCode status = handle.record(std::make_unique<Muon::MMPrepDataContainer>(m_mmIdHelper->module_hash_max())); - - if (status.isFailure() || !handle.isValid() ) { - ATH_MSG_FATAL("Could not record container of MicroMega PrepData Container at " << m_mmPrepDataContainerKey.key()); - return FAILED; - } - m_mmPrepDataContainer = handle.ptr(); - return ADDED; - } - return ALREADYCONTAINED; -} - - -const MM_RawDataContainer* Muon::MmRdoToPrepDataTool::getRdoContainer() { - - auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey); - if(rdoContainerHandle.isValid()) { - ATH_MSG_DEBUG("MM_getRdoContainer success"); - return rdoContainerHandle.cptr(); - } - ATH_MSG_WARNING("Retrieval of MM_RawDataContainer failed !"); - - return nullptr; -} - - -void Muon::MmRdoToPrepDataTool::processRDOContainer( std::vector<IdentifierHash>& idWithDataVect ) -{ - - ATH_MSG_DEBUG("In processRDOContainer"); - const MM_RawDataContainer* rdoContainer = getRdoContainer(); - if (!rdoContainer) { - return; - } - - // run in unseeded mode - for (MM_RawDataContainer::const_iterator it = rdoContainer->begin(); it != rdoContainer->end(); ++it ) { - - auto rdoColl = *it; - if (rdoColl->empty()) continue; - ATH_MSG_DEBUG("New RDO collection with " << rdoColl->size() << "MM Hits"); - if(processCollection(rdoColl, idWithDataVect).isFailure()) { - ATH_MSG_DEBUG("processCsm returns a bad StatusCode - keep going for new data collections in this event"); - } - } - - - return; -} - - // methods for ROB-based decoding StatusCode Muon::MmRdoToPrepDataTool::decode( std::vector<IdentifierHash>& idVect, - std::vector<IdentifierHash>& idWithDataVect ) + std::vector<IdentifierHash>& selectedIdVect ) { - // clear the output vector of selected data - idWithDataVect.clear(); - - SetupMM_PrepDataContainerStatus containerRecordStatus = setupMM_PrepDataContainer(); - - if ( containerRecordStatus == FAILED ) { - return StatusCode::FAILURE; - } - - // check if the full event has already been decoded - if ( m_fullEventDone ) { - ATH_MSG_DEBUG ("Full event dcoded, nothing to do"); - return StatusCode::SUCCESS; - } + ATH_MSG_DEBUG("Size of Hashes" << idVect.size() ); + ATH_MSG_DEBUG("Size of selected Hashes" << selectedIdVect.size() ); - return StatusCode::SUCCESS; } diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h index 91aab06b0dcb..9e17aa47a5ad 100755 --- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h +++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/MuonRdoToPrepData/MM_RdoToMM_PrepData.h @@ -1,14 +1,12 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef MM_RDOTOMM_PREPDATA_H -#define MM_RDOTOMM_PREPDATA_H +#ifndef CSCRDOTOCSCPREPDATA_H +#define CSCRDOTOCSCPREPDATA_H #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgorithm.h" -#include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h" - class MM_RdoToMM_PrepData : public AthAlgorithm { @@ -22,11 +20,6 @@ public: private: - ToolHandle< Muon::IMuonRdoToPrepDataTool > m_tool; //!< Tool used to do actual decoding. - - bool m_print_inputRdo; //!<< If true, will dump information about the input RDOs. - bool m_print_prepData; //!<< If true, will dump information about the resulting PRDs. - }; #endif /// CSCRDOTOCSCPREPDATA_H diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx index b77e77db3abe..8e0ac7ecee27 100755 --- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx +++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MM_RdoToMM_PrepData.cxx @@ -1,19 +1,8 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - #include "MuonRdoToPrepData/MM_RdoToMM_PrepData.h" -#include "Identifier/IdentifierHash.h" MM_RdoToMM_PrepData::MM_RdoToMM_PrepData(const std::string& name, ISvcLocator* pSvcLocator) : - AthAlgorithm(name, pSvcLocator), - m_tool("Muon::MmRdoToPrepDataTool/MM_PrepDataProviderTool"), - m_print_inputRdo(false), - m_print_prepData(false) + AthAlgorithm(name, pSvcLocator) { - declareProperty("DecodingTool", m_tool, "mdt rdo to prep data conversion tool" ); - declareProperty("PrintInputRdo", m_print_inputRdo, "If true, will dump information about the input RDOs"); - declareProperty("PrintPrepData", m_print_prepData, "If true, will dump information about the resulting PRDs"); } StatusCode MM_RdoToMM_PrepData::finalize() { @@ -22,27 +11,13 @@ StatusCode MM_RdoToMM_PrepData::finalize() { } StatusCode MM_RdoToMM_PrepData::initialize(){ - ATH_MSG_DEBUG(" in initialize()"); - - ATH_CHECK( m_tool.retrieve() ); - ATH_MSG_INFO("Retrieved" << m_tool); - - return StatusCode::SUCCESS; + ATH_MSG_DEBUG(" in initialize()"); + return StatusCode::SUCCESS; } StatusCode MM_RdoToMM_PrepData::execute() { - - ATH_MSG_DEBUG( " *************** in MM_RdoToMM_PrepData::execute() **************************************"); - - std::vector<IdentifierHash> myVector; - std::vector<IdentifierHash> myVectorWithData; - myVector.reserve(0); // empty vector - ATH_CHECK( m_tool->decode(myVector, myVectorWithData) ); - - if (m_print_inputRdo) m_tool->printInputRdo(); - if (m_print_prepData) m_tool->printPrepData(); - - return StatusCode::SUCCESS; + ATH_MSG_DEBUG( " *************** in MM_RdoToMM_PrepData::execute()"); + return StatusCode::SUCCESS; } diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx index 25e287d3929f..a1907d733943 100755 --- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx +++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/components/MuonRdoToPrepData_entries.cxx @@ -3,12 +3,10 @@ #include "MuonRdoToPrepData/RpcRdoToRpcPrepData.h" #include "MuonRdoToPrepData/TgcRdoToTgcPrepData.h" #include "MuonRdoToPrepData/StgcRdoToStgcPrepData.h" -#include "MuonRdoToPrepData/MM_RdoToMM_PrepData.h" DECLARE_COMPONENT( CscRdoToCscPrepData ) DECLARE_COMPONENT( MdtRdoToMdtPrepData ) DECLARE_COMPONENT( RpcRdoToRpcPrepData ) DECLARE_COMPONENT( TgcRdoToTgcPrepData ) DECLARE_COMPONENT( StgcRdoToStgcPrepData ) -DECLARE_COMPONENT( MM_RdoToMM_PrepData ) diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h index 1e256e5e092c..205d690ba455 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h @@ -11,7 +11,6 @@ #include "MuonReadoutGeometry/MMReadoutElement.h" class MMPrepDataContainerCnv; -class IdentifierHash; namespace Muon { @@ -51,9 +50,7 @@ namespace Muon const Amg::Vector2D& locpos, const std::vector<Identifier>& rdoList, const Amg::MatrixX* locErrMat, - const MuonGM::MMReadoutElement* detEl, - const int time, - const int charge ); + const MuonGM::MMReadoutElement* detEl ); @@ -67,12 +64,6 @@ namespace Muon The pointer will be zero if the det el is not defined (i.e. it was not passed in by the ctor)*/ const MuonGM::MMReadoutElement* detectorElement() const; - /** @brief Returns the TDC counts */ - int time() const; - - /** @brief Returns the ADC counts */ - int charge() const; - /** @brief Dumps information about the PRD*/ MsgStream& dump( MsgStream& stream) const; @@ -81,15 +72,9 @@ namespace Muon private: - /** @brief Cached pointer to the detector element - should never be zero.*/ + /** Cached pointer to the detector element - should never be zero.*/ const MuonGM::MMReadoutElement* m_detEl; - - /** @brief measured time */ - int m_time; - - /** @brief measured charge */ - int m_charge; - + }; inline const MuonGM::MMReadoutElement* MMPrepData::detectorElement() const @@ -104,18 +89,7 @@ namespace Muon if (m_globalPosition==0) throw Trk::PrepRawDataUndefinedVariable(); return *m_globalPosition; } - - inline int MMPrepData::time() const - { - return m_time; - } - - inline int MMPrepData::charge() const - { - return m_charge; - } - } -#endif // MUONPREPRAWDATA_MMREPDATA_H +#endif // MUONPREPRAWDATA_RPCPREPDATA_H diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx index 1d718f5df4b2..50f06d2c9af7 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx @@ -13,13 +13,9 @@ namespace Muon const Amg::Vector2D& locpos, const std::vector<Identifier>& rdoList, const Amg::MatrixX* locErrMat, - const MuonGM::MMReadoutElement* detEl, - const int time, - const int charge ) : + const MuonGM::MMReadoutElement* detEl ) : MuonCluster(RDOId, idDE, locpos, rdoList, locErrMat), //call base class constructor - m_detEl(detEl), - m_time(time), - m_charge(charge) + m_detEl(detEl) { } // Destructor: @@ -31,25 +27,19 @@ namespace Muon // Default constructor: MMPrepData::MMPrepData(): MuonCluster(), - m_detEl(0), - m_time(0), - m_charge(0) + m_detEl(0) { } //copy constructor: MMPrepData::MMPrepData(const MMPrepData& RIO): MuonCluster(RIO), - m_detEl( RIO.m_detEl ), - m_time(0), - m_charge(0) + m_detEl( RIO.m_detEl ) { } //move constructor: MMPrepData::MMPrepData(MMPrepData&& RIO): MuonCluster(std::move(RIO)), - m_detEl( RIO.m_detEl ), - m_time(0), - m_charge(0) + m_detEl( RIO.m_detEl ) { } //assignment operator -- GitLab