ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetExample
InDetBeamSpotExample
www
WebPlots.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3
"""
4
ATLAS beam spot server for pre-made web plots (e.g. weekly beam spot history).
5
"""
6
7
__author__ =
'Juerg Beringer'
8
__version__ =
'WebPlots.py atlas/athena'
9
10
from
BeamSpotWebPage
import
BeamSpotWebPage
11
12
import
sys, os, time
13
14
errorPage =
"""\
15
<div class="errormsg">
16
We're sorry - this plot (%s) is currently not available.
17
</div>
18
"""
19
20
page =
"""
21
<div class="boldtext">
22
Last updated: %s
23
</div>
24
<img id="webplot" src="/webplots/%s">
25
"""
26
27
class
WebPlots
(
BeamSpotWebPage
):
28
29
def
__init__
(self):
30
BeamSpotWebPage.__init__(self)
31
self.
pageConfig
[
'pageTitle'
] =
'ATLAS Beam Spot Overview'
32
33
def
content
(self,**args):
34
plotName = args.get(
'plot'
,
'summary-weekly.gif'
)
35
webPlotDir = self.
globalConfig
[
'webPlotDir'
]
36
filePath = os.path.join(webPlotDir,plotName)
37
if
not
os.path.exists(filePath):
38
return
errorPage % plotName
39
lastUpdate = time.ctime(os.path.getctime(filePath))
40
return
page % (lastUpdate,plotName)
BeamSpotWebPage.BeamSpotWebPage
Definition
BeamSpotWebPage.py:47
WebPage.WebPage.globalConfig
globalConfig
Definition
WebPage.py:290
WebPage.WebPage.pageConfig
dict pageConfig
Definition
WebPage.py:273
WebPlots.WebPlots
Definition
WebPlots.py:27
WebPlots.WebPlots.content
content(self, **args)
Definition
WebPlots.py:33
WebPlots.WebPlots.__init__
__init__(self)
Definition
WebPlots.py:29
Generated on
for ATLAS Offline Software by
1.17.0