Skip to content

Commit

Permalink
Merge pull request #29240 from organtin/GOFC-dictionary-classes-added
Browse files Browse the repository at this point in the history
Added dictionary classes in EcalCondDB to be used in pyroot for the laser monitoring analysis
  • Loading branch information
cmsbuild authored Apr 16, 2020
2 parents dfa195c + 97ee8d4 commit 1056806
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
22 changes: 22 additions & 0 deletions OnlineDB/EcalCondDB/bin/test_db_connect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import ROOT
import sys
db_sid = 'CMS_OMDS_LB'
db_usr = 'CMS_ECAL_LASER_COND'
db_pwd = sys.argv[1]

runMin = 309000
runMax = 999999

econn = ROOT.EcalCondDBInterface( db_sid, db_usr, db_pwd )
my_locdef = ROOT.LocationDef()
my_locdef.setLocation("P5_Co")
my_rundef = ROOT.RunTypeDef()
my_rundef.setRunType("PHYSICS")

runtag = ROOT.RunTag()
runtag.setLocationDef(my_locdef)
runtag.setRunTypeDef(my_rundef)
runtag.setGeneralTag("GLOBAL")
runlist = econn.fetchNonEmptyGlobalRunList( runtag, runMin, runMax ).getRuns()
runs = [ runlist[i].getRunNumber() for i in range( runlist.size() ) ]
print(runs)
2 changes: 0 additions & 2 deletions OnlineDB/EcalCondDB/interface/IODConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,9 @@ class IODConfig : public IDBObject {
inFile.close();
std::cout << "we are here4" << std::endl;
delete[] buffer;

} catch (SQLException &e) {
throw(std::runtime_error(std::string("populateClob(): ") + e.getMessage()));
}

std::cout << "Populating the Clob - Success" << std::endl;
}

Expand Down
3 changes: 3 additions & 0 deletions OnlineDB/EcalCondDB/src/classes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
#include "OnlineDB/EcalCondDB/interface/RunTag.h"
#include "OnlineDB/EcalCondDB/interface/RunIOV.h"
5 changes: 5 additions & 0 deletions OnlineDB/EcalCondDB/src/classes_def.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<lcgdict>
<class name="RunIOV"/>
<class name="RunTag"/>
<class name="EcalCondDBInterface"/>
</lcgdict>

0 comments on commit 1056806

Please sign in to comment.