Project
Loading...
Searching...
No Matches
AggregatedRunInfo.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef ALICEO2_DATA_AGGREGATEDRUNINFO_H_
17#define ALICEO2_DATA_AGGREGATEDRUNINFO_H_
18
19#include <cstdint>
21
23{
24
25class GRPECSObject;
26
32 int runNumber = 0; // run number
33 int64_t sor = 0; // best known timestamp for the start of run
34 int64_t eor = 0; // best known timestamp for end of run
35 int64_t orbitsPerTF = 0; // number of orbits per TF (takes precedence over that in GRPECS)
36 int64_t orbitReset = 0; // timestamp of orbit reset before run
37 int64_t orbitSOR = 0; // orbit when run starts after orbit reset
38 int64_t orbitEOR = 0; // orbit when run ends after orbit reset
39
40 // we may have pointers to actual data source objects GRPECS, ...
41 const o2::parameters::GRPECSObject* grpECS = nullptr; // pointer to GRPECSobject (fetched during struct building)
42
43 static AggregatedRunInfo buildAggregatedRunInfo(int runnumber, long sorMS, long eorMS, long orbitResetMUS, const o2::parameters::GRPECSObject* grpecs, const std::vector<Long64_t>* ctfFirstRunOrbitVec);
44
45 // fills and returns AggregatedRunInfo for a given data run number.
47
48 // Returns the meta-data (MCProdInfo) associated to production lpm_prod_tag (performed by username)
49 static std::map<std::string, std::string> getMCProdInfo(o2::ccdb::CCDBManagerInstance& ccdb, int runnumber,
50 std::string const& lpm_prod_tag, std::string const& username = "aliprod");
51
52 // function that adjusts with values from MC
53 void adjust_from_MC(o2::ccdb::CCDBManagerInstance& ccdb, int run_number, std::string const& lpm_prod_tag, std::string const& username = "aliprod");
54
55 // Fills and returns AggregatedRunInfo for a given run number.
56 // If a non-empty lpm_prod_tag is given, it will potentially override values with specifics from a
57 // MC production identified by that tag and username.
59 int runnumber,
60 std::string const& lpm_prod_tag = "",
61 std::string const& username = "aliprod");
62
64};
65
66} // namespace o2::parameters
67
68#endif
void adjust_from_MC(o2::ccdb::CCDBManagerInstance &ccdb, int run_number, std::string const &lpm_prod_tag, std::string const &username="aliprod")
const o2::parameters::GRPECSObject * grpECS
ClassDefNV(AggregatedRunInfo, 1)
static AggregatedRunInfo buildAggregatedRunInfo_DATA(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)
static std::map< std::string, std::string > getMCProdInfo(o2::ccdb::CCDBManagerInstance &ccdb, int runnumber, std::string const &lpm_prod_tag, std::string const &username="aliprod")