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;
26class GRPLHCIFData;
27
33 int runNumber = 0; // run number
34 int64_t sor = 0; // best known timestamp for the start of run
35 int64_t eor = 0; // best known timestamp for end of run
36 int64_t orbitsPerTF = 0; // number of orbits per TF (takes precedence over that in GRPECS)
37 int64_t orbitReset = 0; // timestamp of orbit reset before run
38 int64_t orbitSOR = 0; // orbit when run starts after orbit reset
39 int64_t orbitEOR = 0; // orbit when run ends after orbit reset
40
41 // we may have pointers to actual data source objects GRPECS, ...
42 const o2::parameters::GRPECSObject* grpECS = nullptr; // pointer to GRPECSobject (fetched during struct building)
44
45 static AggregatedRunInfo buildAggregatedRunInfo(int runnumber, long sorMS, long eorMS, long orbitResetMUS, const o2::parameters::GRPECSObject* grpecs, const std::vector<Long64_t>* ctfFirstRunOrbitVec, const o2::parameters::GRPLHCIFData* grplhcif = nullptr);
46
47 // fills and returns AggregatedRunInfo for a given data run number.
49
50 // Returns the meta-data (MCProdInfo) associated to production lpm_prod_tag (performed by username)
51 static std::map<std::string, std::string> getMCProdInfo(o2::ccdb::CCDBManagerInstance& ccdb, int runnumber,
52 std::string const& lpm_prod_tag, std::string const& username = "aliprod");
53
54 // function that adjusts with values from MC
55 void adjust_from_MC(o2::ccdb::CCDBManagerInstance& ccdb, int run_number, std::string const& lpm_prod_tag, std::string const& username = "aliprod");
56
57 // Fills and returns AggregatedRunInfo for a given run number.
58 // If a non-empty lpm_prod_tag is given, it will potentially override values with specifics from a
59 // MC production identified by that tag and username.
61 int runnumber,
62 std::string const& lpm_prod_tag = "",
63 std::string const& username = "aliprod");
64
66};
67
68} // namespace o2::parameters
69
70#endif
const o2::parameters::GRPLHCIFData * grpLHC
void adjust_from_MC(o2::ccdb::CCDBManagerInstance &ccdb, int run_number, std::string const &lpm_prod_tag, std::string const &username="aliprod")
static AggregatedRunInfo buildAggregatedRunInfo(int runnumber, long sorMS, long eorMS, long orbitResetMUS, const o2::parameters::GRPECSObject *grpecs, const std::vector< Long64_t > *ctfFirstRunOrbitVec, const o2::parameters::GRPLHCIFData *grplhcif=nullptr)
const o2::parameters::GRPECSObject * grpECS
ClassDefNV(AggregatedRunInfo, 1)
static AggregatedRunInfo buildAggregatedRunInfo_DATA(o2::ccdb::CCDBManagerInstance &ccdb, int runnumber)
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")