ATLAS Offline Software
Loading...
Searching...
No Matches
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
30typedef std::vector< double > FallbackDoubleVector;
31
32
33class DetDescrDBEnvelopeSvc : public extends<AthService, IEnvelopeDefSvc> {
34
35 public:
37 DetDescrDBEnvelopeSvc(const std::string& name, ISvcLocator* svc);
38
41
43 StatusCode initialize();
45 StatusCode finalize();
46
49 { return m_rz[region]; }
50
53 { return m_rposz[region]; }
54
55 private:
59 StatusCode retrieveRZBoundaryOptionalFallback( std::string &dbNode,
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
std::vector< double > FallbackDoubleVector
datatype used for fallback solution
Definition of the abstract IRDBAccessSvc interface.
std::vector< RZPair > RZPairVector
Definition RZPair.h:18
#define z
bool enableFallback()
enable fallback solution:
DetDescrDBEnvelopeSvc(const std::string &name, ISvcLocator *svc)
public AthService constructor
ServiceHandle< IGeoModelSvc > m_geoModelSvc
ATLAS GeoModel.
StatusCode fallbackRZBoundary(FallbackDoubleVector &r, FallbackDoubleVector &z, RZPairVector &rzVec)
use the fallback approach (python arguments) to set the (r,z) values
const RZPairVector & getRPositiveZBoundary(AtlasDetDescr::AtlasRegion region) const
return a vector of (r,z) pairs, defining the envelope on the z>0 region
StatusCode finalize()
AthService finalize method.
StatusCode retrieveRZBoundaryOptionalFallback(std::string &dbNode, FallbackDoubleVector &r, FallbackDoubleVector &z, RZPairVector &rzVec)
retrieve and store the (r,z) values locally for the given DB node.
bool m_allowFallback
fallback solution, in case something goes wrong with the DB
StatusCode initialize()
AthService initialize method.
std::string m_node[AtlasDetDescr::fNumAtlasRegions]
the names of the DB nodes for the respective AtlasRegion
FallbackDoubleVector m_fallbackR[AtlasDetDescr::fNumAtlasRegions]
ServiceHandle< IRDBAccessSvc > m_dbAccess
the DetectorDescription database access method
RZPairVector m_rposz[AtlasDetDescr::fNumAtlasRegions]
internal (r,z) representation for the positive z-side only, one RZPairVector for each AtlasRegion
const RZPairVector & getRZBoundary(AtlasDetDescr::AtlasRegion region) const
return a vector of (r,z) pairs, defining the respective envelope
StatusCode retrieveRZBoundary(std::string &node, RZPairVector &rzVec)
retrieve and store the (r,z) values locally for the given DB node
std::string m_atlasNode
main DDDB node for the ATLAS detector
FallbackDoubleVector m_fallbackZ[AtlasDetDescr::fNumAtlasRegions]
RZPairVector m_rz[AtlasDetDescr::fNumAtlasRegions]
internal (r,z) representation, one RZPairVector for each AtlasRegion
Definition node.h:24
int r
Definition globals.cxx:22
AtlasRegion
A simple enum of ATLAS regions and sub-detectors.
Definition AtlasRegion.h:21