Project
Loading...
Searching...
No Matches
ctpCCDBManager.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#ifndef _CTP_CTPCCDB_H_
16#define _CTP_CTPCCDB_H_
18
19namespace o2
20{
21namespace ctp
22{
24{
25 public:
26 ctpCCDBManager() = default;
27 int saveRunScalersToCCDB(CTPRunScalers& scalers, long timeStart, long timeStop);
28 int saveRunScalersToQCDB(CTPRunScalers& scalers, long timeStart, long timeStop);
29 int saveRunConfigToCCDB(CTPConfiguration* cfg, long timeStart);
30 int saveSoxOrbit(uint32_t runNumber, uint32_t soxOrbit, long timeStart);
31 int saveOrbitReset(long timeStamp);
32 int saveCtpCfg(uint32_t runNumber, long timeStamp);
33 static CTPConfiguration getConfigFromCCDB(long timestamp, std::string run, bool& ok);
34 static CTPConfiguration getConfigFromCCDB(long timestamp, std::string run);
35 CTPRunScalers getScalersFromCCDB(long timestamp, std::string, bool& ok);
36 static void setCCDBHost(std::string host) { mCCDBHost = host; };
37 static void setQCDBHost(std::string host) { mQCDBHost = host; };
38 void setCtpCfgDir(std::string& ctpcfgdir) { mCtpCfgDir = ctpcfgdir; };
39
40 protected:
42 // std::string mCCDBHost = "http://ccdb-test.cern.ch:8080";
43 // std::string mQCDBHost = "http://ali-qcdb.cern.ch:8083";
44 static std::string mCCDBHost;
45 static std::string mQCDBHost;
46 const std::string mCCDBPathCTPScalers = "CTP/Calib/Scalers";
47 // std::string mCCDBPathCTPConfig = "CTP/Config/Config"; - in Configuration.h
48 const std::string mQCDBPathCTPScalers = "qc/CTP/Scalers";
49 const std::string mCCDBPathSoxOrbit = "CTP/Calib/FirstRunOrbit";
50 const std::string mCCDBPathOrbitReset = "CTP/Calib/OrbitReset";
51 const std::string mCCDBPathCtpCfg = "CTP/Config/CtpCfg";
52 std::string mCtpCfgDir;
53
55};
56} // namespace ctp
57} // namespace o2
58#endif //_CTP_CTPCCDB_H_
definition of CTPConfiguration and related CTP structures
const std::string mCCDBPathOrbitReset
static std::string mCCDBHost
Database constants.
const std::string mQCDBPathCTPScalers
int saveRunScalersToQCDB(CTPRunScalers &scalers, long timeStart, long timeStop)
static std::string mQCDBHost
int saveSoxOrbit(uint32_t runNumber, uint32_t soxOrbit, long timeStart)
static void setQCDBHost(std::string host)
CTPRunScalers getScalersFromCCDB(long timestamp, std::string, bool &ok)
int saveRunScalersToCCDB(CTPRunScalers &scalers, long timeStart, long timeStop)
int saveRunConfigToCCDB(CTPConfiguration *cfg, long timeStart)
int saveCtpCfg(uint32_t runNumber, long timeStamp)
void setCtpCfgDir(std::string &ctpcfgdir)
static void setCCDBHost(std::string host)
ClassDefNV(ctpCCDBManager, 2)
static CTPConfiguration getConfigFromCCDB(long timestamp, std::string run, bool &ok)
const std::string mCCDBPathCtpCfg
const std::string mCCDBPathCTPScalers
int saveOrbitReset(long timeStamp)
const std::string mCCDBPathSoxOrbit
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...