The best way to know timestamp of data

Hi, I am trying to understand how to compute the timestamp (i.e. ms since epoch) of acquired data. Do I understand correctly that this is the proper way? (as in CCDBHelpers.cxx)

int64_t timestamp = ceil((timingInfo.firstTForbit * o2::constants::lhc::LHCOrbitNS / 1000 + orbitResetTime) / 1000);

In such case, how to know the orbitResetTime in synchronous and asynchronous processing?

Does the method above apply also for MC?

Hi Piotr,
in the synch./asynch. reco we obtain the orbit reset time from the CCDB, typically using the GRPGeomHelper class:

o2::base::GRPGeomHelper::instance().getOrbitResetTimeMS()

An example for the CCDB request is the TPCResidualAggregatorSpec with the following snippets: AliceO2/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCResidualAggregatorSpec.h at 6ba6d8cc59baa8b0a77b266e43fee9bf18e1ae87 · AliceO2Group/AliceO2 · GitHub
AliceO2/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCResidualAggregatorSpec.h at 6ba6d8cc59baa8b0a77b266e43fee9bf18e1ae87 · AliceO2Group/AliceO2 · GitHub
AliceO2/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCResidualAggregatorSpec.h at 6ba6d8cc59baa8b0a77b266e43fee9bf18e1ae87 · AliceO2Group/AliceO2 · GitHub
AliceO2/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCResidualAggregatorSpec.h at 6ba6d8cc59baa8b0a77b266e43fee9bf18e1ae87 · AliceO2Group/AliceO2 · GitHub

On slide 7 there are some more explanations: CCDB_intro - Google Präsentationen

Cheers,
Ole

Great, thanks! I’ll try that.

I would have one more question - can the orbit reset time change during a (physics) run? how do you normally handle such case?

I would have one more question - can the orbit reset time change during a (physics) run? how do you normally handle such case?

@oschmidt would you know perhaps?

Yes, the orbit reset time cannot change during a run. It is reset at the beginning of each fill, a restart of the CTP deamon or after a longer time period of few days in case none of the above cases appear sooner. But this does not happen during a run (also our reconstruction relies on a stable orbit reset time during a run).

Thanks, all clear!