ATLAS Offline Software
Namespaces | Macros | Typedefs | Functions
MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx File Reference
#include "MuonReadoutGeometryR4/MuonDetectorManager.h"
#include "MuonReadoutGeometryR4/MdtReadoutElement.h"
#include "MuonReadoutGeometryR4/TgcReadoutElement.h"
#include "MuonReadoutGeometryR4/RpcReadoutElement.h"
#include "MuonReadoutGeometryR4/sTgcReadoutElement.h"
#include "MuonReadoutGeometryR4/MmReadoutElement.h"
#include "MuonReadoutGeometryR4/SpectrometerSector.h"
#include "AthenaBaseComps/AthCheckMacros.h"
#include <limits>
Include dependency graph for MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:

Go to the source code of this file.

Namespaces

 MuonGMR4
 The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy MuonReadoutGeometry.
 

Macros

#define WRITE_SETTER(ELE_TYPE, SETTER, STORAGE_VEC)
 
#define ADD_DETECTOR(ELE_TYPE, STORAGE_VEC)
 
#define WRITE_ALLGETTER(TYPE)
 

Typedefs

using MuonGMR4::MuonSectorSet = MuonDetectorManager::MuonSectorSet
 
using MuonGMR4::MuonChamberSet = MuonDetectorManager::MuonChamberSet
 

Functions

 MuonGMR4::ADD_DETECTOR (MdtReadoutElement, m_mdtEles)
 
 MuonGMR4::ADD_DETECTOR (TgcReadoutElement, m_tgcEles)
 
 MuonGMR4::ADD_DETECTOR (RpcReadoutElement, m_rpcEles)
 
 MuonGMR4::ADD_DETECTOR (MmReadoutElement, m_mmEles)
 
 MuonGMR4::ADD_DETECTOR (sTgcReadoutElement, m_sTgcEles)
 

Macro Definition Documentation

◆ ADD_DETECTOR

#define ADD_DETECTOR (   ELE_TYPE,
  STORAGE_VEC 
)
Value:
WRITE_SETTER(ELE_TYPE, add##ELE_TYPE, STORAGE_VEC) \
\
std::vector<const ELE_TYPE*> MuonDetectorManager::getAll##ELE_TYPE##s() const { \
std::vector<const ELE_TYPE*> allElements{}; \
insert(STORAGE_VEC, allElements); \
return allElements; \
} \
\
std::vector<ELE_TYPE*> MuonDetectorManager::getAll##ELE_TYPE##s() { \
std::vector<ELE_TYPE*> allElements{}; \
insert(STORAGE_VEC, allElements); \
return allElements; \
}

Definition at line 61 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx.

◆ WRITE_ALLGETTER

#define WRITE_ALLGETTER (   TYPE)
Value:
std::vector<TYPE MuonReadoutElement*> MuonDetectorManager::getAllReadoutElements() TYPE { \
std::vector<TYPE MuonReadoutElement*> allEles{}; \
insert(getAllMdtReadoutElements(), allEles); \
insert(getAllRpcReadoutElements(), allEles); \
insert(getAllTgcReadoutElements(), allEles); \
insert(getAllMmReadoutElements(), allEles); \
insert(getAllsTgcReadoutElements(), allEles); \
return allEles; \
} \
TYPE MuonReadoutElement* MuonDetectorManager::getReadoutElement(const Identifier& id) TYPE { \
if (m_idHelperSvc->isMdt(id)) return getMdtReadoutElement(id); \
else if (m_idHelperSvc->isRpc(id)) return getRpcReadoutElement(id); \
else if (m_idHelperSvc->isTgc(id)) return getTgcReadoutElement(id); \
else if (m_idHelperSvc->issTgc(id)) return getsTgcReadoutElement(id); \
else if (m_idHelperSvc->isMM(id)) return getMmReadoutElement(id); \
ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Not a muon detector element " \
<<m_idHelperSvc->toString(id)); \
return nullptr; \
}

Definition at line 75 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx.

◆ WRITE_SETTER

#define WRITE_SETTER (   ELE_TYPE,
  SETTER,
  STORAGE_VEC 
)
Value:
StatusCode MuonDetectorManager::SETTER(ElementPtr<ELE_TYPE> element) { \
if (!element) { \
ATH_MSG_FATAL(__func__ << " -- nullptr is given."); \
return StatusCode::FAILURE; \
} \
ATH_CHECK(element->initElement()); \
element->releaseUnAlignedTrfs(); \
size_t idx = static_cast<unsigned int>(element->identHash()); \
if (idx >= STORAGE_VEC.size()) \
STORAGE_VEC.resize(idx + 1); \
std::unique_ptr<ELE_TYPE>& new_element = STORAGE_VEC[idx]; \
if (new_element) { \
ATH_MSG_FATAL("The detector element " \
<< m_idHelperSvc->toStringDetEl(element->identify()) \
<< " has already been added before " \
<<m_idHelperSvc->toStringDetEl(new_element->identify())); \
return StatusCode::FAILURE; \
} \
linkElements(STORAGE_VEC, element.get()); \
new_element = std::move(element); \
return StatusCode::SUCCESS; \
}

Definition at line 38 of file MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx.

python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
WRITE_SETTER
#define WRITE_SETTER(ELE_TYPE, SETTER, STORAGE_VEC)
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/src/MuonDetectorManager.cxx:37
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
TYPE
#define TYPE(CODE, TYP, IOTYP)
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
Identifier
Definition: IdentifierFieldParser.cxx:14