|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CoralBase/AttributeList.h"
10 #include "CoralBase/AttributeListSpecification.h"
11 #include "CoralBase/Attribute.h"
15 static const std::pair<cool::ValidityKey, cool::ValidityKey> infiniteIov(0,cool::ValidityKeyMax);
17 static const std::vector<coral::AttributeList> invalidVectorPayload{};
90 if (not nameExists)
return invalidPayload;
91 const cool::ChannelId
channel=chanPtr->second;
95 std::vector<coral::AttributeList>
100 std::vector<coral::AttributeList>
105 if (not nameExists)
return invalidVectorPayload;
106 const cool::ChannelId
channel=chanPtr->second;
110 const std::vector<cool::ChannelId>&
115 std::pair<cool::ValidityKey, cool::ValidityKey>
122 std::string
result(
"\"data_array\" : [");
134 for (
auto &att : vAtt){
137 if (
sep.empty())
sep =s_delimiterJson;
154 std::ostringstream
os;
155 att[0].toOutputStream(
os);
157 const std::string
sep(
" : ");
158 const auto separatorPosition =
res.find(
sep);
159 const std::string payloadOnly=
res.substr(separatorPosition+3);
bool isVectorPayload() const
coral::AttributeList getPayload(const cool::ChannelId &channelId)
std::vector< cool::ChannelId > m_channels
std::pair< cool::ValidityKey, cool::ValidityKey > m_iov
std::map< std::string, int > m_name2Channel
std::map< int, coral::AttributeList > m_payload
std::pair< std::vector< unsigned int >, bool > res
std::string to_string(const DetectorType &type)
std::string jsonAttributeList(const coral::AttributeList &atrlist)
Produce a representation of a coral::AttributeList as a json string.
void addChannelPayload(const cool::ChannelId &channelId, const std::string &name, const coral::AttributeList &payload)
std::pair< cool::ValidityKey, cool::ValidityKey > iov()
const std::vector< cool::ChannelId > & channelIds()
std::map< int, std::string > m_channel2Name
void setVectorPayloadFlag(const bool flag)
FolderType determineFolderType(const std::string &folderDescription, const std::string &spec, const std::vector< cool::ChannelId > &chans)
Determine folder type with optional check using clid service to check clid matches typename.
std::vector< coral::AttributeList > getVectorPayload(const cool::ChannelId &channelId)
std::string quote(const std::string &sentence)
Enclose a string in ".
std::map< int, std::vector< coral::AttributeList > > m_vectorPayload
std::string jsonPayload(const std::string &folderDescription, const std::string &spec)
void setIov(const std::pair< cool::ValidityKey, cool::ValidityKey > &iov)