12#ifndef IOVDBSVC_CORALCRESTMANAGER_H
13#define IOVDBSVC_CORALCRESTMANAGER_H
21#include "CrestApi/CrestApiBase.h"
22#include "CrestApi/CrestRequest.h"
24#include "CoolKernel/ChannelSelection.h"
25#include "CoolKernel/ValidityKey.h"
26#include "CoolKernel/IFolder.h"
27#include <chai/Container.h>
28#include <chai/VectorContainer.h>
29#include <chai/ContainerMap.h>
43 static inline const std::string
prefix1{
"http://"};
44 static inline const std::string
prefix2 {
"https://"};
48 static std::map<std::string, std::string>
getGlobalTagMap(
const std::string & crest_path,
const std::string& globaltag);
60 std::pair<std::vector<cool::ChannelId> , std::vector<std::string>>
getChannelList();
67 std::vector<std::pair<cool::ValidityKey,std::string>>
getIovsForTag(uint64_t since, uint64_t until);
69 std::vector<coral::AttributeList>
getVectorPayload(coral::AttributeListSpecification* pSpec,
const std::string & chId);
71 coral::AttributeList
getPayload(coral::AttributeListSpecification* pSpec,
const std::string & chId);
73 std::vector<std::string>
channelIds(cool::ValidityKey since);
79 std::optional<Crest::TagDto>
m_Tag;
82 coral::AttributeList
createAttributeList(coral::AttributeListSpecification * pSpec, chai::Values& row);
83 std::pair<uint64_t,uint64_t>
getIovInterval(
const std::string& tag,
const uint64_t since,
const uint64_t until);
84 std::pair<uint64_t,uint64_t>
getSinceUntilPair(std::vector<uint64_t>& v,
const uint64_t since,
const uint64_t until);
86 std::optional<std::map<uint64_t,chai::ContainerBasePtr> >
m_chai_cont;
static std::map< std::string, std::string > getGlobalTagMap(const std::string &crest_path, const std::string &globaltag)
std::vector< std::pair< cool::ValidityKey, std::string > > getIovsForTag(uint64_t since, uint64_t until)
std::vector< std::string > channelIds(cool::ValidityKey since)
coral::AttributeList createAttributeList(coral::AttributeListSpecification *pSpec, chai::Values &row)
IOVDbNamespace::FolderType determineFolderType()
std::optional< std::map< uint64_t, chai::ContainerBasePtr > > m_chai_cont
std::vector< uint64_t > loadPayloadForHash(uint64_t since, const std::string &hash)
std::string dumpPayload(cool::ValidityKey since)
Crest::TagDto & getTagDto()
std::vector< coral::AttributeList > getVectorPayload(coral::AttributeListSpecification *pSpec, const std::string &chId)
std::optional< Crest::TagMetaDto > m_TagMeta
std::string getFolderDescription()
cool::ValidityKey m_since
std::optional< bool > m_isVectorPayload
std::optional< Crest::TagDto > m_Tag
std::string parseTypeName(const std::string &description)
CoralCrestManager(const std::string &crest_path, const std::string &crestTag)
static const std::string prefix1
std::pair< uint64_t, uint64_t > getIovInterval(const std::string &tag, const uint64_t since, const uint64_t until)
std::string getPayloadSpec()
std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > getChannelList()
coral::AttributeList getPayload(coral::AttributeListSpecification *pSpec, const std::string &chId)
std::pair< uint64_t, uint64_t > getSinceUntilPair(std::vector< uint64_t > &v, const uint64_t since, const uint64_t until)
std::unique_ptr< Crest::CrestApiBase > m_crestCl
Crest::TagInfoDto getTagInfoDto()
coral::AttributeListSpecification * getAttributeListSpec()
static const std::string prefix2
const std::string m_crestTag
void selectIov(cool::ValidityKey since)
std::string description
glabal timer - how long have I taken so far?
ModeId
Wire format of the tag's payloads, derived from the CREST tag objectType.