ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MdtRdoToPrepDataToolMT::ConvCache Struct Reference

Helper struct to parse the event data around the tool. More...

#include <MdtRdoToPrepDataToolMT.h>

Collaboration diagram for Muon::MdtRdoToPrepDataToolMT::ConvCache:

Public Member Functions

 ConvCache (const Muon::IMuonIdHelperSvc *idHelperSvc)
MdtPrepDataCollectioncreateCollection (const Identifier &id)
 Creates a new MdtPrepDataCollection, if it's neccessary and also possible.
StatusCode finalize (MsgStream &msg)
 Copy the non-empty collections into the created prd container.

Public Attributes

Muon::MdtPrepDataContainerlegacyPrd {nullptr}
const Muon::IMuonIdHelperSvcm_idHelperSvc {nullptr}
const MuonGM::MuonDetectorManagerlegacyDetMgr {nullptr}
 Detector manager from the conditions store.
const TwinTubeMaptwinTubeMap {nullptr}
 Pointer to the map having the mapping of twin tube pairs.
bool isValid {false}
 Flag set to indicate that the complete validation was successful.
std::vector< std::unique_ptr< MdtPrepDataCollection > > addedCols {}

Detailed Description

Helper struct to parse the event data around the tool.

Definition at line 60 of file MdtRdoToPrepDataToolMT.h.

Constructor & Destructor Documentation

◆ ConvCache()

Muon::MdtRdoToPrepDataToolMT::ConvCache::ConvCache ( const Muon::IMuonIdHelperSvc * idHelperSvc)

Definition at line 57 of file MdtRdoToPrepDataToolMT.cxx.

57 :
58 m_idHelperSvc{idHelperSvc} {
59 addedCols.resize(m_idHelperSvc->mdtIdHelper().module_hash_max());
60 }
const Muon::IMuonIdHelperSvc * m_idHelperSvc
std::vector< std::unique_ptr< MdtPrepDataCollection > > addedCols

Member Function Documentation

◆ createCollection()

MdtPrepDataCollection * Muon::MdtRdoToPrepDataToolMT::ConvCache::createCollection ( const Identifier & id)

Creates a new MdtPrepDataCollection, if it's neccessary and also possible.

Nullptr is returned if the collection cannot be modified

Definition at line 62 of file MdtRdoToPrepDataToolMT.cxx.

62 {
63
64 IdentifierHash mdtHashId = m_idHelperSvc->moduleHash(elementId);
65
66 std::unique_ptr<MdtPrepDataCollection>& coll {addedCols[mdtHashId]};
67 if (!coll) {
68 coll = std::make_unique<MdtPrepDataCollection>(mdtHashId);
69 coll->setIdentifier(m_idHelperSvc->chamberId(elementId));
70 }
71 return coll.get();
72 }

◆ finalize()

StatusCode Muon::MdtRdoToPrepDataToolMT::ConvCache::finalize ( MsgStream & msg)

Copy the non-empty collections into the created prd container.

Definition at line 73 of file MdtRdoToPrepDataToolMT.cxx.

73 {
74 for (unsigned int moduleHash =0; moduleHash < addedCols.size(); ++moduleHash) {
75 std::unique_ptr<MdtPrepDataCollection>& toInsert{addedCols[moduleHash]};
76 if (!toInsert || toInsert->empty()) continue;
77 MdtPrepDataContainer::IDC_WriteHandle lock = legacyPrd->getWriteHandle(moduleHash);
78 if (lock.addOrDelete(std::move(toInsert)).isFailure()) {
79 msg << MSG::ERROR << " Failed to add prep data collection " << moduleHash << endmsg;
80 return StatusCode::FAILURE;
81 }
82 }
83 return StatusCode::SUCCESS;
84 }
#define endmsg
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
MsgStream & msg
Definition testRead.cxx:32

Member Data Documentation

◆ addedCols

std::vector<std::unique_ptr<MdtPrepDataCollection> > Muon::MdtRdoToPrepDataToolMT::ConvCache::addedCols {}

Definition at line 79 of file MdtRdoToPrepDataToolMT.h.

79{};

◆ isValid

bool Muon::MdtRdoToPrepDataToolMT::ConvCache::isValid {false}

Flag set to indicate that the complete validation was successful.

Definition at line 78 of file MdtRdoToPrepDataToolMT.h.

78{false};

◆ legacyDetMgr

const MuonGM::MuonDetectorManager* Muon::MdtRdoToPrepDataToolMT::ConvCache::legacyDetMgr {nullptr}

Detector manager from the conditions store.

Definition at line 73 of file MdtRdoToPrepDataToolMT.h.

73{nullptr};

◆ legacyPrd

Muon::MdtPrepDataContainer* Muon::MdtRdoToPrepDataToolMT::ConvCache::legacyPrd {nullptr}

Definition at line 69 of file MdtRdoToPrepDataToolMT.h.

69{nullptr};

◆ m_idHelperSvc

const Muon::IMuonIdHelperSvc* Muon::MdtRdoToPrepDataToolMT::ConvCache::m_idHelperSvc {nullptr}

Definition at line 71 of file MdtRdoToPrepDataToolMT.h.

71{nullptr};

◆ twinTubeMap

const TwinTubeMap* Muon::MdtRdoToPrepDataToolMT::ConvCache::twinTubeMap {nullptr}

Pointer to the map having the mapping of twin tube pairs.

Definition at line 75 of file MdtRdoToPrepDataToolMT.h.

75{nullptr};

The documentation for this struct was generated from the following files: