Bookkeeping C++ API client
Bookkeeping C++ API client that can be used to access the rest API of O2's bookkeeping system.
Public Member Functions | List of all members
bookkeeping::BookkeepingInterface Class Referenceabstract

#include <BookkeepingInterface.h>

Public Member Functions

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
 
virtual bool runEnd (int64_t runNumber, std::time_t o2End, std::time_t triggerEnd, RunQuality runQuality)=0
 Ends a run. More...
 
virtual void flpAdd (std::string flpName, std::string hostName, int64_t runNumber=-1)=0
 Adds an FLP to a run. More...
 
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. More...
 
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. More...
 
virtual std::vector< std::shared_ptr< org::openapitools::client::model::Log > > getLogs ()=0
 TODO: not working properly yet. Get the last 100 logs. More...
 
virtual std::vector< std::shared_ptr< org::openapitools::client::model::Run > > getRuns ()=0
 TODO: not working properly yet. Gets the last 100 runs. More...
 

Member Function Documentation

◆ createLog()

virtual void bookkeeping::BookkeepingInterface::createLog ( utility::string_t  text,
utility::string_t  title,
std::vector< std::int64_t >  runNumbers = {},
std::int64_t  parentLogId = -1 
)
pure virtual

Create a log.

Parameters
textLog entry that is written by the shifter
titleTitle for the log
runNumbersVector of runNumbers that the log is about
parentLogIdInteger id of the parent log
Exceptions
org::openapitools::client::api::ApiException

◆ flpAdd()

virtual void bookkeeping::BookkeepingInterface::flpAdd ( std::string  flpName,
std::string  hostName,
int64_t  runNumber = -1 
)
pure virtual

Adds an FLP to a run.

Parameters
runNumberInteger ID of a specific data taking session
flpNameIdentifying name of the FLP
hostNameHost name of the FLP
Exceptions
org::openapitools::client::api::ApiException

◆ flpUpdateCounters()

virtual void bookkeeping::BookkeepingInterface::flpUpdateCounters ( int64_t  flpId,
std::string  flpName,
int64_t  nSubtimeframes,
int64_t  nEquipmentBytes,
int64_t  nRecordingBytes,
int64_t  nFairMQBytes 
)
pure virtual

Update flp by id.

Parameters
flpIdInteger ID of a specific data taking session.
flpNameIdentifying name of the FLP.
nSubtimeframesNumber of subtimeframes processed in this FLP. Updated regularly.
nEquipmentBytesData volume out from the readout 'equipment' component in bytes. Can reach PetaBytes. Updated regularly.
nRecordingBytesData volume out from the readout 'recording' component in bytes. Can reach PetaBytes. Updated regularly.
nFairMqBytesData volume out from the readout 'fmq' component in bytes. Can reach PetaBytes. Updated regularly.
Exceptions
org::openapitools::client::api::ApiException

◆ getLogs()

virtual std::vector<std::shared_ptr<org::openapitools::client::model::Log> > bookkeeping::BookkeepingInterface::getLogs ( )
pure virtual

TODO: not working properly yet. Get the last 100 logs.

Exceptions
org::openapitools::client::api::ApiException
Returns
ArrayOfLogsResponse

◆ getRuns()

virtual std::vector<std::shared_ptr<org::openapitools::client::model::Run> > bookkeeping::BookkeepingInterface::getRuns ( )
pure virtual

TODO: not working properly yet. Gets the last 100 runs.

Exceptions
org::openapitools::client::api::ApiException
Returns
ArrayOfRunsResponse

◆ runEnd()

virtual bool bookkeeping::BookkeepingInterface::runEnd ( int64_t  runNumber,
std::time_t  o2End,
std::time_t  triggerEnd,
RunQuality  runQuality 
)
pure virtual

Ends a run.

Parameters
runNumberInteger ID of a specific data taking session
o2EndTime (UTC) when Run was completely stopped
triggerEnd(UTC) Time when Trigger subsystem was stopped
runQualityOverall quality of the data from O2 point of view
Exceptions
org::openapitools::client::api::ApiException

◆ runStart()

virtual void bookkeeping::BookkeepingInterface::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 
)
pure virtual

Starts a run

Parameters
runNumberInteger ID of a specific data taking session
o2StartTime (UTC) when command to start a new Run was given
triggerStartTime (UTC) when Trigger subsystem was started
activityIdControl ID string. Can be a long hash, 32 or 64 character long
runTypeType of run. Might be replaced by tags
nDetectorsNumber of detectors in the Run
nFlpsNumber of FLP nodes in the Run
nEpnsNumber of EPN nodes in the Run
Exceptions
org::openapitools::client::api::ApiException

The documentation for this class was generated from the following file: