You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Common/TableProducer/timestamp.cxx
+43-31Lines changed: 43 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,13 @@
9
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
10
// or submit itself to any jurisdiction.
11
11
12
-
//
13
-
// A task to fill the timestamp table from run number.
14
-
// Uses headers from CCDB
15
-
//
16
-
// Author: Nicolo' Jacazio on 2020-06-22
12
+
///
13
+
/// \file timestamp.cxx
14
+
/// \author Nicolò Jacazio
15
+
/// \since 2020-06-22
16
+
/// \brief A task to fill the timestamp table from run number.
17
+
/// Uses headers from CCDB
18
+
///
17
19
18
20
#include"Framework/runDataProcessing.h"
19
21
#include"Framework/AnalysisTask.h"
@@ -27,19 +29,23 @@ using namespace o2::header;
27
29
usingnamespaceo2;
28
30
29
31
structTimestampTask {
30
-
Produces<aod::Timestamps> ts_table; /// Table with SOR timestamps produced by the task
32
+
Produces<aod::Timestamps> timestampTable;/// Table with SOR timestamps produced by the task
31
33
Service<o2::ccdb::BasicCCDBManager> ccdb; /// Object manager in CCDB
32
34
o2::ccdb::CcdbApi ccdb_api; /// API to access CCDB
33
35
std::map<int, int>* mapStartOrbit = nullptr; /// Map of the starting orbit for the run
34
-
std::pair<int, long> lastCall; /// Last run number processed and its timestamp, needed for caching
35
36
std::map<int, long> mapRunToTimestamp; /// Cache of processed run numbers
37
+
int lastRunNumber = 0; /// Last run number processed
38
+
long runNumberTimeStamp = 0; /// Timestamp of the run number, used in the process function to work out the timestamp of the BC
39
+
uint32_t initialOrbit = 0; /// Index of the first orbit of the run number, used in the process function to evaluate the offset with respect to the starting of the run
40
+
staticconstexpruint16_t initialBC = 0; /// Index of the initial bc, exact bc number not relevant due to ms precision of timestamps
41
+
InteractionRecord initialIR; /// Initial interaction record, used to compute the delta with respect to the start of the run
Configurable<bool> isMC{"isMC", false, "Running mode: enabled for MC. If enabled this flag is used to compute the timestamp according to the input data. The timestamp of the BC is computed from initialBC and initialOrbit"};
0 commit comments