@@ -44,6 +44,11 @@ class DatabaseInterface
4444 public:
4545 constexpr static framework::ServiceKind service_kind = framework::ServiceKind::Global;
4646
47+ enum Timestamp : long {
48+ Current = -1 ,
49+ Latest = 0
50+ };
51+
4752 // / Default constructor
4853 DatabaseInterface () = default ;
4954 // / Destructor
@@ -140,7 +145,7 @@ class DatabaseInterface
140145 * @param activity Activity of the object
141146 * @deprecated
142147 */
143- virtual std::shared_ptr<o2::quality_control::core::MonitorObject> retrieveMO (std::string objectPath, std::string objectName, long timestamp = - 1 , const core::Activity& activity = {}) = 0;
148+ virtual std::shared_ptr<o2::quality_control::core::MonitorObject> retrieveMO (std::string objectPath, std::string objectName, long timestamp = Timestamp::Current , const core::Activity& activity = {}) = 0;
144149 /* *
145150 * \brief Look up a quality object and return it.
146151 * Look up a quality object and return it if found or nullptr if not.
@@ -149,14 +154,14 @@ class DatabaseInterface
149154 * @param activity Activity of the object
150155 * @deprecated
151156 */
152- virtual std::shared_ptr<o2::quality_control::core::QualityObject> retrieveQO (std::string qoPath, long timestamp = - 1 , const core::Activity& activity = {}) = 0;
157+ virtual std::shared_ptr<o2::quality_control::core::QualityObject> retrieveQO (std::string qoPath, long timestamp = Timestamp::Current , const core::Activity& activity = {}) = 0;
153158 /* *
154159 * \brief Look up a TimeRangeFlagCollection object and return it.
155160 * Look up a TimeRangeFlagCollection and return it if found or nullptr if not.
156161 */
157162 virtual std::shared_ptr<o2::quality_control::TimeRangeFlagCollection> retrieveTRFC (const std::string& name, const std::string& detector, int runNumber = 0 ,
158163 const std::string& passName = " " , const std::string& periodName = " " ,
159- const std::string& provenance = " " , long timestamp = - 1 ) = 0;
164+ const std::string& provenance = " " , long timestamp = Timestamp::Current ) = 0;
160165 /* *
161166 * \brief Look up an object and return it.
162167 * Look up an object and return it if found or nullptr if not. It is a raw pointer because we might need it to build a MO.
@@ -165,7 +170,7 @@ class DatabaseInterface
165170 * \param headers Map to be populated with the headers we received, if it is not null.
166171 * \param metadata filters under the form of key-value pairs to select data
167172 */
168- virtual TObject* retrieveTObject (std::string path, const std::map<std::string, std::string>& metadata, long timestamp = - 1 , std::map<std::string, std::string>* headers = nullptr ) = 0;
173+ virtual TObject* retrieveTObject (std::string path, const std::map<std::string, std::string>& metadata, long timestamp = Timestamp::Current , std::map<std::string, std::string>* headers = nullptr ) = 0;
169174
170175 /* *
171176 * \brief Look up an object and return it in JSON format.
0 commit comments