Bookkeeping C++ API client
Bookkeeping C++ API client that can be used to access the rest API of O2's bookkeeping system.
BookkeepingInterface.h
Go to the documentation of this file.
1 #pragma once
2 #include <vector>
3 #include "CreateLogParameters.h"
4 #include "CreateRunParameters.h"
5 #include "GetLogsParameters.h"
6 #include "GetRunsParameters.h"
7 #include "Log.h"
8 #include "LogOrigin.h"
9 #include "LogSubtype.h"
10 #include "OrderDirection.h"
11 #include "cpprest-client/model/Run.h"
12 #include "cpprest-client/model/Log.h"
13 #include "RunType.h"
14 #include "RunQuality.h"
15 
16 #include "ApiClient.h"
17 #include "MultipartFormData.h"
18 #include "ModelBase.h"
19 
20 #include <sstream>
21 #include <limits>
22 #include <iomanip>
23 
24 namespace bookkeeping
25 {
27  {
28  public:
42  virtual void runStart(int64_t runNumber, std::time_t o2Start, std::time_t triggerStart,
43  utility::string_t activityId, RunType runType, int64_t nDetectors, int64_t nFlps, int64_t nEpns) = 0;
44 
54  virtual bool runEnd(int64_t runNumber, std::time_t o2End, std::time_t triggerEnd,
55  RunQuality runQuality) = 0;
56 
65  virtual void flpAdd(std::string flpName, std::string hostName, int64_t runNumber = -1) = 0;
66 
78  virtual void flpUpdateCounters(int64_t flpId, std::string flpName, int64_t nSubtimeframes, int64_t nEquipmentBytes,
79  int64_t nRecordingBytes, int64_t nFairMQBytes) = 0;
80 
90  virtual void createLog(utility::string_t text, utility::string_t title, std::vector<std::int64_t> runNumbers = {}, std::int64_t parentLogId = -1) = 0;
91 
97  virtual std::vector<std::shared_ptr<org::openapitools::client::model::Log>> getLogs() = 0;
98 
104  virtual std::vector<std::shared_ptr<org::openapitools::client::model::Run>> getRuns() = 0;
105  };
106 }
bookkeeping::BookkeepingInterface::runEnd
virtual bool runEnd(int64_t runNumber, std::time_t o2End, std::time_t triggerEnd, RunQuality runQuality)=0
Ends a run.
bookkeeping::BookkeepingInterface::runStart
virtual void runStart(int64_t runNumber, std::time_t o2Start, std::time_t triggerStart, utility::string_t activityId, RunType runType, int64_t nDetectors, int64_t nFlps, int64_t nEpns)=0
bookkeeping::BookkeepingInterface::getLogs
virtual std::vector< std::shared_ptr< org::openapitools::client::model::Log > > getLogs()=0
TODO: not working properly yet. Get the last 100 logs.
bookkeeping::BookkeepingInterface::createLog
virtual void createLog(utility::string_t text, utility::string_t title, std::vector< std::int64_t > runNumbers={}, std::int64_t parentLogId=-1)=0
Create a log.
bookkeeping::BookkeepingInterface::flpAdd
virtual void flpAdd(std::string flpName, std::string hostName, int64_t runNumber=-1)=0
Adds an FLP to a run.
bookkeeping::BookkeepingInterface::getRuns
virtual std::vector< std::shared_ptr< org::openapitools::client::model::Run > > getRuns()=0
TODO: not working properly yet. Gets the last 100 runs.
bookkeeping::BookkeepingInterface
Definition: BookkeepingInterface.h:26
bookkeeping::BookkeepingInterface::flpUpdateCounters
virtual void flpUpdateCounters(int64_t flpId, std::string flpName, int64_t nSubtimeframes, int64_t nEquipmentBytes, int64_t nRecordingBytes, int64_t nFairMQBytes)=0
Update flp by id.
bookkeeping
Definition: BookkeepingInterface.h:24