CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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))
 Comment out this block if running on Mac ##. More...
 
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 More...
 
tuple status = subprocess.getstatusoutput( acommand )
 
string suffix = ''
 print local time More...
 
string tag = ''
 
tuple tmp = subprocess.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 = subprocess.getstatusoutput( acommand )
 
tuple totlines = len(tmplistiov)
 
 weighted = True;
 

Function Documentation

def plotBeamSpotDB.SetStyle ( )

Definition at line 70 of file plotBeamSpotDB.py.

70 
71 def SetStyle():
72 
73  # canvas
74  ROOT.gStyle.SetCanvasBorderMode(0)
75  ROOT.gStyle.SetCanvasColor(0)
76  ROOT.gStyle.SetCanvasDefH(600)
77  ROOT.gStyle.SetCanvasDefW(600)
78  ROOT.gStyle.SetCanvasDefX(0)
79  ROOT.gStyle.SetCanvasDefY(0)
80  # pad
81  ROOT.gStyle.SetPadBorderMode(0)
82  ROOT.gStyle.SetPadColor(0)
83  ROOT.gStyle.SetPadGridX(False)
84  ROOT.gStyle.SetPadGridY(False)
85  ROOT.gStyle.SetGridColor(0)
86  ROOT.gStyle.SetGridStyle(3)
87  ROOT.gStyle.SetGridWidth(1)
88 
89  ROOT.gStyle.SetFrameBorderMode(0)
90  ROOT.gStyle.SetFrameFillColor(0)
91  ROOT.gStyle.SetTitleColor(1)
92  ROOT.gStyle.SetStatColor(0)
93 
94  # set the paper & margin sizes
95  ROOT.gStyle.SetPaperSize(20,26)
96  ROOT.gStyle.SetPadTopMargin(0.04)
97  ROOT.gStyle.SetPadRightMargin(0.04)
98  ROOT.gStyle.SetPadBottomMargin(0.14)
99  ROOT.gStyle.SetPadLeftMargin(0.11)
100  ROOT.gStyle.SetPadTickX(1)
101  ROOT.gStyle.SetPadTickY(1)
102 
103  ROOT.gStyle.SetTextFont(42) #132
104  ROOT.gStyle.SetTextSize(0.09)
105  ROOT.gStyle.SetLabelFont(42,"xyz")
106  ROOT.gStyle.SetTitleFont(42,"xyz")
107  ROOT.gStyle.SetLabelSize(0.035,"xyz")
108  ROOT.gStyle.SetTitleSize(0.045,"xyz")
109  ROOT.gStyle.SetTitleOffset(1.1,"y")
110 
111  # use bold lines and markers
112  ROOT.gStyle.SetMarkerStyle(8)
113  ROOT.gStyle.SetHistLineWidth(2)
114  ROOT.gStyle.SetLineWidth(1)
115  #ROOT.gStyle.SetLineStyleString(2,"[12 12]") // postscript dashes
116 
117  ROOT.gStyle.SetMarkerSize(0.6)
118 
119  # do not display any of the standard histogram decorations
120  ROOT.gStyle.SetOptTitle(0)
121  ROOT.gStyle.SetOptStat(0) #("m")
122  ROOT.gStyle.SetOptFit(0)
123 
124  #ROOT.gStyle.SetPalette(1,0)
125  ROOT.gStyle.cd()
ROOT.gROOT.ForceStyle()

Variable Documentation

string plotBeamSpotDB.acommand = 'cmscond_list_iov -c '

Definition at line 189 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.aIOV = IOV()

Definition at line 206 of file plotBeamSpotDB.py.

plotBeamSpotDB.atime = ibeam.IOVBeginTime

Definition at line 384 of file plotBeamSpotDB.py.

string plotBeamSpotDB.Banner = "CMS Preliminary"

Definition at line 137 of file plotBeamSpotDB.py.

list plotBeamSpotDB.cvlist = []

Definition at line 329 of file plotBeamSpotDB.py.

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

Definition at line 397 of file plotBeamSpotDB.py.

Referenced by FakeBeamMonitor.bookHistograms(), BeamMonitor.bookHistograms(), BeamMonitorBx.BookTrendHistos(), EcalDumpRaw.decode(), TEveEllipsoidProjectedGL.DrawRhoZ(), Fit_MaximumPoint(), heppy::RochCor.momcor_data(), heppy::RochCor2012.momcor_data(), heppy::RochCor.momcor_mc(), heppy::RochCor2012.momcor_mc(), FakeBeamMonitor.scrollTH1(), and BeamMonitor.scrollTH1().

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

Definition at line 388 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 389 of file plotBeamSpotDB.py.

string plotBeamSpotDB.datafilename = "tmp_beamspot.dat"

Definition at line 154 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.datax = 0

Definition at line 344 of file plotBeamSpotDB.py.

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

Comment out this block if running on Mac ##.

Definition at line 408 of file plotBeamSpotDB.py.

plotBeamSpotDB.datay = 0

Definition at line 345 of file plotBeamSpotDB.py.

plotBeamSpotDB.datayerr = ibeam.Xerr

Definition at line 348 of file plotBeamSpotDB.py.

list plotBeamSpotDB.files = tmp[1]

Definition at line 273 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.first = ibeam.IOVfirst

Definition at line 381 of file plotBeamSpotDB.py.

string plotBeamSpotDB.firstRun = "0"

Definition at line 169 of file plotBeamSpotDB.py.

plotBeamSpotDB.getDBdata = True

Definition at line 158 of file plotBeamSpotDB.py.

list plotBeamSpotDB.graphlist = []

Definition at line 314 of file plotBeamSpotDB.py.

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

Definition at line 315 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 316 of file plotBeamSpotDB.py.

string plotBeamSpotDB.graphXaxis = 'Run number'

Definition at line 317 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 327 of file plotBeamSpotDB.py.

list plotBeamSpotDB.ibeam = listbeam[ii]

Definition at line 343 of file plotBeamSpotDB.py.

int plotBeamSpotDB.iline = 0

Definition at line 196 of file plotBeamSpotDB.py.

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

Definition at line 278 of file plotBeamSpotDB.py.

plotBeamSpotDB.IOVbase = 'runbase'

Definition at line 162 of file plotBeamSpotDB.py.

list plotBeamSpotDB.iovlist = []

Definition at line 194 of file plotBeamSpotDB.py.

int plotBeamSpotDB.ipoint = 0

Definition at line 340 of file plotBeamSpotDB.py.

Referenced by SiPixelCalibDigi.fill(), SiPixelCalibDigi.getnentries(), SiPixelCalibDigi.getsum(), SiPixelCalibDigi.getsumsquares(), ColinearityKinematicConstraintT< Dim >.init(), GeometryComparisonPlotter.MakePlots(), LowPtGsfElectronSCProducer.produce(), and CalibrationScanAlgorithm.tuneIndependently().

plotBeamSpotDB.jline = iline

Definition at line 202 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.last = ibeam.IOVlast

Definition at line 382 of file plotBeamSpotDB.py.

string plotBeamSpotDB.lastRun = "4999999999"

Definition at line 170 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.linedata = line.split()

Definition at line 204 of file plotBeamSpotDB.py.

list plotBeamSpotDB.listbeam = []

Definition at line 289 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.listmap = readBeamSpotFile(datafilename,listbeam,IOVbase,firstRun,lastRun)

Definition at line 292 of file plotBeamSpotDB.py.

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

Definition at line 186 of file plotBeamSpotDB.py.

plotBeamSpotDB.offset_daylight = time.timezone-time.altzone

Definition at line 399 of file plotBeamSpotDB.py.

string plotBeamSpotDB.otherArgs = ''

Definition at line 218 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.output = open(datafilename,"w")

Definition at line 275 of file plotBeamSpotDB.py.

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

Definition at line 442 of file plotBeamSpotDB.py.

plotBeamSpotDB.passiov = False

Definition at line 229 of file plotBeamSpotDB.py.

plotBeamSpotDB.passline = False

Definition at line 195 of file plotBeamSpotDB.py.

plotBeamSpotDB.printBanner = False

Definition at line 136 of file plotBeamSpotDB.py.

plotBeamSpotDB.printCanvas = False

Definition at line 134 of file plotBeamSpotDB.py.

string plotBeamSpotDB.printFormat = "png"

Definition at line 135 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.ptm = time.localtime(reftime)

Definition at line 396 of file plotBeamSpotDB.py.

Referenced by FakeBeamMonitor.formatFitTime(), BeamMonitor.formatFitTime(), BeamMonitorBx.formatFitTime(), and popcon::RPCEMapSourceHandler.getNewObjects().

plotBeamSpotDB.reftime = first

print local time

print gmt time

Definition at line 395 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.status = subprocess.getstatusoutput( acommand )

Definition at line 258 of file plotBeamSpotDB.py.

plotBeamSpotDB.suffix = ''

print local time

Definition at line 433 of file plotBeamSpotDB.py.

plotBeamSpotDB.tag = ''

Definition at line 144 of file plotBeamSpotDB.py.

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

Definition at line 272 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.tmpfile = open(datafilename,'w')

Definition at line 226 of file plotBeamSpotDB.py.

list plotBeamSpotDB.tmplistiov = tmpstatus[1]

Definition at line 191 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.tmplumi = unpack(iIOV.since)

Definition at line 255 of file plotBeamSpotDB.py.

int plotBeamSpotDB.tmplumifirst = 1

Definition at line 232 of file plotBeamSpotDB.py.

int plotBeamSpotDB.tmplumilast = 9999999

Definition at line 233 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.tmprun = unpack(iIOV.since)

Definition at line 254 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.tmprunfirst = firstRun

Definition at line 230 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.tmprunlast = lastRun

Definition at line 231 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.tmpstatus = subprocess.getstatusoutput( acommand )

Definition at line 190 of file plotBeamSpotDB.py.

tuple plotBeamSpotDB.totlines = len(tmplistiov)

Definition at line 197 of file plotBeamSpotDB.py.

plotBeamSpotDB.weighted = True;

Definition at line 303 of file plotBeamSpotDB.py.

Referenced by SmsModeFinder3d.operator()().