ATLAS Offline Software
Loading...
Searching...
No Matches
CoralCrestManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12#ifndef IOVDBSVC_CORALCRESTMANAGER_H
13#define IOVDBSVC_CORALCRESTMANAGER_H
14#include <string>
15#include <iostream>
16#include <map>
17#include <list>
18#include <regex>
19#include <iosfwd>
20#include <cstdint>
21#include "CrestApi/CrestApiBase.h"
22#include "CrestApi/CrestRequest.h"
23#include "FolderTypes.h"
24#include "CoolKernel/ChannelSelection.h"
25#include "CoolKernel/ValidityKey.h"
26#include "CoolKernel/IFolder.h"
27#include "CrestContainer.h"
28
30public:
31 static inline const std::string prefix1{"http://"};
32 static inline const std::string prefix2 {"https://"};
33
34 CoralCrestManager(const std::string & crest_path, const std::string & crestTag);
35
36 static std::map<std::string, std::string> getGlobalTagMap(const std::string & crest_path, const std::string& globaltag);
37
38 void loadTagInfo();
39
40 std::string getFolderDescription();
41
42 Crest::TagDto& getTagDto();
43
44 std::string getPayloadSpec();
45
47
48 std::pair<std::vector<cool::ChannelId> , std::vector<std::string>> getChannelList();
49
50 Crest::TagInfoDto getTagInfoDto();
51
52 bool isVectorPayload();
53
54 coral::AttributeListSpecification* getAttributeListSpec();
55 std::vector<std::pair<cool::ValidityKey,std::string>> getIovsForTag(uint64_t since, uint64_t until);
56 std::vector<uint64_t> loadPayloadForHash(uint64_t since,const std::string & hash);
57 std::vector<coral::AttributeList> getVectorPayload(coral::AttributeListSpecification* pSpec,const std::string & chId);
58 std::string dumpPayload(cool::ValidityKey since);
59 coral::AttributeList getPayload(coral::AttributeListSpecification* pSpec,const std::string & chId);
60 void selectIov(cool::ValidityKey since);
61 std::vector<std::string> channelIds(cool::ValidityKey since);
62
63private:
64 std::unique_ptr<Crest::CrestApiBase> m_crestCl;
65 const std::string m_crestTag;
66 std::optional<Crest::TagMetaDto> m_TagMeta;
67 std::optional<Crest::TagDto> m_Tag;
68 std::optional<bool> m_isVectorPayload;
69 std::string parseTypeName(const std::string & description);
70 coral::AttributeList createAttributeList(coral::AttributeListSpecification * pSpec,nlohmann::json& j ,const std::vector<std::pair<std::string, Crest::TypeId>> & tSpec);
71 std::pair<uint64_t,uint64_t> getIovInterval(const std::string& tag, const uint64_t since, const uint64_t until);
72 std::pair<uint64_t,uint64_t> getSinceUntilPair(std::vector<uint64_t>& v, const uint64_t since, const uint64_t until);
73 void initCrestContainer();
74 std::optional<Crest::CrestContainer> m_crest_cont;
75
76};
77#endif
Header file for CrestContainer class.
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)
IOVDbNamespace::FolderType determineFolderType()
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()
coral::AttributeList createAttributeList(coral::AttributeListSpecification *pSpec, nlohmann::json &j, const std::vector< std::pair< std::string, Crest::TypeId > > &tSpec)
std::optional< Crest::CrestContainer > m_crest_cont
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?
Definition hcg.cxx:91