Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Sherwood
athena
Commits
0c6beb69
Commit
0c6beb69
authored
4 years ago
by
scott snyder
Browse files
Options
Downloads
Patches
Plain Diff
TrackingGeometryCondAlg: python 3 fixes
Fixes for python 3 compatibility.
parent
bf898282
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py
+11
-8
11 additions, 8 deletions
...ingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py
with
11 additions
and
8 deletions
Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py
+
11
−
8
View file @
0c6beb69
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
# condSeq+= TrkGeoCondAlg
# condSeq+= TrkGeoCondAlg
#
#
##################################################################################
##################################################################################
from
__future__
import
print_function
# import the DetFlags for the setting
# import the DetFlags for the setting
from
AthenaCommon.DetFlags
import
DetFlags
from
AthenaCommon.DetFlags
import
DetFlags
...
@@ -112,7 +115,7 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
...
@@ -112,7 +115,7 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
AtlasMaterialTag
=
TrkDetFlags
.
MaterialTagBase
()
+
str
(
TrkDetFlags
.
MaterialVersion
())
+
TrkDetFlags
.
MaterialSubVersion
()
+
'
_
'
AtlasMaterialTag
=
TrkDetFlags
.
MaterialTagBase
()
+
str
(
TrkDetFlags
.
MaterialVersion
())
+
TrkDetFlags
.
MaterialSubVersion
()
+
'
_
'
if
TrkDetFlags
.
ConfigurationOutputLevel
()
<
3
:
if
TrkDetFlags
.
ConfigurationOutputLevel
()
<
3
:
print
'
[ TrackingGeometryCondAlg ] Associating DB folder :
'
,
CoolDataBaseFolder
print
(
'
[ TrackingGeometryCondAlg ] Associating DB folder :
'
,
CoolDataBaseFolder
)
# we need the conditions interface
# we need the conditions interface
from
IOVDbSvc.CondDB
import
conddb
from
IOVDbSvc.CondDB
import
conddb
...
@@ -126,7 +129,7 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
...
@@ -126,7 +129,7 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
conddb
.
blockFolder
(
'
/GLOBAL/TrackingGeo/LayerMaterialV2
'
)
conddb
.
blockFolder
(
'
/GLOBAL/TrackingGeo/LayerMaterialV2
'
)
conddb
.
addFolderWithTag
(
''
,
DataBaseConnection
+
CoolDataBaseFolder
,
AtlasMaterialTag
+
MagicTag
,
force
=
True
)
conddb
.
addFolderWithTag
(
''
,
DataBaseConnection
+
CoolDataBaseFolder
,
AtlasMaterialTag
+
MagicTag
,
force
=
True
)
if
TrkDetFlags
.
ConfigurationOutputLevel
()
<
3
:
if
TrkDetFlags
.
ConfigurationOutputLevel
()
<
3
:
print
'
[ TrackingGeometryCondAlg ] Using Local Database:
'
+
DataBaseConnection
print
(
'
[ TrackingGeometryCondAlg ] Using Local Database:
'
+
DataBaseConnection
)
# make sure that the pool files are in the catalog
# make sure that the pool files are in the catalog
elif
TrkDetFlags
.
SLHC_Geometry
()
:
elif
TrkDetFlags
.
SLHC_Geometry
()
:
# set the folder to the SLHC location
# set the folder to the SLHC location
...
@@ -135,9 +138,9 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
...
@@ -135,9 +138,9 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
cfoldertag
=
CoolDataBaseFolder
+
'
<tag>
'
+
ctag
+
'
</tag>
'
cfoldertag
=
CoolDataBaseFolder
+
'
<tag>
'
+
ctag
+
'
</tag>
'
conddb
.
addFolderSplitMC
(
'
GLOBAL
'
,
cfoldertag
,
cfoldertag
)
conddb
.
addFolderSplitMC
(
'
GLOBAL
'
,
cfoldertag
,
cfoldertag
)
else
:
else
:
print
'
[ TrackingGeometryCondAlg ] base material tag :
'
,
AtlasMaterialTag
print
(
'
[ TrackingGeometryCondAlg ] base material tag :
'
,
AtlasMaterialTag
)
cfolder
=
CoolDataBaseFolder
+
'
<tag>TagInfoMajor/
'
+
AtlasMaterialTag
+
'
/GeoAtlas</tag>
'
cfolder
=
CoolDataBaseFolder
+
'
<tag>TagInfoMajor/
'
+
AtlasMaterialTag
+
'
/GeoAtlas</tag>
'
print
'
[ TrackingGeometryCondAlg ] translated to COOL:
'
,
cfolder
print
(
'
[ TrackingGeometryCondAlg ] translated to COOL:
'
,
cfolder
)
# load the right folders (preparation for calo inclusion)
# load the right folders (preparation for calo inclusion)
conddb
.
addFolderSplitMC
(
'
GLOBAL
'
,
cfolder
,
cfolder
)
conddb
.
addFolderSplitMC
(
'
GLOBAL
'
,
cfolder
,
cfolder
)
...
@@ -165,10 +168,10 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
...
@@ -165,10 +168,10 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
# screen output of the configuration
# screen output of the configuration
if
TrkDetFlags
.
ConfigurationOutputLevel
()
<
3
:
if
TrkDetFlags
.
ConfigurationOutputLevel
()
<
3
:
print
self
print
(
self
)
print
'
* [ GeometryBuilder ]
'
print
(
'
* [ GeometryBuilder ]
'
)
print
AtlasGeometryBuilder
print
(
AtlasGeometryBuilder
)
print
'
* [ Configuration : end ] ***
'
+
name
+
'
********************************
'
print
(
'
* [ Configuration : end ] ***
'
+
name
+
'
********************************
'
)
##################################################################################
##################################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment