CMS 3D CMS Logo

Functions

generateDummyData Namespace Reference

Functions

def hlt
def hlttrgmap
def lumiSummary
def runsummary
def trg

Function Documentation

def generateDummyData::hlt (   schema,
  nls 
)
input:
output: [datasource,pathnameclob,{cmslsnum:[inputcountBlob,acceptcountBlob,prescaleBlob]}]

Definition at line 105 of file generateDummyData.py.

00106                    :
00107     '''
00108     input:
00109     output: [datasource,pathnameclob,{cmslsnum:[inputcountBlob,acceptcountBlob,prescaleBlob]}]
00110     '''
00111     o=['oracle://cms_orcon_prod/cms_runinfo']
00112     pathnameclob='HLT_PixelTracks_Multiplicity70,HLT_PixelTracks_Multiplicity85,HLT_PixelTracks_Multiplicity100,HLT_GlobalRunHPDNoise,HLT_TechTrigHCALNoise'
00113     o.append(pathnameclob)
00114     perlsdata={}
00115     for cmslsnum in range(1,nls+1):
00116         inputcounts=array.array('I')
00117         acceptcounts=array.array('I')
00118         prescalecounts=array.array('I')
00119         for i in range(1,201):
00120             inputcounts.append(6677889 )
00121             acceptcounts.append(3344565)
00122             prescalecounts.append(17)
00123         inputcountsBlob=CommonUtil.packArraytoBlob(inputcounts)
00124         acceptcountsBlob=CommonUtil.packArraytoBlob(acceptcounts)
00125         prescalecountsBlob=CommonUtil.packArraytoBlob(prescalecounts)
00126         if not perlsdata.has_key(cmslsnum):
00127             perlsdata[cmslsnum]=[]
00128         perlsdata[cmslsnum].extend([inputcountsBlob,acceptcountsBlob,prescalecountsBlob])
00129     o.append(perlsdata)
    return o
def generateDummyData::hlttrgmap (   schema)
input:
output:[hltkey,{hltpahtname:l1seed}]

Definition at line 130 of file generateDummyData.py.

00131                      :
00132     '''
00133     input:
00134     output:[hltkey,{hltpahtname:l1seed}]
00135     '''
00136     o=['/cdaq/physics/firstCollisions10/v2.0/HLT_7TeV/V5']
00137     hlttrgmap={}
00138     hlttrgmap['HLT_L1Tech_BSC_halo']='4'
00139     hlttrgmap['HLT_PixelTracks_Multiplicity70']='L1_ETT60'
00140     hlttrgmap['HLT_PixelTracks_Multiplicity85']='L1_ETT60'
00141     hlttrgmap['HLT_PixelTracks_Multiplicity100']='L1_ETT100'
00142     hlttrgmap['HLT_GlobalRunHPDNoise']="L1_SingleJet10U_NotBptxOR"
00143     hlttrgmap['HLT_TechTrigHCALNoise']="11 OR 12"
00144     o.append(hlttrgmap)
    return o
def generateDummyData::lumiSummary (   schema,
  nlumils 
)
input:
output: [datasource,{lumilsnum:[cmslsnum,instlumi,instlumierror,instlumiquality,beamstatus,beamenergy,numorbit,startorbit,cmsbxindexblob,beamintensityblob_1,beamintensitublob_2,bxlumivalue_occ1,bxlumierror_occ1,bxlumiquality_occ1,bxlumivalue_occ2,bxlumierror_occ2,bxlumiquality_occ2,bxlumivalue_et,bxlumierror_et,bxlumiquality_et]}]

Definition at line 3 of file generateDummyData.py.

00004                                :
00005     '''
00006     input:
00007     output: [datasource,{lumilsnum:[cmslsnum,instlumi,instlumierror,instlumiquality,beamstatus,beamenergy,numorbit,startorbit,cmsbxindexblob,beamintensityblob_1,beamintensitublob_2,bxlumivalue_occ1,bxlumierror_occ1,bxlumiquality_occ1,bxlumivalue_occ2,bxlumierror_occ2,bxlumiquality_occ2,bxlumivalue_et,bxlumierror_et,bxlumiquality_et]}]
00008     '''
00009     o=['file:fake.root']
00010     perlsdata={}
00011     for lumilsnum in range(1,nlumils+1):
00012         cmslsnum=0
00013         if lumilsnum<100:
00014             cmslsnum=lumilsnum
00015         instlumi=2.37
00016         instlumierror=0.56
00017         instlumiquality=2
00018         beamstatus='STABLE BEAMS'
00019         beamenergy=3.5e03
00020         numorbit=12345
00021         startorbit=numorbit*lumilsnum
00022         if cmslsnum==0:
00023             cmsbxindex=None
00024             beam1intensity=None
00025             beam2intensity=None
00026         else:
00027             cmsbxindex=array.array('I')
00028             beam1intensity=array.array('f')
00029             beam2intensity=array.array('f')
00030             for idx in range(1,3565):
00031                 cmsbxindex.append(idx)
00032                 beam1intensity.append(1.5e09)
00033                 beam2intensity.append(5.5e09)
00034                 cmsbxindexBlob=CommonUtil.packArraytoBlob(cmsbxindex)
00035                 beam1intensityBlob=CommonUtil.packArraytoBlob(beam1intensity)
00036                 beam2intensityBlob=CommonUtil.packArraytoBlob(beam2intensity)
00037         bxlumivalue=array.array('f')
00038         bxlumierror=array.array('f')
00039         bxlumiquality=array.array('I')
00040         for idx in range(1,3565):
00041             bxlumivalue.append(2.3)
00042             bxlumierror.append(0.4)
00043             bxlumiquality.append(2)
00044         bxlumivalueBlob=CommonUtil.packArraytoBlob(bxlumivalue)
00045         bxlumierrorBlob=CommonUtil.packArraytoBlob(bxlumierror)
00046         bxlumiqualityBlob=CommonUtil.packArraytoBlob(bxlumiquality)
00047         if not perlsdata.has_key(lumilsnum):
00048             perlsdata[lumilsnum]=[]
00049         perlsdata[lumilsnum].extend([cmslsnum,instlumi,instlumierror,instlumiquality,beamstatus,beamenergy,numorbit,startorbit,cmsbxindexBlob,beam1intensityBlob,beam2intensityBlob,bxlumivalueBlob,bxlumierrorBlob,bxlumiqualityBlob,bxlumivalueBlob,bxlumierrorBlob,bxlumiqualityBlob,bxlumivalueBlob,bxlumierrorBlob,bxlumiqualityBlob])
00050     o.append(perlsdata)
00051     return o
00052 #def lumiDetail(schema,nlumils):
00053 #    '''
00054 #    input:
00055 #    output:[(algoname,{lumilsnum:[cmslsnum,bxlumivalue,bxlumierror,bxlumiquality]})]
00056 #    '''
00057 #    o=[]
00058 #    algos=['OCC1','OCC2','ET']
00059 #    for algoname in algos:
00060 #        perlsdata={}
00061 #        for lumilsnum in range(1,nlumils+1):
00062 #            cmslsnum=0
00063 #            cmsalive=0
00064 #            if lumilsnum<100:
00065 #                cmslsnum=lumilsnum
00066 #            bxlumivalue=array.array('f')
00067 #            bxlumierror=array.array('f')
00068 #            bxlumiquality=array.array('I')
00069 #            for idx in range(1,3565):
00070 #                bxlumivalue.append(2.3)
00071 #                bxlumierror.append(0.4)
00072 #                bxlumiquality.append(2)
00073 #            bxlumivalueBlob=CommonUtil.packArraytoBlob(bxlumivalue)
00074 #            bxlumierrorBlob=CommonUtil.packArraytoBlob(bxlumierror)
00075 #            bxlumiqualityBlob=CommonUtil.packArraytoBlob(bxlumiquality)
00076 #            if not perlsdata.has_key(lumilsnum):
00077 #                perlsdata[lumilsnum]=[]
00078 #            perlsdata[lumilsnum].extend([cmslsnum,bxlumivalueBlob,bxlumierrorBlob,bxlumiqualityBlob])           
00079 #        o.append((algoname,perlsdata))
#    return o
def generateDummyData::runsummary (   schema,
  amodetag,
  egev 
)
input:
output:[l1key,amodetag,egev,hltkey,fillnum,sequence,starttime,stoptime]

Definition at line 145 of file generateDummyData.py.

00146                                     :
00147     '''
00148     input:
00149     output:[l1key,amodetag,egev,hltkey,fillnum,sequence,starttime,stoptime]
00150     '''
00151     o=['collisioncollision','PROTPHYS',3500,'/cdaq/physics/firstCollisions10/v2.0/HLT_7TeV/V5',1005,'GLOBAL-RUN']
00152     starttime=coral.TimeStamp(2010,11,1,0,0,0,0)
00153     stoptime=coral.TimeStamp(2010,11,1,11,0,0,0)
00154     o.append(starttime)
00155     o.append(stoptime)
00156     return o
    
def generateDummyData::trg (   schema,
  nls 
)
input:
output: [datasource,bitzeroname,bitnameclob,{cmslsnum:[deadtime,bitzerocount,bitzeroprescale,trgcountBlob,trgprescaleBlob]}]

Definition at line 80 of file generateDummyData.py.

Referenced by TTUEmulator::processTtu(), and DTBtiChip::store().

00081                    :
00082     '''
00083     input:
00084     output: [datasource,bitzeroname,bitnameclob,{cmslsnum:[deadtime,bitzerocount,bitzeroprescale,trgcountBlob,trgprescaleBlob]}]
00085     '''
00086     o=['oracle://cms_orcon_prod/cms_gtmon','L1_ZeroBias']
00087     bitnameclob='L1_ZeroBias,False,L1_SingleHfBitCountsRing1_1,L1_SingleHfBitCountsRing2_1,L1_SingleMu15,L1SingleJet,Jura'
00088     o.append(bitnameclob)
00089     perlsdata={}
00090     for cmslsnum in range(1,nls+1):
00091         deadtime=99+cmslsnum
00092         bitzerocount=897865
00093         bitzeroprescale=17
00094         trgcounts=array.array('I')
00095         prescalecounts=array.array('I')
00096         for i in range(1,192):
00097             trgcounts.append(778899+i)
00098             prescalecounts.append(17)
00099         trgcountsBlob=CommonUtil.packArraytoBlob(trgcounts)
00100         prescalecountsBlob=CommonUtil.packArraytoBlob(prescalecounts)
00101         if not perlsdata.has_key(cmslsnum):
00102             perlsdata[cmslsnum]=[]
00103         perlsdata[cmslsnum].extend([deadtime,bitzerocount,bitzeroprescale,trgcountsBlob,prescalecountsBlob])
00104     o.append(perlsdata)
    return o