1
# Author: Christopher Tunnell <tunnell@hep.uchicago.edu>
6
from src.ReadGenericCalibration import *
7
from src.region import *
8
import logging, os, sys
9
from TileCalibBlobPython import TileCalibTools, TileBchTools
10
from TileCalibBlobPython.TileCalibTools import MINRUN, MINLBK, MAXRUN, MAXLBK
11
from TileCalibBlobObjs.Classes import *
13
class CopyLocalChanStat(ReadGenericCalibration):
14
"Make a local copy of the Channel Status DB to tileSqlite.db"
17
def ProcessStart(self):
18
# It would be nice if this wasn't a system call...
20
if os.path.exists('tileSqlite.db'):
21
os.unlink('tileSqlite.db')
23
print "CopyLocalChanStat: Warning: I'm about to do a system call to AtlCoolCopy.exe. This is dangerous, and I should feel ashamed. Check 'db_copy_log' for the output."
25
os.system("""AtlCoolCopy.exe "COOLONL_TILE/COMP200" "sqlite://;schema=tileSqlite.db;dbname=COMP200" -create -copytaglock -t TileOfl01StatusAdc-HLT-UPD1-00 -f /TILE/OFL01/STATUS/ADC 2>&1 1>db_copy_log""")
27
def ProcessRegion(self, region):