forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAggregatedRunInfo.h
More file actions
57 lines (45 loc) · 2.73 KB
/
AggregatedRunInfo.h
File metadata and controls
57 lines (45 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file GRPECSObject.h
/// \brief Header of the AggregatedRunInfo struct
/// \author ruben.shahoyan@cern.ch sandro.wenzel@cern.ch
#ifndef ALICEO2_DATA_AGGREGATEDRUNINFO_H_
#define ALICEO2_DATA_AGGREGATEDRUNINFO_H_
#include <cstdint>
#include "CCDB/BasicCCDBManager.h"
namespace o2::parameters
{
class GRPECSObject;
/// Composite struct where one may collect important global properties of data "runs"
/// aggregated from various sources (GRPECS, RunInformation CCDB entries, etc.).
/// Also offers the authoritative algorithms to collect these information for easy reuse
/// across various algorithms (anchoredMC, analysis, ...)
struct AggregatedRunInfo {
int runNumber = 0; // run number
int64_t sor = 0; // best known timestamp for the start of run
int64_t eor = 0; // best known timestamp for end of run
int64_t orbitsPerTF = 0; // number of orbits per TF (takes precedence over that in GRPECS)
int64_t orbitReset = 0; // timestamp of orbit reset before run
int64_t orbitSOR = 0; // orbit when run starts after orbit reset
int64_t orbitEOR = 0; // orbit when run ends after orbit reset
// we may have pointers to actual data source objects GRPECS, ...
const o2::parameters::GRPECSObject* grpECS = nullptr; // pointer to GRPECSobject (fetched during struct building)
// fills and returns AggregatedRunInfo for a given run number.
static AggregatedRunInfo buildAggregatedRunInfo(o2::ccdb::CCDBManagerInstance& ccdb, int runnumber);
static AggregatedRunInfo buildAggregatedRunInfo(int runnumber, long sorMS, long eorMS, long orbitResetMUS, const o2::parameters::GRPECSObject* grpecs, const std::vector<Long64_t>* ctfFirstRunOrbitVec);
// Special method for MC because MC may use extra settings or different values.
// Will construct AggregatedRunInfo as in data but override certain values (OrbitsPerTF) if appropriate.
// Needs to be given an lpm production tag as identifier and optionally the username who performed MC.
static AggregatedRunInfo buildAggregatedRunInfo_MC(o2::ccdb::CCDBManagerInstance& ccdb, int run_number, std::string const& lpm_prod_tag, std::string const& username = "aliprod");
ClassDefNV(AggregatedRunInfo, 1);
};
} // namespace o2::parameters
#endif