コード例 #1
0
g = cppyy.gbl
cppyy.makeClass('std::vector<float>')

#=== get a logger
log = CaloCondLogger.getLogger("CaloNoiseWriter")

#=== (re-)create the database
db = CaloCondTools.openDb('SQLITE', 'COMP200', 'UPDATE')

try:
    #=== creating folder specifications
    spec = cool.RecordSpecification()
    spec.extend('CaloCondBlob16M', cool.StorageType.Blob16M)

    #=== create the folder
    folderPath = CaloCondTools.getCaloPrefix() + "Ofl/Pedestal/CellPedestal"
    folderTag = tag
    log.info("Filling COOL folder %s with tag %s", folderPath, folderTag)
    desc = CaloCondTools.getAthenaFolderDescr()
    try:
        folder = db.getFolder(folderPath)
    except Exception:
        log.warning("Folder %s not found, creating it...", folderPath)
        folder = db.createFolder(folderPath, spec, desc,
                                 cool.FolderVersioning.MULTI_VERSION, True)

    #==================================================
    #=== Create the CaloCondBlobFlt objects
    #==================================================
    #=== default a and b to be used for each gain
    gainDefVec = g.std.vector('float')()
コード例 #2
0
g = cppyy.gbl
cppyy.makeClass('std::vector<float>')

#=== get a logger
log = CaloCondLogger.getLogger("CaloTimeConsWriter")

#=== (re-)create the database
db = CaloCondTools.openDb('SQLITE', 'COMP200', 'UPDATE')

try:
    #=== creating folder specifications
    spec = cool.RecordSpecification()
    spec.extend( 'CaloCondBlob16M', cool.StorageType.Blob16M )
     
    #=== create the folder
    folderPath = CaloCondTools.getCaloPrefix()+"LAR/TimeCorrectionOfl/NonRunCon"
    folderTag  = tagCon
    print ("Filling COOL folder ", folderPath, " with tag ", folderTag   )
    desc = CaloCondTools.getAthenaFolderDescr()
    try:
        folder = db.getFolder(folderPath)
    except Exception:
        log.warning("Folder %s not found, creating it...", folderPath)
        print ("Folder ", folderPath, " not found, creating it... " )
        folderSpec = cool.FolderSpecification(cool.FolderVersioning.SINGLE_VERSION, spec)
        folder = db.createFolder(folderPath, folderSpec, desc, True)
        
    #==================================================
    #=== Create the CaloCondBlobFlt objects
    #==================================================   
    #=== default a and b to be used for each gain 
コード例 #3
0
g = cppyy.gbl
cppyy.makeClass('std::vector<float>')

#=== get a logger
log = CaloCondLogger.getLogger("CaloNoiseWriter")

#=== (re-)create the database
db = CaloCondTools.openDb('SQLITE', 'COMP200', 'UPDATE')

try:
    #=== creating folder specifications
    spec = cool.RecordSpecification()
    spec.extend( 'CaloCondBlob16M', cool.StorageType.Blob16M )
     
    #=== create the folder
    folderPath = CaloCondTools.getCaloPrefix()+"Noise/CellNoise"
    folderTag  = g.CaloCondUtils.getFullTag(folderPath,tag)
    log.info( "Filling COOL folder %s with tag %s", folderPath, folderTag )
    desc = CaloCondTools.getAthenaFolderDescr()
    try:
        folder = db.getFolder(folderPath)
    except Exception:
        log.warning("Folder %s not found, creating it...", folderPath)
        folder = db.createFolder(folderPath, spec, desc, cool.FolderVersioning.MULTI_VERSION, True)
        
    #==================================================
    #=== Create the CaloCondBlobFlt objects
    #==================================================   
    #=== default a and b to be used for each gain 
    gainDefVec = g.std.vector('float')()
    gainDefVec.push_back(0.) # a