Skip to content
Snippets Groups Projects
Commit eeff41ab authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'rpcCab_digRdo' into 'master'

Remove dependence of RpcDigitToRpcRDO::fillTagInfo on MuonRPC_Cabling

See merge request atlas/athena!33044
parents af2415ba a3ee575c
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONBYTESTREAMCNVTEST_CSCDIGITTOCSCRDO_H
#define MUONBYTESTREAMCNVTEST_CSCDIGITTOCSCRDO_H
#include "GaudiKernel/ToolHandle.h"
#include "AthenaBaseComps/AthAlgorithm.h"
class IMuonDigitizationTool;
#include "GaudiKernel/ToolHandle.h"
#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
// Author: Ketevi A. Assamagan
// BNL, October 27, 2003
......@@ -25,11 +24,10 @@ class CscDigitToCscRDO : public AthAlgorithm {
public:
CscDigitToCscRDO(const std::string& name, ISvcLocator* pSvcLocator);
~CscDigitToCscRDO();
~CscDigitToCscRDO()=default;
StatusCode initialize();
StatusCode execute();
StatusCode finalize();
private:
ToolHandle<IMuonDigitizationTool> m_digTool{this};
......
......@@ -27,6 +27,10 @@ class MdtDigitToMdtRDO : public AthReentrantAlgorithm {
private:
StatusCode fill_MDTdata(const EventContext& ctx) const;
// NOTE: although this function has no clients in release 22, currently the Run2 trigger simulation is still run in
// release 21 on RDOs produced in release 22. Since release 21 accesses the TagInfo, it needs to be written to the
// RDOs produced in release 22. The fillTagInfo() function thus needs to stay in release 22 until the workflow changes
StatusCode fillTagInfo() const;
protected:
......
......@@ -48,8 +48,13 @@ private:
StatusCode fill_RPCdata(RPCsimuData& data, const EventContext& ctx, const RpcCablingCondData*) const;
// NOTE: although this function has no clients in release 22, currently the Run2 trigger simulation is still run in
// release 21 on RDOs produced in release 22. Since release 21 accesses the TagInfo, it needs to be written to the
// RDOs produced in release 22. The fillTagInfo() function thus needs to stay in release 22 until the workflow changes
StatusCode fillTagInfo() const;
const MuonGM::MuonDetectorManager* m_MuonMgr;
IntegerProperty m_fast_debug{this, "FastDebug", 0, "bits for debugging 'fast' algos"};
IntegerProperty m_monitoring{this, "Monitoring", 0, "bits for monitoring sequence"};
......@@ -82,8 +87,7 @@ private:
SG::WriteHandleKey<RpcPadContainer> m_padContainerKey{this,"OutputObjectName","RPCPAD","WriteHandleKey for Output RpcPadContainer"};
SG::ReadHandleKey<RpcDigitContainer> m_digitContainerKey{this,"InputObjectName","RPC_DIGITS","ReadHandleKey for Input RpcDigitContainer"};
const MuonGM::MuonDetectorManager* m_MuonMgr{};
std::string m_cablingType{"MuonRPC_Cabling"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
};
......
......@@ -32,6 +32,9 @@ private:
StatusCode getCabling();
// NOTE: although this function has no clients in release 22, currently the Run2 trigger simulation is still run in
// release 21 on RDOs produced in release 22. Since release 21 accesses the TagInfo, it needs to be written to the
// RDOs produced in release 22. The fillTagInfo() function thus needs to stay in release 22 until the workflow changes
StatusCode fillTagInfo() const;
StatusCode fill_TGCdata(const EventContext& ctx) const;
......@@ -42,13 +45,13 @@ private:
protected:
ServiceHandle<ITGCcablingServerSvc> m_tgc_cabling_server;
const ITGCcablingSvc* m_cabling;
SG::WriteHandleKey<TgcRdoContainer> m_rdoContainerKey{this,"OutputObjectName","TGCRDO","WriteHandleKey for Output TgcRdoContainer"};
SG::ReadHandleKey<TgcDigitContainer> m_digitContainerKey{this,"InputObjectName","TGC_DIGITS","ReadHandleKey for Input TgcDigitContainer"};
const ITGCcablingSvc * m_cabling{};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
std::string m_cablingType;
std::string m_cablingType;
};
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// Author: Ketevi A. Assamagan
#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
#include "MuonByteStreamCnvTest/CscDigitToCscRDO.h"
CscDigitToCscRDO::CscDigitToCscRDO(const std::string& name,
ISvcLocator* pSvcLocator)
: AthAlgorithm(name, pSvcLocator),
CscDigitToCscRDO::CscDigitToCscRDO(const std::string& name, ISvcLocator* pSvcLocator) :
AthAlgorithm(name, pSvcLocator),
m_digTool("CscDigitToCscRDOTool", this )
{
declareProperty("CscDigitToRDOTool", m_digTool);
}
CscDigitToCscRDO::~CscDigitToCscRDO() {
}
StatusCode CscDigitToCscRDO::initialize()
{
ATH_CHECK( m_digTool.retrieve() );
ATH_MSG_DEBUG( "Retrieved CSC Digit -> RDO Tool." );
ATH_CHECK(m_digTool.retrieve());
ATH_MSG_DEBUG("Retrieved CSC Digit -> RDO Tool.");
return StatusCode::SUCCESS;
}
StatusCode CscDigitToCscRDO::execute()
{
ATH_MSG_DEBUG( "in execute()" );
ATH_MSG_DEBUG("in execute()");
return m_digTool->digitize(Gaudi::Hive::currentContext());
}
StatusCode CscDigitToCscRDO::finalize()
{
ATH_MSG_DEBUG( "finalize." );
return StatusCode::SUCCESS;
}
......@@ -259,6 +259,9 @@ StatusCode MdtDigitToMdtRDO::fill_MDTdata(const EventContext& ctx) const {
}
// NOTE: although this function has no clients in release 22, currently the Run2 trigger simulation is still run in
// release 21 on RDOs produced in release 22. Since release 21 accesses the TagInfo, it needs to be written to the
// RDOs produced in release 22. The fillTagInfo() function thus needs to stay in release 22 until the workflow changes
StatusCode MdtDigitToMdtRDO::fillTagInfo() const {
ServiceHandle<ITagInfoMgr> tagInfoMgr ("TagInfoMgr", name());
......@@ -266,7 +269,7 @@ StatusCode MdtDigitToMdtRDO::fillTagInfo() const {
return StatusCode::FAILURE;
}
std::string cablingType="NewMDT_Cabling";
std::string cablingType="NewMDT_Cabling"; // everything starting from Run2 should be 'New'
StatusCode sc = tagInfoMgr->addTag("MDT_CablingType",cablingType);
if(sc.isFailure()) {
......
......@@ -23,14 +23,15 @@ static double time_correction(double, double, double);
namespace {
static constexpr unsigned int const& rpcRawHitWordLength = 7;
static constexpr double const& inverseSpeedOfLight = 1e6 / Gaudi::Units::c_light; // Gaudi::Units::c_light=2.99792458e+8, but need 299.792458
static constexpr double const& inverseSpeedOfLight = 1 / Gaudi::Units::c_light; // need 1/299.792458
}
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
RpcDigitToRpcRDO::RpcDigitToRpcRDO(const std::string& name, ISvcLocator* pSvcLocator) :
AthReentrantAlgorithm(name, pSvcLocator)
AthReentrantAlgorithm(name, pSvcLocator),
m_MuonMgr(nullptr)
{
}
......@@ -46,10 +47,6 @@ StatusCode RpcDigitToRpcRDO::initialize()
ATH_CHECK(detStore()->retrieve(m_MuonMgr));
ATH_CHECK(m_cabling.retrieve()) ;
if (m_cabling->rpcCabSvcType() == "simLike_MapsFromFiles" || m_cabling->rpcCabSvcType() == "dataLike") m_cablingType="MuonRPC_Cabling";
else if (m_cabling->rpcCabSvcType() == "simulationLike") m_cablingType="RPCcablingSim";
else if (m_cabling->rpcCabSvcType() == "simulationLikeInitialization" ) m_cablingType="RPCcabling";
else ATH_MSG_WARNING( "Unknown cabling type: rpcCabSvcType()="<< m_cabling->rpcCabSvcType() );
ATH_CHECK(m_readKey.initialize());
......@@ -236,21 +233,21 @@ double time_correction(double x, double y, double z)
return std::sqrt(x*x+y*y+z*z)*inverseSpeedOfLight;
}
// NOTE: although this function has no clients in release 22, currently the Run2 trigger simulation is still run in
// release 21 on RDOs produced in release 22. Since release 21 accesses the TagInfo, it needs to be written to the
// RDOs produced in release 22. The fillTagInfo() function thus needs to stay in release 22 until the workflow changes
StatusCode RpcDigitToRpcRDO::fillTagInfo() const
{
ServiceHandle<ITagInfoMgr> tagInfoMgr ("TagInfoMgr", name());
ATH_CHECK(tagInfoMgr.retrieve());
StatusCode sc = tagInfoMgr->addTag("RPC_CablingType",m_cablingType);
std::string cablingType="MuonRPC_Cabling";
StatusCode sc = tagInfoMgr->addTag("RPC_CablingType",cablingType);
if(sc.isFailure()) {
ATH_MSG_WARNING( "RPC_CablingType " << m_cablingType
<< " not added to TagInfo " );
ATH_MSG_WARNING( "RPC_CablingType " << cablingType << " not added to TagInfo " );
return sc;
} else {
ATH_MSG_DEBUG( "RPC_CablingType " << m_cablingType
<< " is Added TagInfo " );
ATH_MSG_DEBUG( "RPC_CablingType " << cablingType << " is Added TagInfo " );
}
return StatusCode::SUCCESS;
......
......@@ -18,9 +18,10 @@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
TgcDigitToTgcRDO::TgcDigitToTgcRDO(const std::string& name, ISvcLocator* pSvcLocator)
: AthReentrantAlgorithm(name, pSvcLocator),
m_tgc_cabling_server("TGCcablingServerSvc", name)
TgcDigitToTgcRDO::TgcDigitToTgcRDO(const std::string& name, ISvcLocator* pSvcLocator) :
AthReentrantAlgorithm(name, pSvcLocator),
m_tgc_cabling_server("TGCcablingServerSvc", name),
m_cabling(nullptr)
{
declareProperty ( "isNewTgcDigit", m_isNewTgcDigit = true );
}
......@@ -220,6 +221,9 @@ TgcRdo * TgcDigitToTgcRDO::getTgcRdo(const TgcRawData * rawData, std::map<uint1
return rdo;
}
// NOTE: although this function has no clients in release 22, currently the Run2 trigger simulation is still run in
// release 21 on RDOs produced in release 22. Since release 21 accesses the TagInfo, it needs to be written to the
// RDOs produced in release 22. The fillTagInfo() function thus needs to stay in release 22 until the workflow changes
StatusCode TgcDigitToTgcRDO::fillTagInfo() const
{
ServiceHandle<ITagInfoMgr> tagInfoMgr ("TagInfoMgr", name());
......@@ -242,7 +246,6 @@ StatusCode TgcDigitToTgcRDO::fillTagInfo() const
StatusCode TgcDigitToTgcRDO::getCabling() {
m_cabling = nullptr;
ATH_CHECK( m_tgc_cabling_server->giveCabling(m_cabling) );
int maxRodId,maxSswId, maxSbloc,minChannelId, maxChannelId;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment