Skip to content

Commit 8a70def

Browse files
committed
fix query to GRPECS
Use runNumber also as additional meta-data filter to query GRPECS. Just using a time (gotten from a previous query say RCT/Info/RunInformation) might yield an actually inconsistent object as described here https://alice.its.cern.ch/jira/browse/O2-3129.
1 parent 3d4d97f commit 8a70def

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

MC/bin/o2dpg_sim_workflow_anchored.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@ def retrieve_sor_eor_fromGRPECS(ccdbreader, run_number):
131131
url="http://alice-ccdb.cern.ch/browse/GLO/Config/GRPECS/runNumber="+str(run_number)
132132
ansobject=requests.get(url)
133133
tokens=ansobject.text.split("\n")
134-
# look for the validity token
135134

136-
# look for the ID token
135+
# look for the FIRST ID and validity token
137136
ID=None
138137
VALIDITY=None
139138
for t in tokens:
@@ -156,7 +155,7 @@ def retrieve_sor_eor_fromGRPECS(ccdbreader, run_number):
156155

157156
# we make a suitable request (at the start time) --> this gives the actual
158157
# object, with which we can query the end time as well
159-
grp=retrieve_CCDBObject_asJSON(ccdbreader, "/GLO/Config/GRPECS", int(SOV))
158+
grp=retrieve_CCDBObject_asJSON(ccdbreader, "/GLO/Config/GRPECS" + "/runNumber=" + str(run_number) + "/", int(SOV))
160159

161160
# check that this object is really the one we wanted based on run-number
162161
assert(int(grp["mRun"]) == int(run_number))

0 commit comments

Comments
 (0)