CMS 3D CMS Logo

Functions | Variables

plotBeamSpotDB Namespace Reference

Functions

def SetStyle

Variables

string acommand = 'cmscond_list_iov -c '
tuple aIOV = IOV()
 atime = ibeam.IOVBeginTime
string Banner = "CMS Preliminary"
list cvlist = []
tuple da = TDatime(time.strftime('%Y-%m-%d %H:%M:%S',ptm))
tuple da_first = TDatime(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(first - time.timezone)))
tuple da_last = TDatime(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(last - time.timezone)))
string datafilename = "tmp_beamspot.dat"
int datax = 0
tuple dataxerr = (float(last) - float(first))
int datay = 0
 datayerr = ibeam.Xerr
list files = tmp[1]
 first = ibeam.IOVfirst
string firstRun = "0"
 getDBdata = True
list graphlist = []
list graphnamelist = ['X','Y','Z','SigmaZ','dxdz','dydz','beamWidthX', 'beamWidthY']
list graphtitlelist = ['beam spot X','beam spot Y','beam spot Z','beam spot #sigma_Z','beam spot dX/dZ','beam spot dY/dZ','beam width X','beam width Y']
string graphXaxis = 'Run number'
list graphYaxis = ['beam spot X [cm]','beam spot Y [cm]','beam spot Z [cm]', 'beam spot #sigma_{Z} [cm]', 'beam spot dX/dZ', 'beam spot dY/dZ','beam width X [cm]', 'beam width Y [cm]']
list ibeam = listbeam[ii]
int iline = 0
tuple input = open(option.data +"/"+f)
string IOVbase = 'runbase'
list iovlist = []
int ipoint = 0
 jline = iline
 last = ibeam.IOVlast
string lastRun = "4999999999"
tuple linedata = line.split()
list listbeam = []
tuple listmap = readBeamSpotFile(datafilename,listbeam,IOVbase,firstRun,lastRun)
string mydestdb = 'frontier://PromptProd/CMS_COND_31X_BEAMSPOT'
 offset_daylight = time.timezone-time.altzone
string otherArgs = ''
tuple output = open(datafilename,"w")
tuple outroot = TFile(option.output,"RECREATE")
 passiov = False
 passline = False
 printBanner = False
 printCanvas = False
string printFormat = "png"
tuple ptm = time.localtime(reftime)
 reftime = first
 print local time
tuple status = commands.getstatusoutput( acommand )
string suffix = ''
 print local time
string tag = ''
tuple tmp = commands.getstatusoutput("ls "+option.data)
tuple tmpfile = open(datafilename,'w')
list tmplistiov = tmpstatus[1]
tuple tmplumi = unpack(iIOV.since)
int tmplumifirst = 1
int tmplumilast = 9999999
tuple tmprun = unpack(iIOV.since)
 tmprunfirst = firstRun
 tmprunlast = lastRun
tuple tmpstatus = commands.getstatusoutput( acommand )
tuple totlines = len(tmplistiov)
 weighted = True;

Function Documentation

def plotBeamSpotDB::SetStyle ( )

Definition at line 68 of file plotBeamSpotDB.py.

00069               :
00070 
00071     # canvas
00072     ROOT.gStyle.SetCanvasBorderMode(0)
00073     ROOT.gStyle.SetCanvasColor(0)
00074     ROOT.gStyle.SetCanvasDefH(600)
00075     ROOT.gStyle.SetCanvasDefW(600)
00076     ROOT.gStyle.SetCanvasDefX(0)
00077     ROOT.gStyle.SetCanvasDefY(0)
00078     # pad
00079     ROOT.gStyle.SetPadBorderMode(0)
00080     ROOT.gStyle.SetPadColor(0)
00081     ROOT.gStyle.SetPadGridX(False)
00082     ROOT.gStyle.SetPadGridY(False)
00083     ROOT.gStyle.SetGridColor(0)
00084     ROOT.gStyle.SetGridStyle(3)
00085     ROOT.gStyle.SetGridWidth(1)
00086                   
00087     ROOT.gStyle.SetFrameBorderMode(0)
00088     ROOT.gStyle.SetFrameFillColor(0)
00089     ROOT.gStyle.SetTitleColor(1)
00090     ROOT.gStyle.SetStatColor(0)
00091 
00092     # set the paper & margin sizes
00093     ROOT.gStyle.SetPaperSize(20,26)
00094     ROOT.gStyle.SetPadTopMargin(0.04)
00095     ROOT.gStyle.SetPadRightMargin(0.04)
00096     ROOT.gStyle.SetPadBottomMargin(0.14)
00097     ROOT.gStyle.SetPadLeftMargin(0.11)
00098     ROOT.gStyle.SetPadTickX(1)
00099     ROOT.gStyle.SetPadTickY(1)
00100 
00101     ROOT.gStyle.SetTextFont(42) #132
00102     ROOT.gStyle.SetTextSize(0.09)
00103     ROOT.gStyle.SetLabelFont(42,"xyz")
00104     ROOT.gStyle.SetTitleFont(42,"xyz")
00105     ROOT.gStyle.SetLabelSize(0.035,"xyz")
00106     ROOT.gStyle.SetTitleSize(0.045,"xyz")
00107     ROOT.gStyle.SetTitleOffset(1.1,"y")
00108 
00109     # use bold lines and markers
00110     ROOT.gStyle.SetMarkerStyle(8)
00111     ROOT.gStyle.SetHistLineWidth(2)
00112     ROOT.gStyle.SetLineWidth(1)
00113     #ROOT.gStyle.SetLineStyleString(2,"[12 12]") // postscript dashes
00114 
00115     ROOT.gStyle.SetMarkerSize(0.6)
00116     
00117     # do not display any of the standard histogram decorations
00118     ROOT.gStyle.SetOptTitle(0)
00119     ROOT.gStyle.SetOptStat(0) #("m")
00120     ROOT.gStyle.SetOptFit(0)
00121     
00122     #ROOT.gStyle.SetPalette(1,0)
00123     ROOT.gStyle.cd()
    ROOT.gROOT.ForceStyle()

