CMS 3D CMS Logo

Functions | Variables
run_AlCaRecoTriggerBitsUpdateWorkflow Namespace Reference

Functions

def get_iovs (db, tag)
 
def getCommandOutput (command)
 
def main ()
 
def updateBits (blob)
 

Variables

 action
 
 arguments
 
 child = os.popen(command)
 
string cleanCommand = 'rm -fr *updated*.db *IOV_*.db'
 
string cmsRunCommand
 
string command
 
 con = conddb.connect(url = conddb.make_url(db))
 
 count = pool.map(updateBits,myInputTuple)
 
 data = child.read()
 
dictionary db = officialdbs[db]
 unfortunately some gymnastics is needed here to make use of the conddb library More...
 
 db_url = options.inputDB
 allow to use input sqlite files as well More...
 
 default
 
string defaultDB = 'sqlite_file:mySqlite.db'
 
string defaultInTag = 'myInTag'
 
string defaultOutTag = 'myOutTag'
 
int defaultProc = 20
 
 dest
 
 err = child.close()
 
 help
 
 IOV = session.get_dbtype(conddb.IOV)
 
 iovs = set(session.query(IOV.since).filter(IOV.tag_name == tag).all())
 
string mergeCommand
 
list myInputTuple = []
 
dictionary officialdbs
 
 options
 
 parser = optparse.OptionParser(usage = 'Usage: %prog [options] <file> [<file> ...]\n')
 
 pool = multiprocessing.Pool(processes=options.nproc)
 
 session = con.session()
 
def sinces = get_iovs(options.inputDB,options.InputTag)
 

Detailed Description

Example script to test reading from local sqlite db.

Function Documentation

◆ get_iovs()

def run_AlCaRecoTriggerBitsUpdateWorkflow.get_iovs (   db,
  tag 
)

◆ getCommandOutput()

def run_AlCaRecoTriggerBitsUpdateWorkflow.getCommandOutput (   command)

◆ main()

def run_AlCaRecoTriggerBitsUpdateWorkflow.main ( )

◆ updateBits()

def run_AlCaRecoTriggerBitsUpdateWorkflow.updateBits (   blob)

Variable Documentation

◆ action

run_AlCaRecoTriggerBitsUpdateWorkflow.action

Definition at line 124 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ arguments

run_AlCaRecoTriggerBitsUpdateWorkflow.arguments

Definition at line 128 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ child

run_AlCaRecoTriggerBitsUpdateWorkflow.child = os.popen(command)
This function executes `command` and returns it output.
Arguments:
- `command`: Shell command to be invoked by this function.

Definition at line 31 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ cleanCommand

string run_AlCaRecoTriggerBitsUpdateWorkflow.cleanCommand = 'rm -fr *updated*.db *IOV_*.db'

Definition at line 163 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ cmsRunCommand

string run_AlCaRecoTriggerBitsUpdateWorkflow.cmsRunCommand
Initial value:
1 = 'cmsRun $CMSSW_BASE/src/CondTools/HLT/test/AlCaRecoTriggerBitsRcdUpdate_TEMPL_cfg.py \
2  inputDB=%s inputTag=%s outputDB=%s outputTag=%s firstRun=%s' % ("sqlite_file:"+blob[5]+"_IOV_"+str(blob[2])+".db",
3  blob[5],
4  "sqlite_file:"+blob[5]+"_IOV_"+str(blob[2])+"_updated.db",
5  blob[6],
6  str(blob[2]))
#define str(s)

Definition at line 88 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ command

string run_AlCaRecoTriggerBitsUpdateWorkflow.command
Initial value:
1 = 'conddb --yes --db %s copy %s --destdb %s --from %s --to %s' % (blob[4],
2  blob[5],
3  blob[5]+"_IOV_"+str(blob[2])+".db",
4  str(blob[2]) ,
5  str(blob[3]))
#define str(s)

Definition at line 73 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ con

run_AlCaRecoTriggerBitsUpdateWorkflow.con = conddb.connect(url = conddb.make_url(db))

◆ count

run_AlCaRecoTriggerBitsUpdateWorkflow.count = pool.map(updateBits,myInputTuple)

Definition at line 151 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ data

run_AlCaRecoTriggerBitsUpdateWorkflow.data = child.read()

Definition at line 32 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ db

