~vpec/maus/tof_calib_read

« back to all changes in this revision

Viewing changes to workers/DQ/.svn/text-base/CopyLocalChanStat.py.svn-base

  • Committer: tunnell
  • Date: 2010-09-20 10:52:02 UTC
  • Revision ID: tunnell@itchy-20100920105202-ce4w9jm59zvgnsxq
moving stuff from tucs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Author: Christopher Tunnell <tunnell@hep.uchicago.edu>
 
2
#
 
3
# March 04, 2009
 
4
#
 
5
 
 
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 *
 
12
 
 
13
class CopyLocalChanStat(ReadGenericCalibration):
 
14
    "Make a local copy of the Channel Status DB to tileSqlite.db"
 
15
 
 
16
                                
 
17
    def ProcessStart(self):
 
18
        # It would be nice if this wasn't a system call...
 
19
        
 
20
        if os.path.exists('tileSqlite.db'):
 
21
            os.unlink('tileSqlite.db')
 
22
 
 
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."
 
24
        
 
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""")
 
26
 
 
27
    def ProcessRegion(self, region):
 
28
        pass