CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
test_db_connect.py
Go to the documentation of this file.
1 import ROOT
2 import sys
3 db_sid = 'CMS_OMDS_LB'
4 db_usr = 'CMS_ECAL_LASER_COND'
5 db_pwd = sys.argv[1]
6 
7 runMin = 309000
8 runMax = 999999
9 
10 econn = ROOT.EcalCondDBInterface( db_sid, db_usr, db_pwd )
11 my_locdef = ROOT.LocationDef()
12 my_locdef.setLocation("P5_Co")
13 my_rundef = ROOT.RunTypeDef()
14 my_rundef.setRunType("PHYSICS")
15 
16 runtag = ROOT.RunTag()
17 runtag.setLocationDef(my_locdef)
18 runtag.setRunTypeDef(my_rundef)
19 runtag.setGeneralTag("GLOBAL")
20 runlist = econn.fetchNonEmptyGlobalRunList( runtag, runMin, runMax ).getRuns()
21 runs = [ runlist[i].getRunNumber() for i in range( runlist.size() ) ]
22 print(runs)
const uint16_t range(const Frame &aFrame)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47