11#ifndef CORALUTILITIES_CHAICORALCONVERTER_H
12#define CORALUTILITIES_CHAICORALCONVERTER_H
17#include <chai/ContainerBase.h>
25 class AttributeListSpecification;
53 static coral::AttributeListSpecification*
toCoralSpec(
const chai::FieldSpec& fields);
62 static chai::FieldSpec
toFieldSpec(
const coral::AttributeListSpecification& spec);
75 static coral::AttributeList
toAttributeList(
const coral::AttributeListSpecification& spec,
76 const chai::Values& values);
85 static std::vector<coral::AttributeList>
toAttributeListVec(
const coral::AttributeListSpecification& spec,
86 const std::vector<chai::ValuesPtr>& rows);
100 static chai::ValuesPtr
toValues(chai::FieldSpecPtr fields,
const coral::AttributeList& attrList);
109 static std::vector<chai::ValuesPtr>
toValuesVec(chai::FieldSpecPtr fields,
110 const std::vector<coral::AttributeList>& rows);
129 const std::string& channelName =
"");
141 bool hasRunLumiBlockTime);
155 static unsigned int valuesSize(
const chai::Values& values);
158 static unsigned int payloadSize(
const chai::Container& container);
162 static unsigned int payloadSize(
const chai::VectorContainer& container);
std::vector< std::vector< float > > VectorContainer
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
An AttributeList represents a logical row of attributes in a metadata table.
Converts between CHAI payload containers and CORAL objects: a specification plus per-channel rows,...
static coral::AttributeList toAttributeList(const coral::AttributeListSpecification &spec, const chai::Values &values)
Convert one channel's CHAI Values to a coral::AttributeList, one attribute per field in spec order.
static unsigned int valuesSize(const chai::Values &values)
Total byte size of one channel's field values, using the same type mapping as toAttributeList().
static unsigned int payloadSize(const chai::Container &container)
Total byte size of every populated channel in a scalar payload.
static std::vector< coral::AttributeList > toAttributeListVec(const coral::AttributeListSpecification &spec, const std::vector< chai::ValuesPtr > &rows)
Convert one channel's CHAI vector-payload rows to a coral::AttributeList per row, in row order,...
static coral::AttributeListSpecification * toCoralSpec(const chai::FieldSpec &fields)
Build a coral::AttributeListSpecification from a CHAI FieldSpec, one attribute per field in field ord...
static chai::FieldSpec toFieldSpec(const coral::AttributeListSpecification &spec)
Build a chai::FieldSpec from a coral::AttributeListSpecification, one field per attribute in spec ord...
static chai::Container toContainer(const AthenaAttributeList &attrList, uint64_t channelId=0, const std::string &channelName="")
Convert an AthenaAttributeList to a single-channel chai::Container.
static std::unique_ptr< AthenaAttributeList > toAthenaAttributeList(const chai::Container &container)
Convert a chai::Container's single populated channel to an AthenaAttributeList.
static std::unique_ptr< CondAttrListCollection > toCondAttrListCollection(const chai::Container &container, bool hasRunLumiBlockTime)
Convert a chai::Container to a CondAttrListCollection, one row per populated channel.
static chai::ValuesPtr toValues(chai::FieldSpecPtr fields, const coral::AttributeList &attrList)
Convert one coral::AttributeList to CHAI Values, one value per field in FieldSpec order.
static std::vector< chai::ValuesPtr > toValuesVec(chai::FieldSpecPtr fields, const std::vector< coral::AttributeList > &rows)
Convert a coral::AttributeList per row, in row order, to CHAI Values sharing one FieldSpecPtr,...
This class is a collection of AttributeLists where each one is associated with a channel number.
storage of the time histories of all the cells