Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-26 02:34:11

0001 #!/usr/bin/env python3
0002 from optparse import OptionParser, Option, OptionValueError
0003 import DLFCN
0004 import sys
0005 sys.setdlopenflags(DLFCN.RTLD_GLOBAL+DLFCN.RTLD_LAZY)
0006 
0007 import pluginCondDBPyInterface as condDB
0008 a = condDB.FWIncantation()
0009 
0010 def list_tag( conn_str, tag, auth_path ):
0011     rdbms = condDB.RDBMS( auth_path )
0012     db = rdbms.getReadOnlyDB( conn_str )
0013     db.startReadOnlyTransaction()
0014     iov = db.iov( tag )
0015     for elem in iov.elements:
0016         print(elem.since())
0017         db.commitTransaction()
0018         
0019 if __name__ == "__main__":
0020     parser=OptionParser()
0021     parser.add_option("-c","--connection",action="store",dest="conn_str",help="connection string of the target account")
0022     parser.add_option("-t","--tag",action="store",dest="tag",help="tag to print")
0023     parser.add_option("-P","--auth_path",action="store",dest="auth_path",help="authentication path")
0024     (options, args) = parser.parse_args()
0025     list_tag( parser.values.conn_str,parser.values.tag, parser.values.auth_path  )
0026 
0027