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

Merge branch 'master-migrate-JiveXML' into 'master'

MuonJiveXML, JiveXML: Update packages to use DataHandles, and generally cleanup

See merge request atlas/athena!49660
parents 9ed52b4b dc9b4d57
No related branches found
No related tags found
No related merge requests found
Showing
with 95 additions and 169 deletions
......@@ -16,6 +16,5 @@ atlas_add_component( MuonJiveXML
LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps MuonRPC_CnvToolsLib MuonReadoutGeometry JiveXMLLib GaudiKernel MuonIdHelpersLib MuonRDO MuonPrepRawData AnalysisTriggerEvent RPC_CondCablingLib)
# Install files from the package:
atlas_install_headers( MuonJiveXML )
atlas_install_joboptions( share/*.py )
......@@ -2,8 +2,8 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/CSCClusterRetriever.h"
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "CSCClusterRetriever.h"
#include "MuonFullIDHelper.h"
namespace JiveXML {
......
......@@ -2,34 +2,31 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/CscPrepDataRetriever.h"
#include "CscPrepDataRetriever.h"
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "MuonFullIDHelper.h"
#include "MuonReadoutGeometry/CscReadoutElement.h"
#include "MuonPrepRawData/MuonPrepDataContainer.h"
namespace JiveXML {
//--------------------------------------------------------------------------
CscPrepDataRetriever::CscPrepDataRetriever(const std::string& type, const std::string& name, const IInterface* parent):
AthAlgTool(type,name,parent),
m_typeName("CSCD")
AthAlgTool(type,name,parent)
{
declareInterface<IDataRetriever>(this);
declareProperty("StoreGateKey", m_sgKey = "CSC_Clusters", "name of the CscPrepDataContainer");
}
//--------------------------------------------------------------------------
StatusCode CscPrepDataRetriever::initialize(){
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_CHECK(m_sgKey.initialize());
ATH_CHECK( m_idHelperSvc.retrieve() );
return StatusCode::SUCCESS;
}
......@@ -38,13 +35,10 @@ namespace JiveXML {
StatusCode CscPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
//be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName());
ATH_MSG_VERBOSE("Retrieving " << dataTypeName());
SG::ReadHandle<Muon::CscPrepDataContainer> cscContainer(m_sgKey);
const Muon::CscPrepDataContainer *cscContainer=nullptr;
if ( evtStore()->retrieve(cscContainer, m_sgKey).isFailure() ) {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::CscPrepDataContainer '" << m_sgKey << "' was not retrieved.");
return StatusCode::SUCCESS;
}
int ndata = 0;
Muon::CscPrepDataContainer::const_iterator containerIt;
......@@ -73,7 +67,7 @@ namespace JiveXML {
Identifier id = data->identify();
if (!element) {
if (msgLvl(MSG::WARNING)) ATH_MSG_WARNING("No MuonGM::CscReadoutElement for hit " << id);
ATH_MSG_WARNING("No MuonGM::CscReadoutElement for hit " << id);
continue;
}
......@@ -103,14 +97,14 @@ namespace JiveXML {
myDataMap["barcode"] = barcode;
//Be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
//forward data to formating tool
//return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
//// Atlantis can't deal with SGkey in xml output in CSCD (freezes)
//// So not output SGKey for now. jpt 20Aug09
std::string emptyStr="";
return FormatTool->AddToEvent(dataTypeName(), emptyStr, &myDataMap);
return FormatTool->AddToEvent(dataTypeName(), m_sgKey.key(), &myDataMap);
}
//--------------------------------------------------------------------------
......
......@@ -11,6 +11,7 @@
#include "GaudiKernel/ToolHandle.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
#include "MuonPrepRawData/CscPrepDataContainer.h"
#include <string>
......@@ -26,17 +27,14 @@ namespace JiveXML {
virtual StatusCode retrieve(ToolHandle<IFormatTool> &FormatTool);
/// Return the name of the data type
virtual std::string dataTypeName() const { return m_typeName; };
virtual std::string dataTypeName() const { return "CSCD"; };
///Default AthAlgTool methods
virtual StatusCode initialize();
private:
///The data type that is generated by this retriever
const std::string m_typeName;
///The storegate key for the CSC collection
std::string m_sgKey;
SG::ReadHandleKey<Muon::CscPrepDataContainer> m_sgKey{this, "StoreGateKey", "CSC_Clusters", "Name of the CscPrepDataContainer"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
......
......@@ -2,9 +2,9 @@
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/MMPrepDataRetriever.h"
#include "MMPrepDataRetriever.h"
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "MuonFullIDHelper.h"
#include "MuonReadoutGeometry/MMReadoutElement.h"
#include "MuonPrepRawData/MuonPrepDataContainer.h"
#include "MuonReadoutGeometry/MuonChannelDesign.h"
......@@ -18,13 +18,11 @@ namespace JiveXML {
//--------------------------------------------------------------------------
MMPrepDataRetriever::MMPrepDataRetriever(const std::string& type,const std::string& name, const IInterface* parent):
AthAlgTool(type, name, parent),
m_typeName("MM")
AthAlgTool(type, name, parent)
{
declareInterface<IDataRetriever>(this);
declareProperty("StoreGateKey", m_sgKey = "MM_Measurements", "Storegate key for MM PredData container");
}
//--------------------------------------------------------------------------
......@@ -32,6 +30,7 @@ namespace JiveXML {
StatusCode MMPrepDataRetriever::initialize(){
ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_CHECK(m_sgKey.initialize());
ATH_CHECK( m_idHelperSvc.retrieve() );
......@@ -43,13 +42,9 @@ namespace JiveXML {
StatusCode MMPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
//be verbose
ATH_MSG_DEBUG("Retrieving " << dataTypeName());
ATH_MSG_VERBOSE("Retrieving " << dataTypeName());
const Muon::MMPrepDataContainer *mmContainer=nullptr;
if ( evtStore()->retrieve(mmContainer, m_sgKey).isFailure() ) {
ATH_MSG_DEBUG("Muon::MMPrepDataContainer '" << m_sgKey << "' was not retrieved.");
return StatusCode::SUCCESS;
}
SG::ReadHandle<Muon::MMPrepDataContainer> mmContainer(m_sgKey);
int ndata = 0;
for (const auto mmCollection : *mmContainer){
......@@ -113,6 +108,6 @@ namespace JiveXML {
// Atlantis can't deal with SGkey in xml output in CSCD (freezes)
// So not output SGKey for now. jpt 20Aug09
std::string emptyStr="";
return FormatTool->AddToEvent(dataTypeName(), emptyStr, &myDataMap);
return FormatTool->AddToEvent(dataTypeName(), m_sgKey.key(), &myDataMap);
}
}
......@@ -12,6 +12,7 @@
#include "GaudiKernel/ToolHandle.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
#include "MuonPrepRawData/MMPrepDataContainer.h"
#include <string>
......@@ -28,18 +29,15 @@ namespace JiveXML {
virtual StatusCode retrieve(ToolHandle<IFormatTool> &FormatTool);
/// Return the name of the data type
virtual std::string dataTypeName() const { return m_typeName; };
virtual std::string dataTypeName() const { return "MM"; };
///Default AthAlgTool methods
StatusCode initialize();
private:
///The data type that is generated by this retriever
const std::string m_typeName;
///The storegate key for the MM collection
std::string m_sgKey;
SG::ReadHandleKey<Muon::MMPrepDataContainer> m_sgKey{this, "StoreGateKey", "MM_Measurements", "Name of the MMPrepDataContainer"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
......
......@@ -2,24 +2,21 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/MdtPrepDataRetriever.h"
#include "MdtPrepDataRetriever.h"
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "MuonFullIDHelper.h"
#include "MuonReadoutGeometry/MdtReadoutElement.h"
#include "MuonPrepRawData/MuonPrepDataContainer.h"
namespace JiveXML {
//--------------------------------------------------------------------------
MdtPrepDataRetriever::MdtPrepDataRetriever(const std::string& type, const std::string& name, const IInterface* parent):
AthAlgTool(type, name, parent),
m_typeName("MDT")
AthAlgTool(type, name, parent)
{
declareInterface<IDataRetriever>(this);
declareProperty("StoreGateKey", m_sgKey = "MDT_DriftCircles", "Storegate key for MDT PredData container");
declareProperty("AdcCut", m_adcCut = 50, " Some ADC threshold cut");
declareProperty("ObeyMasked", m_obeyMasked = true, " Use info about masked channels");
}
......@@ -28,8 +25,8 @@ namespace JiveXML {
StatusCode MdtPrepDataRetriever::initialize(){
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_CHECK(m_sgKey.initialize());
ATH_CHECK( m_idHelperSvc.retrieve() );
return StatusCode::SUCCESS;
......@@ -40,13 +37,10 @@ namespace JiveXML {
StatusCode MdtPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
//be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName());
ATH_MSG_VERBOSE("Retrieving " << dataTypeName());
SG::ReadHandle<Muon::MdtPrepDataContainer> mdtContainer(m_sgKey);
const Muon::MdtPrepDataContainer *mdtContainer=nullptr;
if ( evtStore()->retrieve(mdtContainer, m_sgKey).isFailure() ) {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::MdtPrepDataContainer '" << m_sgKey << "' was not retrieved.");
return StatusCode::SUCCESS;
}
int ndata = 0;
Muon::MdtPrepDataContainer::const_iterator containerIt;
......@@ -77,7 +71,7 @@ namespace JiveXML {
Identifier id = data->identify();
if (!element) {
if (msgLvl(MSG::WARNING)) ATH_MSG_WARNING("No MuonGM::MdtReadoutElement for hit " << id);
ATH_MSG_WARNING("No MuonGM::MdtReadoutElement for hit " << id);
continue;
}
......@@ -106,10 +100,10 @@ namespace JiveXML {
barcode.push_back(DataType(0));
}
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(" MdtPrepData x, y, z, driftR, lenght " << globalPos.x() << " "
ATH_MSG_DEBUG(" MdtPrepData x, y, z, driftR, lenght " << globalPos.x() << " "
<< globalPos.y() << " " << globalPos.z() << " " << localPos[Trk::driftRadius]
<< " " << tubeLength << " adc: " << adcCount);
if ( notMasked ){ if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(" *notMasked* "); }
if ( notMasked ){ ATH_MSG_DEBUG(" *notMasked* "); }
}
}
......@@ -124,14 +118,14 @@ namespace JiveXML {
myDataMap["barcode"] = barcode;
//Be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
//forward data to formating tool
//return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
//// Atlantis problem with track-hits/MDT association when SGKey is set,
//// so not output SGKey for now. jpt 20Jul12
std::string emptyStr="";
return FormatTool->AddToEvent(dataTypeName(), emptyStr, &myDataMap);
return FormatTool->AddToEvent(dataTypeName(), m_sgKey.key(), &myDataMap);
}
//--------------------------------------------------------------------------
......
......@@ -11,6 +11,7 @@
#include "GaudiKernel/ToolHandle.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
#include "MuonPrepRawData/MdtPrepDataContainer.h"
#include <string>
......@@ -27,18 +28,15 @@ namespace JiveXML {
virtual StatusCode retrieve(ToolHandle<IFormatTool> &FormatTool);
/// Return the name of the data type
virtual std::string dataTypeName() const { return m_typeName; };
virtual std::string dataTypeName() const { return "MDT"; };
///Default AthAlgTool methods
StatusCode initialize();
private:
///The data type that is generated by this retriever
const std::string m_typeName;
///The storegate key for the MDT collection
std::string m_sgKey;
SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_sgKey{this, "StoreGateKey", "MDT_DriftCircles", "Name of the MdtPrepDataContainer"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
......
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "MuonFullIDHelper.h"
#include "MuonIdHelpers/MdtIdHelper.h"
#include "MuonIdHelpers/RpcIdHelper.h"
......
......@@ -2,11 +2,10 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/RpcPrepDataRetriever.h"
#include "RpcPrepDataRetriever.h"
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "MuonFullIDHelper.h"
#include "MuonReadoutGeometry/RpcReadoutElement.h"
#include "MuonPrepRawData/MuonPrepDataContainer.h"
namespace JiveXML {
......@@ -18,16 +17,15 @@ namespace JiveXML {
{
declareInterface<IDataRetriever>(this);
declareProperty("StoreGateKey", m_sgKey = "RPC_Measurements", "Storegate key for RPC PredData container");
}
//--------------------------------------------------------------------------
StatusCode RpcPrepDataRetriever::initialize(){
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_CHECK(m_sgKey.initialize());
ATH_CHECK( m_idHelperSvc.retrieve() );
return StatusCode::SUCCESS;
......@@ -38,13 +36,9 @@ namespace JiveXML {
StatusCode RpcPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
//be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName());
ATH_MSG_DEBUG("Retrieving " << dataTypeName());
const Muon::RpcPrepDataContainer *rpcContainer=nullptr;
if ( evtStore()->retrieve(rpcContainer, m_sgKey).isFailure() ) {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::RpcPrepDataContainer '" << m_sgKey << "' was not retrieved.");
return StatusCode::SUCCESS;
}
SG::ReadHandle<Muon::RpcPrepDataContainer> rpcContainer(m_sgKey);
int ndata = 0;
Muon::RpcPrepDataContainer::const_iterator containerIt;
......@@ -104,9 +98,9 @@ namespace JiveXML {
myDataMap["barcode"] = barcode;
//Be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
//forward data to formating tool
return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
return FormatTool->AddToEvent(dataTypeName(), m_sgKey.key(), &myDataMap);
}
}
......@@ -12,6 +12,7 @@
#include "GaudiKernel/ToolHandle.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
#include "MuonPrepRawData/RpcPrepDataContainer.h"
#include <string>
......@@ -39,7 +40,7 @@ namespace JiveXML {
const std::string m_typeName;
///The storegate key for the RPC collection
std::string m_sgKey;
SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_sgKey{this, "StoreGateKey", "RPC_Measurements", "Name of the RpcPrepDataContainer"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
......
......@@ -2,32 +2,28 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/TgcPrepDataRetriever.h"
#include "TgcPrepDataRetriever.h"
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "MuonFullIDHelper.h"
#include "MuonReadoutGeometry/TgcReadoutElement.h"
#include "MuonPrepRawData/MuonPrepDataContainer.h"
namespace JiveXML {
//--------------------------------------------------------------------------
TgcPrepDataRetriever::TgcPrepDataRetriever(const std::string& type,const std::string& name, const IInterface* parent):
AthAlgTool(type, name, parent),
m_typeName("TGC")
AthAlgTool(type, name, parent)
{
declareInterface<IDataRetriever>(this);
declareProperty("StoreGateKey", m_sgKey = "TGC_Measurements", "Storegate key for TGC PredData container");
declareInterface<IDataRetriever>(this);
}
//--------------------------------------------------------------------------
StatusCode TgcPrepDataRetriever::initialize(){
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName());
ATH_CHECK(m_sgKey.initialize());
ATH_CHECK( m_idHelperSvc.retrieve() );
return StatusCode::SUCCESS;
......@@ -38,13 +34,9 @@ namespace JiveXML {
StatusCode TgcPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
//be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName());
ATH_MSG_DEBUG("Retrieving " << dataTypeName());
const Muon::TgcPrepDataContainer *tgcContainer=nullptr;
if ( evtStore()->retrieve(tgcContainer, m_sgKey).isFailure() ) {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::TgcPrepDataContainer '" << m_sgKey << "' was not retrieved.");
return StatusCode::SUCCESS;
}
SG::ReadHandle<Muon::TgcPrepDataContainer> tgcContainer(m_sgKey);
int ndata = 0;
Muon::TgcPrepDataContainer::const_iterator containerIt;
......@@ -120,13 +112,13 @@ namespace JiveXML {
myDataMap["barcode"] = barcode;
//Be verbose
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
////forward data to formating tool
//return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
//// Atlantis can't deal with SGkey in xml output in CSCD (freezes)
//// So not output SGKey for now. jpt 20Aug09
std::string emptyStr="";
return FormatTool->AddToEvent(dataTypeName(), emptyStr, &myDataMap);
return FormatTool->AddToEvent(dataTypeName(), m_sgKey.key(), &myDataMap);
}
}
......@@ -12,6 +12,7 @@
#include "GaudiKernel/ToolHandle.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
#include "MuonPrepRawData/MuonPrepDataContainer.h"
#include <string>
......@@ -28,18 +29,16 @@ namespace JiveXML {
virtual StatusCode retrieve(ToolHandle<IFormatTool> &FormatTool);
/// Return the name of the data type
virtual std::string dataTypeName() const { return m_typeName; };
virtual std::string dataTypeName() const { return "TGC"; };
///Default AthAlgTool methods
StatusCode initialize();
private:
///The data type that is generated by this retriever
const std::string m_typeName;
///The storegate key for the TGC collection
std::string m_sgKey;
SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_sgKey{this, "StoreGateKey", "TGC_Measurements", "Name of the MMPrepDataContainer"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
......
......@@ -2,27 +2,22 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/TrigMuonROIRetriever.h"
#include "TrigMuonROIRetriever.h"
#include <string>
#include "CLHEP/Units/SystemOfUnits.h"
#include "AnalysisTriggerEvent/LVL1_ROI.h"
namespace JiveXML {
//--------------------------------------------------------------------------
TrigMuonROIRetriever::TrigMuonROIRetriever(const std::string& type, const std::string& name, const IInterface* parent):
AthAlgTool(type, name, parent),
m_typeName("TrigMuonROI")
AthAlgTool(type, name, parent)
{
declareInterface<IDataRetriever>(this);
declareProperty("StoreGateKey", m_sgKey = "LVL1_ROI", "Storegate key for LVL1 Muon RoIs");
}
//--------------------------------------------------------------------------
......@@ -32,13 +27,7 @@ namespace JiveXML {
//be verbose
if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieving " << dataTypeName() << endmsg;
const LVL1_ROI * roi;
if ( evtStore()->retrieve(roi,m_sgKey).isFailure() ) {
if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "No MuonROI (LVL1_ROI) found." << endmsg;
return StatusCode::SUCCESS;
}
SG::ReadHandle<LVL1_ROI> roi(m_sgKey);
int nRoIs = roi->getMuonROIs().size();
......@@ -88,6 +77,6 @@ namespace JiveXML {
if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << ": "<< phi.size() << endmsg;
//forward data to formating tool
return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
return FormatTool->AddToEvent(dataTypeName(), m_sgKey.key(), &myDataMap);
}
}
......@@ -10,6 +10,7 @@
#include "JiveXML/IDataRetriever.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "AnalysisTriggerEvent/LVL1_ROI.h"
namespace JiveXML{
......@@ -25,15 +26,11 @@ namespace JiveXML{
virtual StatusCode retrieve(ToolHandle<IFormatTool> &FormatTool);
/// Return the name of the data type
virtual std::string dataTypeName() const { return m_typeName; };
virtual std::string dataTypeName() const { return "TrigMuonROI"; };
private:
///The data type that is generated by this retriever
const std::string m_typeName;
///The storegate key for the LVL1 Muon RoIs
std::string m_sgKey;
SG::ReadHandleKey<LVL1_ROI> m_sgKey{this, "StoreGateKey", "LVL1_ROI", "Storegate key for LVL1 Muon RoIs"};
};
}
......
......@@ -2,12 +2,11 @@
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonJiveXML/TrigRpcDataRetriever.h"
#include "TrigRpcDataRetriever.h"
#include "MuonJiveXML/MuonFullIDHelper.h"
#include "MuonFullIDHelper.h"
#include "MuonReadoutGeometry/RpcReadoutElement.h"
#include "MuonPrepRawData/MuonPrepDataContainer.h"
#include "MuonRDO/RpcPadContainer.h"
#include <vector>
#include <list>
......@@ -41,32 +40,11 @@ namespace JiveXML {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName());
// retrieve the collection of RDO
const RpcPadContainer* rdoContainer;
if ( evtStore()->retrieve( rdoContainer, m_sgKey).isFailure() ) {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::RpcPadContainer '" << m_sgKey << "' was not retrieved.");
return StatusCode::SUCCESS;
}
else{
if (msgLvl(MSG::DEBUG)) {
ATH_MSG_DEBUG("Muon::RpcPadContainer retrieved");
ATH_MSG_DEBUG(rdoContainer->size() << " RPC RDO collections.");
}
}
const DataHandle<RpcPad> firstRdoColl;
const DataHandle<RpcPad> lastRdoColl;
if ( evtStore()->retrieve(firstRdoColl,lastRdoColl).isFailure() ) {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("RpcPad collections not found");
return StatusCode::SUCCESS;
}
else{
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("RpcPad collections retrieved");
}
SG::ReadHandle<RpcPadContainer> rdoContainer(m_sgKey);
int ndata=0;
const DataHandle<RpcPad>& rdoColl(firstRdoColl);
for (; rdoColl!=lastRdoColl; ++rdoColl){
ndata+= rdoColl->size();
for (auto containerIt=rdoContainer->begin(); containerIt!=rdoContainer->end(); ++containerIt) {
ndata += (*containerIt)->size();
}
//Make the vectors to contain the information and reserve space accordingly
......@@ -95,8 +73,7 @@ namespace JiveXML {
SG::ReadCondHandle<RpcCablingCondData> readHandle{m_rpcCab, Gaudi::Hive::currentContext()};
const RpcCablingCondData* rpcCabling{*readHandle};
const DataHandle<RpcPad>& itColl(firstRdoColl);
for (; itColl!=lastRdoColl; ++itColl){
for (auto itColl=rdoContainer->begin(); itColl!=rdoContainer->end(); ++itColl) {
if ( itColl->size() == 0 ) continue;
ipad++;
......@@ -244,6 +221,6 @@ namespace JiveXML {
if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
//forward data to formating tool
return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
return FormatTool->AddToEvent(dataTypeName(), m_sgKey.key(), &myDataMap);
}
}
......@@ -16,6 +16,7 @@
#include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h"
#include "RPC_CondCabling/RpcCablingCondData.h"
#include "MuonIdHelpers/IMuonIdHelperSvc.h"
#include "MuonRDO/RpcPadContainer.h"
#include <string>
......@@ -42,7 +43,7 @@ namespace JiveXML {
///The data type that is generated by this retriever
const std::string m_typeName;
Gaudi::Property<std::string> m_sgKey{this,"StoreGateKey","RPCPAD","StoreGate key for the RPC RDO container"};
SG::ReadHandleKey<RpcPadContainer> m_sgKey{this, "StoreGateKey", "RPCPAD", "StoreGate key for the RPC RDO container"};
ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
......
#include "MuonJiveXML/CSCClusterRetriever.h"
#include "MuonJiveXML/TgcPrepDataRetriever.h"
#include "MuonJiveXML/CscPrepDataRetriever.h"
#include "MuonJiveXML/MdtPrepDataRetriever.h"
#include "MuonJiveXML/RpcPrepDataRetriever.h"
//#include "MuonJiveXML/MuidTrackRetriever.h"
#include "MuonJiveXML/TrigRpcDataRetriever.h"
#include "MuonJiveXML/TrigMuonROIRetriever.h"
#include "MuonJiveXML/sTgcPrepDataRetriever.h"
#include "MuonJiveXML/MMPrepDataRetriever.h"
#include "../CSCClusterRetriever.h"
#include "../TgcPrepDataRetriever.h"
#include "../CscPrepDataRetriever.h"
#include "../MdtPrepDataRetriever.h"
#include "../RpcPrepDataRetriever.h"
//#include "MuidTrackRetriever.h"
#include "../TrigRpcDataRetriever.h"
#include "../TrigMuonROIRetriever.h"
#include "../sTgcPrepDataRetriever.h"
#include "../MMPrepDataRetriever.h"
using namespace JiveXML;
......
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