QualityControl  1.5.1
O2 Data Quality Control Framework
DummyDatabase.h
Go to the documentation of this file.
1 // Copyright CERN and copyright holders of ALICE O2. This software is
2 // distributed under the terms of the GNU General Public License v3 (GPL
3 // Version 3), copied verbatim in the file "COPYING".
4 //
5 // See http://alice-o2.web.cern.ch/license for full licensing information.
6 //
7 // In applying this license CERN does not waive the privileges and immunities
8 // granted to it by virtue of its status as an Intergovernmental Organization
9 // or submit itself to any jurisdiction.
10 
15 
16 #ifndef QC_REPOSITORY_DUMMYDATABASE_H
17 #define QC_REPOSITORY_DUMMYDATABASE_H
18 
20 
22 {
23 
26 {
27  public:
28  DummyDatabase() = default;
29  virtual ~DummyDatabase() = default;
30 
31  void connect(std::string host, std::string database, std::string username, std::string password) override;
32  void connect(const std::unordered_map<std::string, std::string>& config) override;
33  // MonitorObject
34  void storeMO(std::shared_ptr<const o2::quality_control::core::MonitorObject> q, long from, long to) override;
35  std::shared_ptr<o2::quality_control::core::MonitorObject> retrieveMO(std::string taskName, std::string objectName, long timestamp = 0) override;
36  std::string retrieveMOJson(std::string taskName, std::string objectName, long timestamp = 0) override;
37  // QualityObject
38  void storeQO(std::shared_ptr<const o2::quality_control::core::QualityObject> q, long from, long to) override;
39  std::shared_ptr<o2::quality_control::core::QualityObject> retrieveQO(std::string checkerName, long timestamp = 0) override;
40  std::string retrieveQOJson(std::string checkName, long timestamp = 0) override;
41  // General
42  std::string retrieveJson(std::string path, long timestamp, const std::map<std::string, std::string>& metadata) override;
43  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;
44 
45  void disconnect() override;
46  void prepareTaskDataContainer(std::string taskName) override;
47  std::vector<std::string> getPublishedObjectNames(std::string taskName) override;
48  void truncate(std::string taskName, std::string objectName) override;
49 
50  private:
51 };
52 
53 } // namespace o2::quality_control::repository
54 
55 #endif // QC_REPOSITORY_DUMMYDATABASE_H
Definition: AggregatorRunner.h:59
void truncate(std::string taskName, std::string objectName) override
Definition: DummyDatabase.cxx:72
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: DummyDatabase.cxx:76
void prepareTaskDataContainer(std::string taskName) override
Prepare the container, such as a table in a relational database, that will contain the MonitorObject&#39;...
Definition: DummyDatabase.cxx:63
Dummy database which does nothing. Use it to avoid writing to QC repository.
Definition: DummyDatabase.h:25
The interface to the MonitorObject&#39;s repository.
Definition: DatabaseInterface.h:35
void storeQO(std::shared_ptr< const o2::quality_control::core::QualityObject > q, long from, long to) override
Definition: DummyDatabase.cxx:45
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: DummyDatabase.cxx:81
std::shared_ptr< o2::quality_control::core::MonitorObject > retrieveMO(std::string taskName, std::string objectName, long timestamp=0) override
Look up a monitor object and return it. Look up a monitor object and return it if found or nullptr if...
Definition: DummyDatabase.cxx:35
std::string retrieveQOJson(std::string checkName, long timestamp=0) override
Look up a quality object and return it in JSON format. Look up a quality object and return it in JSON...
Definition: DummyDatabase.cxx:54
void connect(std::string host, std::string database, std::string username, std::string password) override
Definition: DummyDatabase.cxx:23
std::string retrieveMOJson(std::string taskName, std::string objectName, long timestamp=0) override
Look up a monitor object and return it in JSON format. Look up a monitor object and return it in JSON...
Definition: DummyDatabase.cxx:40
std::shared_ptr< o2::quality_control::core::QualityObject > retrieveQO(std::string checkerName, long timestamp=0) override
Look up a quality object and return it. Look up a quality object and return it if found or nullptr if...
Definition: DummyDatabase.cxx:49
void storeMO(std::shared_ptr< const o2::quality_control::core::MonitorObject > q, long from, long to) override
Definition: DummyDatabase.cxx:31