ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
CoolConvUtilities
python
AtlCoolSchemaLib.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3
# AtlCoolSchema.py defines the COOL schema in use in ATLAS production databases
4
# Richard Hawkings 09/9/07
5
# stripped down version for sw release - no write cn or AtlCoolCopy information
6
7
class
coolSchema
:
8
"Definition of a COOL schema"
9
def
__init__
(self,schema,instance,extra=0):
10
"""initialise from a schema ('ATLAS_COOLONL_INDET')
11
and instance ('OFLP200')"""
12
x1=schema.index(
'_'
)
13
x2=schema.index(
'_'
,x1+1)
14
self.
_schema
=schema
15
self.
_logic
=schema[x1+1:]
16
self.
_detector
=schema[x2+1:]
17
self.
_instance
=instance
18
self.
_extra
=extra
19
20
def
schema
(self):
21
"Return full database schema name"
22
return
self.
_schema
23
24
def
logical
(self):
25
"Return logical (readonly) connection name"
26
return
self.
_logic
+
'/'
+self.
_instance
27
28
def
instance
(self):
29
"Return database instance name"
30
return
self.
_instance
31
32
def
detector
(self):
33
"Return detector name"
34
return
self.
_detector
35
36
def
offline
(self):
37
"Returns true if the connection is to an offline DB"
38
return
(self.
_schema
.
find
(
'ONL'
)<0)
39
40
41
def
instanceList
(instanceSel="",schemaSel=""):
42
"Define all instances in use, optionally only selected instances/schemas"
43
ilist=[]
44
# list of all the active databases
45
if
(instanceSel==
'OFLP200'
or
instanceSel==
''
):
46
addSchema
(ilist,
'ATLAS_COOLOFL_INDET'
,
'OFLP200'
,schemaSel)
47
addSchema
(ilist,
'ATLAS_COOLONL_INDET'
,
'OFLP200'
,schemaSel)
48
addSchema
(ilist,
'ATLAS_COOLOFL_PIXEL'
,
'OFLP200'
,schemaSel)
49
addSchema
(ilist,
'ATLAS_COOLONL_PIXEL'
,
'OFLP200'
,schemaSel)
50
addSchema
(ilist,
'ATLAS_COOLOFL_SCT'
,
'OFLP200'
,schemaSel)
51
addSchema
(ilist,
'ATLAS_COOLONL_SCT'
,
'OFLP200'
,schemaSel)
52
addSchema
(ilist,
'ATLAS_COOLOFL_TRT'
,
'OFLP200'
,schemaSel)
53
addSchema
(ilist,
'ATLAS_COOLONL_TRT'
,
'OFLP200'
,schemaSel)
54
addSchema
(ilist,
'ATLAS_COOLOFL_LAR'
,
'OFLP200'
,schemaSel)
55
addSchema
(ilist,
'ATLAS_COOLONL_LAR'
,
'OFLP200'
,schemaSel)
56
addSchema
(ilist,
'ATLAS_COOLOFL_TILE'
,
'OFLP200'
,schemaSel)
57
addSchema
(ilist,
'ATLAS_COOLONL_TILE'
,
'OFLP200'
,schemaSel)
58
addSchema
(ilist,
'ATLAS_COOLOFL_CALO'
,
'OFLP200'
,schemaSel)
59
addSchema
(ilist,
'ATLAS_COOLONL_CALO'
,
'OFLP200'
,schemaSel)
60
addSchema
(ilist,
'ATLAS_COOLOFL_MDT'
,
'OFLP200'
,schemaSel)
61
addSchema
(ilist,
'ATLAS_COOLONL_MDT'
,
'OFLP200'
,schemaSel)
62
addSchema
(ilist,
'ATLAS_COOLOFL_MUONALIGN'
,
'OFLP200'
,schemaSel,2)
63
addSchema
(ilist,
'ATLAS_COOLONL_MUONALIGN'
,
'OFLP200'
,schemaSel,2)
64
addSchema
(ilist,
'ATLAS_COOLOFL_CSC'
,
'OFLP200'
,schemaSel)
65
addSchema
(ilist,
'ATLAS_COOLONL_CSC'
,
'OFLP200'
,schemaSel)
66
addSchema
(ilist,
'ATLAS_COOLONL_TRIGGER'
,
'OFLP200'
,schemaSel,1)
67
addSchema
(ilist,
'ATLAS_COOLOFL_RPC'
,
'OFLP200'
,schemaSel)
68
addSchema
(ilist,
'ATLAS_COOLOFL_TGC'
,
'OFLP200'
,schemaSel)
69
addSchema
(ilist,
'ATLAS_COOLONL_GLOBAL'
,
'OFLP200'
,schemaSel)
70
addSchema
(ilist,
'ATLAS_COOLOFL_GLOBAL'
,
'OFLP200'
,schemaSel)
71
addSchema
(ilist,
'ATLAS_COOLOFL_DCS'
,
'OFLP200'
,schemaSel)
72
if
(instanceSel==
'COMP200'
or
instanceSel==
''
):
73
addSchema
(ilist,
'ATLAS_COOLOFL_INDET'
,
'COMP200'
,schemaSel)
74
addSchema
(ilist,
'ATLAS_COOLONL_INDET'
,
'COMP200'
,schemaSel)
75
addSchema
(ilist,
'ATLAS_COOLOFL_PIXEL'
,
'COMP200'
,schemaSel)
76
addSchema
(ilist,
'ATLAS_COOLONL_PIXEL'
,
'COMP200'
,schemaSel)
77
addSchema
(ilist,
'ATLAS_COOLOFL_SCT'
,
'COMP200'
,schemaSel)
78
addSchema
(ilist,
'ATLAS_COOLONL_SCT'
,
'COMP200'
,schemaSel)
79
addSchema
(ilist,
'ATLAS_COOLOFL_TRT'
,
'COMP200'
,schemaSel)
80
addSchema
(ilist,
'ATLAS_COOLONL_TRT'
,
'COMP200'
,schemaSel)
81
addSchema
(ilist,
'ATLAS_COOLOFL_LAR'
,
'COMP200'
,schemaSel)
82
addSchema
(ilist,
'ATLAS_COOLONL_LAR'
,
'COMP200'
,schemaSel)
83
addSchema
(ilist,
'ATLAS_COOLOFL_TILE'
,
'COMP200'
,schemaSel)
84
addSchema
(ilist,
'ATLAS_COOLONL_TILE'
,
'COMP200'
,schemaSel)
85
addSchema
(ilist,
'ATLAS_COOLOFL_CALO'
,
'COMP200'
,schemaSel)
86
addSchema
(ilist,
'ATLAS_COOLONL_CALO'
,
'COMP200'
,schemaSel)
87
addSchema
(ilist,
'ATLAS_COOLOFL_MDT'
,
'COMP200'
,schemaSel)
88
addSchema
(ilist,
'ATLAS_COOLONL_MDT'
,
'COMP200'
,schemaSel)
89
addSchema
(ilist,
'ATLAS_COOLOFL_MUONALIGN'
,
'COMP200'
,schemaSel)
90
addSchema
(ilist,
'ATLAS_COOLONL_MUONALIGN'
,
'COMP200'
,schemaSel)
91
addSchema
(ilist,
'ATLAS_COOLONL_TDAQ'
,
'COMP200'
,schemaSel,1)
92
addSchema
(ilist,
'ATLAS_COOLONL_TRIGGER'
,
'COMP200'
,schemaSel,3)
93
addSchema
(ilist,
'ATLAS_COOLOFL_TRIGGER'
,
'COMP200'
,schemaSel,3)
94
addSchema
(ilist,
'ATLAS_COOLOFL_CSC'
,
'COMP200'
,schemaSel)
95
addSchema
(ilist,
'ATLAS_COOLONL_CSC'
,
'COMP200'
,schemaSel)
96
addSchema
(ilist,
'ATLAS_COOLONL_RPC'
,
'COMP200'
,schemaSel)
97
addSchema
(ilist,
'ATLAS_COOLOFL_RPC'
,
'COMP200'
,schemaSel)
98
addSchema
(ilist,
'ATLAS_COOLONL_TGC'
,
'COMP200'
,schemaSel)
99
addSchema
(ilist,
'ATLAS_COOLOFL_GLOBAL'
,
'COMP200'
,schemaSel)
100
addSchema
(ilist,
'ATLAS_COOLONL_GLOBAL'
,
'COMP200'
,schemaSel)
101
addSchema
(ilist,
'ATLAS_COOLOFL_DCS'
,
'COMP200'
,schemaSel,3)
102
addSchema
(ilist,
'ATLAS_COOLONL_FWD'
,
'COMP200'
,schemaSel)
103
if
(instanceSel==
'CONDBR2'
or
instanceSel==
''
):
104
addSchema
(ilist,
'ATLAS_COOLOFL_INDET'
,
'CONDBR2'
,schemaSel)
105
addSchema
(ilist,
'ATLAS_COOLONL_INDET'
,
'CONDBR2'
,schemaSel)
106
addSchema
(ilist,
'ATLAS_COOLOFL_PIXEL'
,
'CONDBR2'
,schemaSel)
107
addSchema
(ilist,
'ATLAS_COOLONL_PIXEL'
,
'CONDBR2'
,schemaSel)
108
addSchema
(ilist,
'ATLAS_COOLOFL_SCT'
,
'CONDBR2'
,schemaSel)
109
addSchema
(ilist,
'ATLAS_COOLONL_SCT'
,
'CONDBR2'
,schemaSel)
110
addSchema
(ilist,
'ATLAS_COOLOFL_TRT'
,
'CONDBR2'
,schemaSel)
111
addSchema
(ilist,
'ATLAS_COOLONL_TRT'
,
'CONDBR2'
,schemaSel)
112
addSchema
(ilist,
'ATLAS_COOLOFL_LAR'
,
'CONDBR2'
,schemaSel)
113
addSchema
(ilist,
'ATLAS_COOLONL_LAR'
,
'CONDBR2'
,schemaSel)
114
addSchema
(ilist,
'ATLAS_COOLOFL_TILE'
,
'CONDBR2'
,schemaSel)
115
addSchema
(ilist,
'ATLAS_COOLONL_TILE'
,
'CONDBR2'
,schemaSel)
116
addSchema
(ilist,
'ATLAS_COOLOFL_CALO'
,
'CONDBR2'
,schemaSel)
117
addSchema
(ilist,
'ATLAS_COOLONL_CALO'
,
'CONDBR2'
,schemaSel)
118
addSchema
(ilist,
'ATLAS_COOLOFL_MDT'
,
'CONDBR2'
,schemaSel)
119
addSchema
(ilist,
'ATLAS_COOLONL_MDT'
,
'CONDBR2'
,schemaSel)
120
addSchema
(ilist,
'ATLAS_COOLOFL_MUONALIGN'
,
'CONDBR2'
,schemaSel)
121
addSchema
(ilist,
'ATLAS_COOLONL_MUONALIGN'
,
'CONDBR2'
,schemaSel)
122
addSchema
(ilist,
'ATLAS_COOLONL_TDAQ'
,
'CONDBR2'
,schemaSel,1)
123
addSchema
(ilist,
'ATLAS_COOLONL_TRIGGER'
,
'CONDBR2'
,schemaSel,3)
124
addSchema
(ilist,
'ATLAS_COOLOFL_TRIGGER'
,
'CONDBR2'
,schemaSel,3)
125
addSchema
(ilist,
'ATLAS_COOLOFL_CSC'
,
'CONDBR2'
,schemaSel)
126
addSchema
(ilist,
'ATLAS_COOLONL_CSC'
,
'CONDBR2'
,schemaSel)
127
addSchema
(ilist,
'ATLAS_COOLONL_RPC'
,
'CONDBR2'
,schemaSel)
128
addSchema
(ilist,
'ATLAS_COOLOFL_RPC'
,
'CONDBR2'
,schemaSel)
129
addSchema
(ilist,
'ATLAS_COOLONL_TGC'
,
'CONDBR2'
,schemaSel)
130
addSchema
(ilist,
'ATLAS_COOLOFL_GLOBAL'
,
'CONDBR2'
,schemaSel)
131
addSchema
(ilist,
'ATLAS_COOLONL_GLOBAL'
,
'CONDBR2'
,schemaSel)
132
addSchema
(ilist,
'ATLAS_COOLOFL_DCS'
,
'CONDBR2'
,schemaSel,3)
133
addSchema
(ilist,
'ATLAS_COOLONL_FWD'
,
'CONDBR2'
,schemaSel)
134
if
(instanceSel==
'CMCP200'
or
instanceSel==
''
):
135
addSchema
(ilist,
'ATLAS_COOLONL_INDET'
,
'CMCP200'
,schemaSel)
136
addSchema
(ilist,
'ATLAS_COOLONL_PIXEL'
,
'CMCP200'
,schemaSel)
137
addSchema
(ilist,
'ATLAS_COOLONL_SCT'
,
'CMCP200'
,schemaSel)
138
addSchema
(ilist,
'ATLAS_COOLONL_TRT'
,
'CMCP200'
,schemaSel)
139
addSchema
(ilist,
'ATLAS_COOLONL_LAR'
,
'CMCP200'
,schemaSel)
140
addSchema
(ilist,
'ATLAS_COOLONL_TILE'
,
'CMCP200'
,schemaSel)
141
addSchema
(ilist,
'ATLAS_COOLONL_CALO'
,
'CMCP200'
,schemaSel)
142
addSchema
(ilist,
'ATLAS_COOLONL_CSC'
,
'CMCP200'
,schemaSel)
143
addSchema
(ilist,
'ATLAS_COOLONL_GLOBAL'
,
'CMCP200'
,schemaSel)
144
if
(instanceSel==
'TMCP200'
or
instanceSel==
''
):
145
addSchema
(ilist,
'ATLAS_COOLONL_LAR'
,
'TMCP200'
,schemaSel)
146
addSchema
(ilist,
'ATLAS_COOLONL_CALO'
,
'TMCP200'
,schemaSel)
147
return
ilist
148
149
def
addSchema
(ilist,schema,instance,schemaSel,extra=0):
150
if
(schemaSel==
''
or
schema.find(schemaSel)>=0):
151
ilist+=[
coolSchema
(schema,instance,extra)]
instance
std::map< std::string, double > instance
Definition
Run_To_Get_Tags.h:8
python.AtlCoolSchemaLib.coolSchema
Definition
AtlCoolSchemaLib.py:7
python.AtlCoolSchemaLib.coolSchema.logical
logical(self)
Definition
AtlCoolSchemaLib.py:24
python.AtlCoolSchemaLib.coolSchema._instance
_instance
Definition
AtlCoolSchemaLib.py:17
python.AtlCoolSchemaLib.coolSchema.__init__
__init__(self, schema, instance, extra=0)
Definition
AtlCoolSchemaLib.py:9
python.AtlCoolSchemaLib.coolSchema.detector
detector(self)
Definition
AtlCoolSchemaLib.py:32
python.AtlCoolSchemaLib.coolSchema._detector
_detector
Definition
AtlCoolSchemaLib.py:16
python.AtlCoolSchemaLib.coolSchema._logic
_logic
Definition
AtlCoolSchemaLib.py:15
python.AtlCoolSchemaLib.coolSchema._schema
_schema
Definition
AtlCoolSchemaLib.py:14
python.AtlCoolSchemaLib.coolSchema.schema
schema(self)
Definition
AtlCoolSchemaLib.py:20
python.AtlCoolSchemaLib.coolSchema._extra
_extra
Definition
AtlCoolSchemaLib.py:18
find
std::string find(const std::string &s)
return a remapped string
Definition
hcg.cxx:140
offline
python.AtlCoolSchemaLib.addSchema
addSchema(ilist, schema, instance, schemaSel, extra=0)
Definition
AtlCoolSchemaLib.py:149
python.AtlCoolSchemaLib.instanceList
instanceList(instanceSel="", schemaSel="")
Definition
AtlCoolSchemaLib.py:41
Generated on
for ATLAS Offline Software by
1.17.0