Variable Documentation

string plotBeamSpotDB::acommand = 'cmscond_list_iov -c '

Definition at line 187 of file plotBeamSpotDB.py.

Definition at line 204 of file plotBeamSpotDB.py.

plotBeamSpotDB::atime = ibeam.IOVBeginTime

Definition at line 382 of file plotBeamSpotDB.py.

string plotBeamSpotDB::Banner = "CMS Preliminary"

Definition at line 135 of file plotBeamSpotDB.py.

Definition at line 327 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::da = TDatime(time.strftime('%Y-%m-%d %H:%M:%S',ptm))

Definition at line 395 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::da_first = TDatime(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(first - time.timezone)))

Definition at line 386 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::da_last = TDatime(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(last - time.timezone)))

Definition at line 387 of file plotBeamSpotDB.py.

string plotBeamSpotDB::datafilename = "tmp_beamspot.dat"

Definition at line 152 of file plotBeamSpotDB.py.

Definition at line 342 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::dataxerr = (float(last) - float(first))

Definition at line 406 of file plotBeamSpotDB.py.

Definition at line 343 of file plotBeamSpotDB.py.

Definition at line 346 of file plotBeamSpotDB.py.

Definition at line 271 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::first = ibeam.IOVfirst

Definition at line 379 of file plotBeamSpotDB.py.

Definition at line 167 of file plotBeamSpotDB.py.

Definition at line 156 of file plotBeamSpotDB.py.

Definition at line 312 of file plotBeamSpotDB.py.

list plotBeamSpotDB::graphnamelist = ['X','Y','Z','SigmaZ','dxdz','dydz','beamWidthX', 'beamWidthY']

Definition at line 313 of file plotBeamSpotDB.py.

list plotBeamSpotDB::graphtitlelist = ['beam spot X','beam spot Y','beam spot Z','beam spot #sigma_Z','beam spot dX/dZ','beam spot dY/dZ','beam width X','beam width Y']

Definition at line 314 of file plotBeamSpotDB.py.

string plotBeamSpotDB::graphXaxis = 'Run number'

Definition at line 315 of file plotBeamSpotDB.py.

list plotBeamSpotDB::graphYaxis = ['beam spot X [cm]','beam spot Y [cm]','beam spot Z [cm]', 'beam spot #sigma_{Z} [cm]', 'beam spot dX/dZ', 'beam spot dY/dZ','beam width X [cm]', 'beam width Y [cm]']

Definition at line 325 of file plotBeamSpotDB.py.

Definition at line 341 of file plotBeamSpotDB.py.

Definition at line 194 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::input = open(option.data +"/"+f)

Definition at line 276 of file plotBeamSpotDB.py.

Definition at line 160 of file plotBeamSpotDB.py.

Definition at line 192 of file plotBeamSpotDB.py.

Definition at line 200 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::last = ibeam.IOVlast

Definition at line 380 of file plotBeamSpotDB.py.

string plotBeamSpotDB::lastRun = "4999999999"

Definition at line 168 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::linedata = line.split()

Definition at line 202 of file plotBeamSpotDB.py.

Definition at line 287 of file plotBeamSpotDB.py.

Definition at line 290 of file plotBeamSpotDB.py.

plotBeamSpotDB::mydestdb = 'frontier://PromptProd/CMS_COND_31X_BEAMSPOT'

Definition at line 184 of file plotBeamSpotDB.py.

plotBeamSpotDB::offset_daylight = time.timezone-time.altzone

Definition at line 397 of file plotBeamSpotDB.py.

Definition at line 216 of file plotBeamSpotDB.py.

Definition at line 273 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::outroot = TFile(option.output,"RECREATE")

Definition at line 440 of file plotBeamSpotDB.py.

Definition at line 227 of file plotBeamSpotDB.py.

Definition at line 193 of file plotBeamSpotDB.py.

Definition at line 134 of file plotBeamSpotDB.py.

Definition at line 132 of file plotBeamSpotDB.py.

Definition at line 133 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::ptm = time.localtime(reftime)

print local time

print gmt time

Definition at line 393 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::status = commands.getstatusoutput( acommand )

Definition at line 256 of file plotBeamSpotDB.py.

print local time

Definition at line 431 of file plotBeamSpotDB.py.

Definition at line 142 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::tmp = commands.getstatusoutput("ls "+option.data)

Definition at line 270 of file plotBeamSpotDB.py.

Definition at line 224 of file plotBeamSpotDB.py.

Definition at line 189 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::tmplumi = unpack(iIOV.since)

Definition at line 253 of file plotBeamSpotDB.py.

Definition at line 230 of file plotBeamSpotDB.py.

Definition at line 231 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::tmprun = unpack(iIOV.since)

Definition at line 252 of file plotBeamSpotDB.py.

Definition at line 228 of file plotBeamSpotDB.py.

Definition at line 229 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB::tmpstatus = commands.getstatusoutput( acommand )

Definition at line 188 of file plotBeamSpotDB.py.

Definition at line 195 of file plotBeamSpotDB.py.

Definition at line 301 of file plotBeamSpotDB.py.

Referenced by SmsModeFinder3d::operator()().