dictionary run_AlCaRecoTriggerBitsUpdateWorkflow.db = officialdbs[db]

unfortunately some gymnastics is needed here to make use of the conddb library

allow to use input sqlite files as well

Retrieve the list of IOVs from `db` for `tag`.

Arguments:
- `db`: database connection string
- `tag`: tag of database record

Definition at line 51 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ db_url

dictionary run_AlCaRecoTriggerBitsUpdateWorkflow.db_url = options.inputDB

allow to use input sqlite files as well

Definition at line 130 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ default

run_AlCaRecoTriggerBitsUpdateWorkflow.default

Definition at line 108 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ defaultDB

string run_AlCaRecoTriggerBitsUpdateWorkflow.defaultDB = 'sqlite_file:mySqlite.db'

Definition at line 100 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ defaultInTag

string run_AlCaRecoTriggerBitsUpdateWorkflow.defaultInTag = 'myInTag'

Definition at line 101 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ defaultOutTag

string run_AlCaRecoTriggerBitsUpdateWorkflow.defaultOutTag = 'myOutTag'

Definition at line 102 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ defaultProc

int run_AlCaRecoTriggerBitsUpdateWorkflow.defaultProc = 20

Definition at line 103 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ dest

run_AlCaRecoTriggerBitsUpdateWorkflow.dest

Definition at line 107 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ err

run_AlCaRecoTriggerBitsUpdateWorkflow.err = child.close()

Definition at line 33 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ help

run_AlCaRecoTriggerBitsUpdateWorkflow.help

Definition at line 109 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ IOV

run_AlCaRecoTriggerBitsUpdateWorkflow.IOV = session.get_dbtype(conddb.IOV)

◆ iovs

run_AlCaRecoTriggerBitsUpdateWorkflow.iovs = set(session.query(IOV.since).filter(IOV.tag_name == tag).all())

◆ mergeCommand

string run_AlCaRecoTriggerBitsUpdateWorkflow.mergeCommand
Initial value:
1 = 'conddb --yes --db %s copy %s --destdb %s --from %s' % (options.InputTag+"_IOV_"+str(sinces[i])+"_updated.db",
2  options.destTag,
3  options.destTag+".db",
4  str(sinces[i]))
#define str(s)

Definition at line 155 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ myInputTuple

list run_AlCaRecoTriggerBitsUpdateWorkflow.myInputTuple = []

Definition at line 141 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ officialdbs

dictionary run_AlCaRecoTriggerBitsUpdateWorkflow.officialdbs
Initial value:
1 = {
2  # frontier connections
3  'frontier://PromptProd/CMS_CONDITIONS' :'pro',
4  'frontier://FrontierProd/CMS_CONDITIONS' :'pro',
5  'frontier://FrontierArc/CMS_CONDITIONS' :'arc',
6  'frontier://FrontierInt/CMS_CONDITIONS' :'int',
7  'frontier://FrontierPrep/CMS_CONDITIONS' :'dev'
8 }

Definition at line 14 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ options

run_AlCaRecoTriggerBitsUpdateWorkflow.options

Definition at line 128 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ parser

run_AlCaRecoTriggerBitsUpdateWorkflow.parser = optparse.OptionParser(usage = 'Usage: %prog [options] <file> [<file> ...]\n')

Definition at line 105 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ pool

run_AlCaRecoTriggerBitsUpdateWorkflow.pool = multiprocessing.Pool(processes=options.nproc)

Definition at line 150 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

◆ session

run_AlCaRecoTriggerBitsUpdateWorkflow.session = con.session()

Definition at line 57 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.

