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

Merge branch 'tgcconst2.MuonTGC_CnvTools-20210319' into 'master'

MuonTGC_CnvTools+MuonCnvToolInterfaces: const fixes.

See merge request !41762
parents c3849bf8 93193bf5
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!41762MuonTGC_CnvTools+MuonCnvToolInterfaces: const fixes.
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonByteStream/TgcRdoContByteStreamCnv.h"
......@@ -84,9 +84,6 @@ TgcRdoContByteStreamCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAddr)
{
MsgStream log(msgSvc(), const_cnvName);
// get Raw Event data
RawEventWrite* re = m_byteStreamEventAccess->getRawEvent();
// retrieve TGC RDO container
TgcRdoContainer * cont(NULL);
StoreGateSvc::fromStorable(pObj, cont);
......@@ -103,5 +100,5 @@ TgcRdoContByteStreamCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAddr)
pAddr = addr;
// convert
return m_tool->convert(cont, re, log);
return m_tool->convert(cont);
}
/*
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 MUONCNVTOOLINTERFACES_ITGC_RDOTOBYTESTREAMTOOL_H
......@@ -11,8 +11,6 @@
class TgcRdoContainer;
class MsgStream ;
static const InterfaceID IID_ITGC_RDOtoByteStreamTool( "Muon::ITGC_RDOtoByteStreamTool", 1, 0 );
namespace Muon {
/** An AlgTool class to provide conversion from LArRawChannelContainer
......@@ -29,18 +27,12 @@ class ITGC_RDOtoByteStreamTool: virtual public IAlgTool {
public:
static const InterfaceID& interfaceID() { return IID_ITGC_RDOtoByteStreamTool; };
virtual StatusCode initialize()=0;
virtual StatusCode finalize()=0;
DeclareInterfaceID( ITGC_RDOtoByteStreamTool, 1, 0 );
/** Conversion method, which takes the RDO container and converts it into raw data, filled into RawEventWrite.
@param cont RDO container which will be used to fill the raw event
@param re Raw event to be filled by this method.
@param log MsgStream to be filled by method.
@todo Do we really need to pass in a logfile? This is a AlgTool and so can provide its own log objects.
*/
virtual StatusCode convert(const TgcRdoContainer* cont, RawEventWrite* re, MsgStream& log )=0;
virtual StatusCode convert(const TgcRdoContainer* cont) const =0;
};
}
#endif
......
......@@ -19,7 +19,7 @@ atlas_add_component( MuonTGC_CnvTools
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel AthenaBaseComps Identifier EventPrimitives TGCcablingInterfaceLib MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonRDO MuonPrepRawData MuonTrigCoinData TrkSurfaces MuonCnvToolInterfacesLib MuonTGC_CnvToolsLib )
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel AthenaBaseComps Identifier EventPrimitives TGCcablingInterfaceLib MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonRDO MuonPrepRawData MuonTrigCoinData TrkSurfaces MuonCnvToolInterfacesLib MuonTGC_CnvToolsLib ByteStreamCnvSvcLib )
# Install files from the package:
atlas_install_joboptions( share/*.py )
......
/*
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 MUONCNVTOOLINTERFACES_ITGC_RDOTOBYTESTREAMTOOL_H
#define MUONCNVTOOLINTERFACES_ITGC_RDOTOBYTESTREAMTOOL_H
#ifndef MUONTGC_CNVTOOLS_ITGC_RDOTOBYTESTREAMTOOL_H
#define MUONTGC_CNVTOOLS_ITGC_RDOTOBYTESTREAMTOOL_H
#include "GaudiKernel/IAlgTool.h"
#include "ByteStreamCnvSvcBase/FullEventAssembler.h"
#include "MuonCnvToolInterfaces/ITGC_RDOtoByteStreamTool.h"
class TgcRdoContainer;
class MsgStream ;
static const InterfaceID IID_ITGC_RDOtoByteStreamTool( "Muon::ITGC_RDOtoByteStreamTool", 1, 0 );
namespace Muon {
/** An AlgTool class to provide conversion from TgcRdoContainer
* to ByteStream, and fill it in RawEvent
*
* @author Susumu Oda <Susumu.Oda@cern.ch>
*
* This code was adapted from LAr by Ketevi A. Assamagan
* on Jan-14-2003.
*/
class ITGC_RDOtoByteStreamTool: virtual public IAlgTool {
public:
static const InterfaceID& interfaceID() { return IID_ITGC_RDOtoByteStreamTool; };
virtual StatusCode initialize()=0;
virtual StatusCode finalize()=0;
/** Conversion method, which takes the RDO container and converts it into raw data, filled into RawEventWrite.
* @param cont RDO container which will be used to fill the raw event
* @param re Raw event to be filled by this method.
* @param log MsgStream to be filled by method.
* @todo Do we really need to pass in a logfile? This is a AlgTool and so can provide its own log objects.
*/
virtual StatusCode convert(const TgcRdoContainer* cont, RawEventWrite* re, MsgStream& log )=0;
};
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "TgcRdoContByteStreamTool.h"
......@@ -14,7 +14,7 @@
// contructor
Muon::TgcRdoContByteStreamTool::TgcRdoContByteStreamTool
(const std::string& type, const std::string& name, const IInterface* parent)
: AthAlgTool(type,name,parent),
: base_class(type,name,parent),
m_hid2re(0)
{
declareInterface<Muon::ITGC_RDOtoByteStreamTool>(this);
......@@ -34,6 +34,8 @@ StatusCode Muon::TgcRdoContByteStreamTool::initialize()
// create TGC RDO ID to source ID mapper
m_hid2re = new TGC_Hid2RESrcID;
ATH_CHECK( m_byteStreamCnvSvc.retrieve() );
return StatusCode::SUCCESS;
}
......@@ -46,11 +48,12 @@ StatusCode Muon::TgcRdoContByteStreamTool::finalize()
// convert TGC RDO to ByteStream
StatusCode Muon::TgcRdoContByteStreamTool::convert(const TgcRdoContainer* cont, RawEventWrite* re,
MsgStream& log)
StatusCode Muon::TgcRdoContByteStreamTool::convert(const TgcRdoContainer* cont) const
{
// clear FullEventAssembler
m_fea.clear();
// Get the event assembler
FullEventAssembler<TGC_Hid2RESrcID>* fea = nullptr;
ATH_CHECK( m_byteStreamCnvSvc->getFullEventAssembler (fea,
"TgcRdoContByteStream") );
// event assembler
FullEventAssembler<TGC_Hid2RESrcID>::RODDATA * theROD;
......@@ -76,14 +79,11 @@ StatusCode Muon::TgcRdoContByteStreamTool::convert(const TgcRdoContainer* cont,
for(; it_map != it_map_end; ++it_map)
{
// get ROD data address
theROD = m_fea.getRodData((*it_map).first);
theROD = fea->getRodData((*it_map).first);
// fill ROD data
((*it_map).second).fillROD( *theROD ) ;
}
// Finnally, fill full event
m_fea.fill(re,log);
return StatusCode::SUCCESS;
}
/*
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 MUONTGC_CNVTOOLS_TGCRDOCONTRAWEVENTTOOL_H
......@@ -11,6 +11,7 @@
#include "MuonTGC_CnvTools/ITGC_RDOtoByteStreamTool.h"
#include "ByteStreamData/RawEvent.h"
#include "ByteStreamCnvSvc/ByteStreamCnvSvc.h"
#include "TGC_Hid2RESrcID.h"
class TgcRdoContainer;
......@@ -29,8 +30,7 @@ namespace Muon {
*/
class TgcRdoContByteStreamTool :
public AthAlgTool,
virtual public ITGC_RDOtoByteStreamTool
public extends<AthAlgTool, ITGC_RDOtoByteStreamTool>
{
public:
......@@ -41,20 +41,19 @@ namespace Muon {
/** Destructor */
virtual ~TgcRdoContByteStreamTool();
/** AthAlgTool InterfaceID */
static const InterfaceID& interfaceID( ) ;
/** Initializer */
virtual StatusCode initialize();
virtual StatusCode initialize() override;
/** Finalizer */
virtual StatusCode finalize();
virtual StatusCode finalize() override;
/** Convert RDO container to Byte Stream */
StatusCode convert(const TgcRdoContainer* cont, RawEventWrite* re, MsgStream& log);
virtual StatusCode convert(const TgcRdoContainer* cont) const override;
private:
ServiceHandle<ByteStreamCnvSvc> m_byteStreamCnvSvc
{ this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" };
TGC_Hid2RESrcID * m_hid2re;
FullEventAssembler<TGC_Hid2RESrcID> m_fea;
};
} // end of namespace
......
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