ATLAS Offline Software
TGCCablingServerSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
9 
10 #include "GaudiKernel/MsgStream.h"
11 #include "GaudiKernel/ISvcLocator.h"
12 #include "GaudiKernel/StatusCode.h"
13 #include "StoreGate/StoreGateSvc.h"
14 
15 namespace Muon {
16 
17 TGCCablingServerSvc::TGCCablingServerSvc(const std::string& name, ISvcLocator* sl) :
18 AthService(name, sl) {}
19 
20 StatusCode TGCCablingServerSvc::queryInterface(const InterfaceID& riid, void** ppvIF) {
21  if( IID_TGCcablingServerSvc.versionMatch(riid) )
22  {
23  *ppvIF = dynamic_cast<ITGCcablingServerSvc*>(this);
24  } else {
25  ATH_MSG_DEBUG ( name() << " cast to Service Interface" );
26  return AthService::queryInterface(riid, ppvIF);
27  }
28 
29  addRef();
30  return StatusCode::SUCCESS;
31 }
32 
34  ATH_MSG_DEBUG ( "requesting instance of TGCcabling" );
35 
36  cabling = nullptr;
37 
38  if(m_atlas) {
39  ATH_CHECK( service("MuonTGC_CablingSvc",cabling,true) );
40  } else {
41  ATH_CHECK( service("TGCcablingSvc",cabling,true) );
42  }
43 
44  return StatusCode::SUCCESS;
45 }
46 
48  return m_atlas;
49 }
50 
51 }
ITGCcablingSvc
Definition: ITGCcablingSvc.h:31
TGCCablingServerSvc.h
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
Muon::TGCCablingServerSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIF)
Definition: TGCCablingServerSvc.cxx:20
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::TGCCablingServerSvc::m_atlas
BooleanProperty m_atlas
Definition: TGCCablingServerSvc.h:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthService
Definition: AthService.h:32
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
Muon::TGCCablingServerSvc::giveCabling
virtual StatusCode giveCabling(const ITGCcablingSvc *&) const
Definition: TGCCablingServerSvc.cxx:33
ATLAS_CHECK_FILE_THREAD_SAFETY
ATLAS_CHECK_FILE_THREAD_SAFETY
Definition: TGCCablingServerSvc.cxx:6
Muon::TGCCablingServerSvc::TGCCablingServerSvc
TGCCablingServerSvc(const std::string &name, ISvcLocator *svc)
Definition: TGCCablingServerSvc.cxx:17
ITGCcablingServerSvc
Definition: ITGCcablingServerSvc.h:16
checker_macros.h
Define macros for attributes used to control the static checker.
StoreGateSvc.h
Muon::TGCCablingServerSvc::isAtlas
virtual bool isAtlas(void) const
Definition: TGCCablingServerSvc.cxx:47