Skip to content

CalibDocMetadata

#include <xalgospp/detector/lcls2/calibdb.hh>
struct CalibDocMetadata

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:57

Retains information on calibration constants retrieved from metadata queries.

The calibration constants are stored across two different documents in MongoDB. The first document has metadata about the constants, including an id. This points to a gridfs entry that holds the bulk data. The rest of the associated metadata aids in interpreting the bulk data.

Name Kind Owner
doc_unix_ts variable Declared here
doc_run_begin variable Declared here
doc_run_end variable Declared here
data_doc_id variable Declared here
doc_type variable Declared here
consts_name variable Declared here
consts_dtype variable Declared here
consts_ndim variable Declared here
consts_nelem variable Declared here
consts_shape variable Declared here
operator< function Declared here
Return Name Description
std::uint32_t doc_unix_ts Unix timestamp for the document.
unsigned doc_run_begin The starting run of validity (for sorting)
unsigned doc_run_end The ending run of validity (for sorting)
std::string data_doc_id Pointer for bulk data gridfs lookup.
std::string doc_type The kind of constants (e.g. ndarray, string)
std::string consts_name The constants type name (pedestals, gain etc)
std::string consts_dtype The element type (e.g. if ndarray, uint8 etc.)
std::size_t consts_ndim Dimensionality of the constants.
std::size_t consts_nelem Total number of elements in the constants.
std::vector< std::size_t > consts_shape Final shape of the constants.

std::uint32_t doc_unix_ts { 0 }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:58

Unix timestamp for the document.


unsigned doc_run_begin { 0 }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:59

The starting run of validity (for sorting)


unsigned doc_run_end { 0 }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:60

The ending run of validity (for sorting)


std::string data_doc_id { "" }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:61

Pointer for bulk data gridfs lookup.


std::string doc_type { "" }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:62

The kind of constants (e.g. ndarray, string)


std::string consts_name { "" }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:63

The constants type name (pedestals, gain etc)


std::string consts_dtype { "" }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:64

The element type (e.g. if ndarray, uint8 etc.)


std::size_t consts_ndim { 0 }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:65

Dimensionality of the constants.


std::size_t consts_nelem { 0 }

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:66

Total number of elements in the constants.


std::vector< std::size_t > consts_shape

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:67

Final shape of the constants.

Return Name Description
bool operator< const inline Comparison operator for selecting the most appropriate calibration constants.

const inline

inline bool operator<(const CalibDocMetadata & other) const

Defined in src/lib/xalgospp/detector/lcls2/calibdb.hh:83

Comparison operator for selecting the most appropriate calibration constants.

From a set of calibration constants that are all valid for a given run, the following procedure is used for sorting them in order of priority:

  1. Choose the constants that have a higher beginning run validity – Presumably more recently applicable

  2. Choose the constants with lower end run validity - i.e., choose constants that are more specific.

  3. Choose the document acquired more recently in terms of Unix TS.

Whether this doc is less – for sorting in ascending order.

Parameter Type Description
other const [CalibDocMetadata](#calibdocmetadata) & The other CalibDocMetadata to compare with this one.