Referenced by MonitorElementsDb.analyze(), LumiProducer.beginRun(), popcon::PopConBTransitionSourceHandler< T >.checkBOn(), popcon::PopConESTransitionSourceHandler< T >.checkLowGain(), tensorflow.closeSession(), CMSG4CheckOverlap.CMSG4CheckOverlap(), MkFitOutputConverter.computeDNNs(), RPCDBCom.connect(), TestBase.connect(), popcon::L1RPCHwConfigSourceHandler.ConnectOnlineDB(), popcon::RPCEMapSourceHandler.ConnectOnlineDB(), MkFitOutputConverter.convertCandidates(), cond::persistency.copyIov(), RPCFw.createFEB(), RPCFw.createGAS(), RPCFw.createIDMAP(), RPCFw.createIMON(), RPCFw.createMix(), cond::CredentialStore.createSchema(), tensorflow.createSession(), RPCFw.createSTATUS(), RPCFw.createT(), RPCFw.createUXC(), RPCFw.createVMON(), popcon::L1RPCHwConfigSourceHandler.DisconnectOnlineDB(), popcon::RPCEMapSourceHandler.DisconnectOnlineDB(), DTOccupancyTestML.dqmEndLuminosityBlock(), cond::CredentialStore.drop(), L1TriggerScalerRead.dropTable(), GEDPhotonProducer.endStream(), GsfElectronProducer.endStream(), TSGForOIDNN.evaluateClassifier(), cond::CredentialStore.exportAll(), cond::persistency.fetch(), cond::persistency.fetchIfExists(), DIPLumiProducer.filldetailcache(), ExpressLumiProducer.fillLSCache(), LumiProducer.fillLSCache(), LumiCorrectionSource.fillparamcache(), DIPLumiProducer.fillsummarycache(), CondDBESSource.fillTagCollectionFromGT(), LHCInfoPopConSourceHandler.getCTPPSData(), LHCInfoPerLSPopConSourceHandler.getCTPPSData(), LHCInfoPerFillPopConSourceHandler.getCTPPSData(), LHCInfoPopConSourceHandler.getEcalData(), LHCInfoPerFillPopConSourceHandler.getEcalData(), BeamSpotOnlinePopConSourceHandler.getNewObjects(), FillInfoPopConSourceHandler.getNewObjects(), LHCInfoPopConSourceHandler.getNewObjects(), LHCInfoPerLSPopConSourceHandler.getNewObjects(), LHCInfoPerFillPopConSourceHandler.getNewObjects(), popcon::PopConBTransitionSourceHandler< T >.getObjectsForBTransition(), popcon::PopConESTransitionSourceHandler< T >.getObjectsForESTransition(), cond::CredentialStore.getUserCredentials(), cond::CredentialStore.importForPrincipal(), cond::CredentialStore.listConnections(), cond::CredentialStore.listPrincipals(), popcon::PopConSourceHandler< CastorPedestals >.operator()(), l1t::DataWriter.payloadToken(), l1t::DataWriterExt.payloadToken(), cond::service::OnlineDBOutputService.preLoadIov(), L1RCTOmdsFedVectorProducer.produce(), MkFitOutputConverter.produce(), ecaldqm::MLClient.producePlots(), RunInfoRead.readData(), DQMSummaryReader.readData(), RunSummaryRead.readData(), L1TriggerScalerRead.readData(), popcon::RPCEMapSourceHandler.readEMap1(), popcon::L1RPCHwConfigSourceHandler.readHwConfig1(), l1t::DataWriter.readObject(), l1t::DataWriterExt.readObject(), cond::CredentialStore.removeConnection(), cond::CredentialStore.removePrincipal(), cond::CredentialStore.resetAdmin(), lumi::CMSRunSummaryDummy2DB.retrieveData(), lumi::HLTDummy2DB.retrieveData(), lumi::HLTConfDummy2DB.retrieveData(), lumi::TRGDummy2DB.retrieveData(), lumi::LumiDummy2DB.retrieveData(), lumi::Lumi2DB.retrieveData(), tensorflow.run(), DTOccupancyTestML.runOccupancyTest(), l1t::WriterProxyT< Record, Type >.save(), cond::CredentialStore.selectForUser(), cond::CredentialStore.selectPermissions(), cond::CredentialStore.setPermission(), cond::CredentialStore.unsetPermission(), cond::CredentialStore.updateConnection(), cond::CredentialStore.updatePrincipal(), lumi::Lumi2DB.writeAllLumiData(), lumi::Lumi2DB.writeAllLumiDataToSchema2(), lumi::Lumi2DB.writeBeamIntensityOnly(), l1t::DataWriter.writeKeyList(), and l1t::DataWriterExt.writeKeyList().

◆ sinces

def run_AlCaRecoTriggerBitsUpdateWorkflow.sinces = get_iovs(options.inputDB,options.InputTag)

Definition at line 137 of file run_AlCaRecoTriggerBitsUpdateWorkflow.py.