lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
calib::CalibParsDBWeb Class Reference

CalibParsDB backend that fetches constants with the MDBWebUtils functions. More...

#include <CalibParsDBWeb.hh>

Inherits calib::CalibParsDB.

Public Member Functions

 CalibParsDBWeb ()
 Construct with the type name "DBWEB".
 
virtual ~CalibParsDBWeb ()
 Destructor; only logs a debug message.
 
virtual const NDArray< float > & get_ndarray_float (Query &)
 Fetch the constants selected by q with calib_constants_nda<float>() into an internal array and return it; the next call overwrites it.
 
virtual const NDArray< double > & get_ndarray_double (Query &)
 Fetch the constants selected by q with calib_constants_nda<double>() into an internal array and return it; the next call overwrites it.
 
virtual const NDArray< uint16_t > & get_ndarray_uint16 (Query &)
 Fetch the constants selected by q with calib_constants_nda<uint16_t>() into an internal array and return it; the next call overwrites it.
 
virtual const NDArray< uint32_t > & get_ndarray_uint32 (Query &)
 Fetch the constants selected by q with calib_constants_nda<uint32_t>() into an internal array and return it; the next call overwrites it.
 
virtual const std::string & get_string (Query &)
 Fetch the data selected by q with calib_constants() into an internal string (and its metadata into an internal document) and return the string.
 
virtual const rapidjson::Document & get_data (Query &)
 Log a "TBE" warning, then fetch with calib_constants_doc(): the data is parsed as JSON into an internal document, which is returned (metadata goes into another internal document).
 
virtual const rapidjson::Document & get_metadata (Query &)
 Log a "TBE" warning, then fetch only the metadata document selected by q with calib_doc() and return it.
 
 CalibParsDBWeb (const CalibParsDBWeb &)=delete
 Copy construction is disabled.
 
CalibParsDBWeb & operator= (const CalibParsDBWeb &)=delete
 Copy assignment is disabled.
 
- Public Member Functions inherited from calib::CalibParsDB
 CalibParsDB (const char *dbtypename="Default-Base-NoDB")
 Store dbtypename and log a debug message.
 
virtual ~CalibParsDB ()
 Destructor; only logs a debug message.
 
const std::string & dbtypename ()
 Return the type name given to the constructor.
 
 CalibParsDB (const CalibParsDB &)=delete
 Copy construction is disabled.
 
CalibParsDB & operator= (const CalibParsDB &)=delete
 Copy assignment is disabled.
 

Additional Inherited Members

- Protected Attributes inherited from calib::CalibParsDB
NDArray< double > _ndarray_double
 
NDArray< float > _ndarray_float
 
NDArray< uint16_t > _ndarray_uint16
 
NDArray< uint32_t > _ndarray_uint32
 
std::string _string
 
rapidjson::Document _document
 
rapidjson::Document _data
 
rapidjson::Document _metadata
 

Detailed Description

CalibParsDB backend that fetches constants with the MDBWebUtils functions.

Parameters come from the Query map: RUN and TIME_SEC are converted with std::stoi, and EXPERIMENT or VERSION equal to "NULL" are passed as NULL.

Constructor & Destructor Documentation

◆ CalibParsDBWeb() [1/2]

calib::CalibParsDBWeb::CalibParsDBWeb ( )

Construct with the type name "DBWEB".

◆ ~CalibParsDBWeb()

virtual calib::CalibParsDBWeb::~CalibParsDBWeb ( )
virtual

Destructor; only logs a debug message.

◆ CalibParsDBWeb() [2/2]

calib::CalibParsDBWeb::CalibParsDBWeb ( const CalibParsDBWeb &  )
delete

Copy construction is disabled.

Member Function Documentation

◆ get_data()

virtual const rapidjson::Document & calib::CalibParsDBWeb::get_data ( Query &  )
virtual

Log a "TBE" warning, then fetch with calib_constants_doc(): the data is parsed as JSON into an internal document, which is returned (metadata goes into another internal document).

Reimplemented from calib::CalibParsDB.

◆ get_metadata()

virtual const rapidjson::Document & calib::CalibParsDBWeb::get_metadata ( Query &  )
virtual

Log a "TBE" warning, then fetch only the metadata document selected by q with calib_doc() and return it.

Reimplemented from calib::CalibParsDB.

◆ get_ndarray_double()

virtual const NDArray< double > & calib::CalibParsDBWeb::get_ndarray_double ( Query &  )
virtual

Fetch the constants selected by q with calib_constants_nda<double>() into an internal array and return it; the next call overwrites it.

Reimplemented from calib::CalibParsDB.

◆ get_ndarray_float()

virtual const NDArray< float > & calib::CalibParsDBWeb::get_ndarray_float ( Query &  )
virtual

Fetch the constants selected by q with calib_constants_nda<float>() into an internal array and return it; the next call overwrites it.

Reimplemented from calib::CalibParsDB.

◆ get_ndarray_uint16()

virtual const NDArray< uint16_t > & calib::CalibParsDBWeb::get_ndarray_uint16 ( Query &  )
virtual

Fetch the constants selected by q with calib_constants_nda<uint16_t>() into an internal array and return it; the next call overwrites it.

Reimplemented from calib::CalibParsDB.

◆ get_ndarray_uint32()

virtual const NDArray< uint32_t > & calib::CalibParsDBWeb::get_ndarray_uint32 ( Query &  )
virtual

Fetch the constants selected by q with calib_constants_nda<uint32_t>() into an internal array and return it; the next call overwrites it.

Reimplemented from calib::CalibParsDB.

◆ get_string()

virtual const std::string & calib::CalibParsDBWeb::get_string ( Query &  )
virtual

Fetch the data selected by q with calib_constants() into an internal string (and its metadata into an internal document) and return the string.

Reimplemented from calib::CalibParsDB.

◆ operator=()

CalibParsDBWeb & calib::CalibParsDBWeb::operator= ( const CalibParsDBWeb &  )
delete

Copy assignment is disabled.


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