CcdbApi.retrieveFromTFileAny: timestamp -1

Hi experts,

can anyone clarify what exactly I get when calling CcdbApi.retriveFromTFileAny with the default timestamp = -1 or rather what conditions concerning the validity of the ccdb objects are applied?

For quite a while my assumption was that it simply returns the file that was most recently uploaded to the ccdb/qcdb but apparently the validity of the object also plays a role. When there is no object that is valid at the moment then I don’t get anything but an error stating that the file does not exist.

[ERROR] Requested resource does not exist: ccdb-test.cern.ch:8080/TPC/Calib/IDC/IDC0/1653896104764/

Does this mean that I get the most recent file where “current timestamp is within the validity range” is true? Or do I get the object that is valid and at the same time the end of validity is the furthest in the future among all objects that are valid at the moment? Or something else?

I am looking forward to any insight that can be provided.

Cheers,
Thomas

I think -1 is simply translated to the timestamp at the moment of the query. As far as I know we currently don’t have an API to simply get the last object that was valid some time ago.

Yes, it looks like it does but can you explain what role the validity of the objects in the ccdb plays when querying?

Apparently, I can only get objects that are valid at the given timestamp. But what happens if there are multiple valid objects?

Then you always get the one that was put/uploaded last. (also pinging @grigoras)

Ok, thanks for the info!