16 #ifndef QC_REPOSITORY_CCDBDATABASE_H 17 #define QC_REPOSITORY_CCDBDATABASE_H 19 #include <CCDB/CcdbApi.h> 56 void connect(std::string host, std::string database, std::string username, std::string password)
override;
57 void connect(
const std::unordered_map<std::string, std::string>& config)
override;
60 void storeMO(std::shared_ptr<const o2::quality_control::core::MonitorObject> q,
long from = -1,
long to = -1)
override;
61 void storeQO(std::shared_ptr<const o2::quality_control::core::QualityObject> q,
long from = -1,
long to = -1)
override;
64 std::shared_ptr<o2::quality_control::core::MonitorObject>
retrieveMO(std::string taskName, std::string objectName,
long timestamp = -1)
override;
65 std::string
retrieveMOJson(std::string taskName, std::string objectName,
long timestamp = -1)
override;
68 std::shared_ptr<o2::quality_control::core::QualityObject>
retrieveQO(std::string qoPath,
long timestamp = -1)
override;
69 std::string
retrieveQOJson(std::string qoPath,
long timestamp = -1)
override;
72 std::string
retrieveJson(std::string path,
long timestamp,
const std::map<std::string, std::string>& metadata)
override;
73 TObject*
retrieveTObject(std::string path,
const std::map<std::string, std::string>& metadata,
long timestamp = -1, std::map<std::string, std::string>* headers =
nullptr)
override;
75 void disconnect()
override;
77 std::vector<std::string> getPublishedObjectNames(std::string taskName)
override;
78 void truncate(std::string taskName, std::string objectName)
override;
79 void storeStreamerInfosToFile(std::string filename);
80 static long getCurrentTimestamp();
81 static long getFutureTimestamp(
int secondsInFuture);
87 std::vector<std::string>
getListing(std::string subpath =
"");
96 static void loadDeprecatedStreamerInfos();
105 std::string getListingAsString(std::string subpath =
"", std::string accept =
"text/plain");
106 o2::ccdb::CcdbApi ccdbApi;
107 std::string mUrl =
"";
112 #endif // QC_REPOSITORY_CCDBDATABASE_H std::string retrieveJson(std::string path, long timestamp, const std::map< std::string, std::string > &metadata) override
Look up an object and return it in JSON format. Look up an object and return it in JSON format if fou...
Definition: CcdbDatabase.cxx:260
std::shared_ptr< o2::quality_control::core::MonitorObject > retrieveMO(std::string taskName, std::string objectName, long timestamp=-1) override
Look up a monitor object and return it. Look up a monitor object and return it if found or nullptr if...
Definition: CcdbDatabase.cxx:195
Definition: AggregatorRunner.h:59
Definition: CcdbDatabase.h:50
std::shared_ptr< o2::quality_control::core::QualityObject > retrieveQO(std::string qoPath, long timestamp=-1) override
Look up a quality object and return it. Look up a quality object and return it if found or nullptr if...
Definition: CcdbDatabase.cxx:232
std::vector< std::string > getListing(std::string subpath="")
Definition: CcdbDatabase.cxx:342
The interface to the MonitorObject's repository.
Definition: DatabaseInterface.h:35
void prepareTaskDataContainer(std::string taskName) override
Prepare the container, such as a table in a relational database, that will contain the MonitorObject'...
Definition: CcdbDatabase.cxx:316
void storeMO(std::shared_ptr< const o2::quality_control::core::MonitorObject > q, long from=-1, long to=-1) override
Definition: CcdbDatabase.cxx:110
void connect(std::string host, std::string database, std::string username, std::string password) override
Definition: CcdbDatabase.cxx:91
std::string retrieveQOJson(std::string qoPath, long timestamp=-1) override
Look up a quality object and return it in JSON format. Look up a quality object and return it in JSON...
Definition: CcdbDatabase.cxx:247
TObject * retrieveTObject(std::string path, const std::map< std::string, std::string > &metadata, long timestamp=-1, std::map< std::string, std::string > *headers=nullptr) override
Look up an object and return it. Look up an object and return it if found or nullptr if not...
Definition: CcdbDatabase.cxx:179
void truncate(std::string taskName, std::string objectName) override
Definition: CcdbDatabase.cxx:402
void storeQO(std::shared_ptr< const o2::quality_control::core::QualityObject > q, long from=-1, long to=-1) override
Definition: CcdbDatabase.cxx:151
std::string retrieveMOJson(std::string taskName, std::string objectName, long timestamp=-1) override
Look up a monitor object and return it in JSON format. Look up a monitor object and return it in JSON...
Definition: CcdbDatabase.cxx:253