ATLAS Offline Software
TileCalibBlobPython_writeDefaultCs.py
Go to the documentation of this file.
1 #!/bin/env python
2 
3 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4 #
5 # TileCalibBlobPython_writeDefaults.py
6 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26
7 # change Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
8 
9 from TileCalibBlobPython import TileCalibTools, TileCalibDefaultWriter
10 
11 # choose if we want to write defaults for simulation or for real data
12 Simulation = True
13 
14 #=== open database
15 if Simulation:
16  db = TileCalibTools.openDb('SQLITE', 'OFLP200', 'UPDATE')
17  #tag = "SIM-02"
18  #MBTSflag="900GeV"
19  #tag = "SIM-03"
20  #MBTSflag="7TeV"
21  #tag = "SIM-04"
22  #MBTSflag="8TeV"
23  tag = "SIM-05"
24  #tag = "RUN2-00"
25  MBTSflag="13TeV"
26  run=222222
27 else:
28  db = TileCalibTools.openDb('SQLITE', 'CONDBR2', 'UPDATE')
29  tag = "RUN2-HLT-UPD1-01"
30  MBTSflag="none"
31  run=0
32 
33 #=== create default writer
34 defaultWriter = TileCalibDefaultWriter.TileCalibDefaultWriter(db)
35 
36 #=== increase TileCalibTools log level
37 import logging
38 defaultWriter.setLogLvl(logging.DEBUG)
39 
40 #=== write Cesium defaults Simulation=True - for simulation, False - for real data
41 defaultWriter.writeCes(tag, Simulation, MBTSflag, 1.2, 1.5, (run,0))
42 
43 #=== close the database connection
44 db.closeDatabase()