ATLAS Offline Software
DetDescrDBEnvelopeSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // DetDescrDBEnvelopeSvc.h, (c) ATLAS Detector software
8 #ifndef DETDESCRDBENVELOPESVC_H
9 #define DETDESCRDBENVELOPESVC_H
10 
11 // STL includes
12 #include <string>
13 #include <vector>
14 #include <utility>
15 
16 // GaudiKernel & Athena
18 
19 // interface header file
21 
22 // Database includes
24 
25 // GeoModel
27 
28 
30 typedef std::vector< double > FallbackDoubleVector;
31 
32 
33 class DetDescrDBEnvelopeSvc : public extends<AthService, IEnvelopeDefSvc> {
34 
35  public:
37  DetDescrDBEnvelopeSvc(const std::string& name, ISvcLocator* svc);
38 
41 
46 
49  { return m_rz[region]; }
50 
53  { return m_rposz[region]; }
54 
55  private:
62  RZPairVector &rzVec);
63 
65  StatusCode retrieveRZBoundary( std::string &node, RZPairVector &rzVec);
66 
70  RZPairVector &rzVec);
71 
74  bool enableFallback();
75 
77  ServiceHandle<IRDBAccessSvc> m_dbAccess{this, "RDBAccessSvc", "RDBAccessSvc"};
78 
80  ServiceHandle<IGeoModelSvc> m_geoModelSvc{this, "GeoModelSvc", "GeoModelSvc"};
81 
83  std::string m_atlasNode;
84  std::string m_atlasVersionTag;
85 
88 
94 
100 };
101 
102 #endif // DETDESCRDBENVELOPESVC_H
103 
DetDescrDBEnvelopeSvc::m_fallbackZ
FallbackDoubleVector m_fallbackZ[AtlasDetDescr::fNumAtlasRegions]
Definition: DetDescrDBEnvelopeSvc.h:99
AtlasDetDescr::fNumAtlasRegions
@ fNumAtlasRegions
Definition: AtlasRegion.h:39
beamspotman.r
def r
Definition: beamspotman.py:676
IEnvelopeDefSvc.h
RZPairVector
std::vector< RZPair > RZPairVector
Definition: RZPair.h:18
AtlasDetDescr::AtlasRegion
AtlasRegion
Definition: AtlasRegion.h:27
DetDescrDBEnvelopeSvc::m_doFallback
bool m_doFallback
Definition: DetDescrDBEnvelopeSvc.h:97
DetDescrDBEnvelopeSvc::DetDescrDBEnvelopeSvc
DetDescrDBEnvelopeSvc(const std::string &name, ISvcLocator *svc)
public AthService constructor
Definition: DetDescrDBEnvelopeSvc.cxx:31
DetDescrDBEnvelopeSvc::m_allowFallback
bool m_allowFallback
fallback solution, in case something goes wrong with the DB
Definition: DetDescrDBEnvelopeSvc.h:96
DetDescrDBEnvelopeSvc::finalize
StatusCode finalize()
AthService finalize method.
Definition: DetDescrDBEnvelopeSvc.cxx:173
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
z
#define z
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DetDescrDBEnvelopeSvc::m_atlasNode
std::string m_atlasNode
main DDDB node for the ATLAS detector
Definition: DetDescrDBEnvelopeSvc.h:83
DetDescrDBEnvelopeSvc::getRZBoundary
const RZPairVector & getRZBoundary(AtlasDetDescr::AtlasRegion region) const
return a vector of (r,z) pairs, defining the respective envelope
Definition: DetDescrDBEnvelopeSvc.h:48
DetDescrDBEnvelopeSvc::fallbackRZBoundary
StatusCode fallbackRZBoundary(FallbackDoubleVector &r, FallbackDoubleVector &z, RZPairVector &rzVec)
use the fallback approach (python arguments) to set the (r,z) values
Definition: DetDescrDBEnvelopeSvc.cxx:269
DetDescrDBEnvelopeSvc::initialize
StatusCode initialize()
AthService initialize method.
Definition: DetDescrDBEnvelopeSvc.cxx:91
FallbackDoubleVector
std::vector< double > FallbackDoubleVector
datatype used for fallback solution
Definition: DetDescrDBEnvelopeSvc.h:30
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DetDescrDBEnvelopeSvc::retrieveRZBoundaryOptionalFallback
StatusCode retrieveRZBoundaryOptionalFallback(std::string &dbNode, FallbackDoubleVector &r, FallbackDoubleVector &z, RZPairVector &rzVec)
retrieve and store the (r,z) values locally for the given DB node.
Definition: DetDescrDBEnvelopeSvc.cxx:181
DetDescrDBEnvelopeSvc::m_geoModelSvc
ServiceHandle< IGeoModelSvc > m_geoModelSvc
ATLAS GeoModel.
Definition: DetDescrDBEnvelopeSvc.h:80
DetDescrDBEnvelopeSvc::m_node
std::string m_node[AtlasDetDescr::fNumAtlasRegions]
the names of the DB nodes for the respective AtlasRegion
Definition: DetDescrDBEnvelopeSvc.h:87
DetDescrDBEnvelopeSvc::m_atlasVersionTag
std::string m_atlasVersionTag
Definition: DetDescrDBEnvelopeSvc.h:84
DetDescrDBEnvelopeSvc::m_rz
RZPairVector m_rz[AtlasDetDescr::fNumAtlasRegions]
internal (r,z) representation, one RZPairVector for each AtlasRegion
Definition: DetDescrDBEnvelopeSvc.h:90
DetDescrDBEnvelopeSvc::retrieveRZBoundary
StatusCode retrieveRZBoundary(std::string &node, RZPairVector &rzVec)
retrieve and store the (r,z) values locally for the given DB node
Definition: DetDescrDBEnvelopeSvc.cxx:211
DetDescrDBEnvelopeSvc::m_fallbackR
FallbackDoubleVector m_fallbackR[AtlasDetDescr::fNumAtlasRegions]
Definition: DetDescrDBEnvelopeSvc.h:98
AthService.h
DetDescrDBEnvelopeSvc::getRPositiveZBoundary
const RZPairVector & getRPositiveZBoundary(AtlasDetDescr::AtlasRegion region) const
return a vector of (r,z) pairs, defining the envelope on the z>0 region
Definition: DetDescrDBEnvelopeSvc.h:52
DetDescrDBEnvelopeSvc::m_dbAccess
ServiceHandle< IRDBAccessSvc > m_dbAccess
the DetectorDescription database access method
Definition: DetDescrDBEnvelopeSvc.h:77
DetDescrDBEnvelopeSvc
Definition: DetDescrDBEnvelopeSvc.h:33
IGeoModelSvc.h
DetDescrDBEnvelopeSvc::m_rposz
RZPairVector m_rposz[AtlasDetDescr::fNumAtlasRegions]
internal (r,z) representation for the positive z-side only, one RZPairVector for each AtlasRegion
Definition: DetDescrDBEnvelopeSvc.h:93
node
Definition: memory_hooks-stdcmalloc.h:74
DetDescrDBEnvelopeSvc::~DetDescrDBEnvelopeSvc
~DetDescrDBEnvelopeSvc()
Destructor.
Definition: DetDescrDBEnvelopeSvc.cxx:65
ServiceHandle< IRDBAccessSvc >
DetDescrDBEnvelopeSvc::enableFallback
bool enableFallback()
enable fallback solution:
Definition: DetDescrDBEnvelopeSvc.cxx:73