ATLAS Offline Software
Loading...
Searching...
No Matches
DataHeaderCnv.cxx File Reference

This file contains the implementation for the DataHeaderCnv class. More...

#include "DataHeaderCnv.h"
#include "PersistentDataModel/Placement.h"
#include "PersistentDataModel/Token.h"
#include "PersistentDataModel/TokenAddress.h"
#include "PersistentDataModelTPCnv/DataHeaderCnv_p3.h"
#include "PersistentDataModelTPCnv/DataHeaderCnv_p4.h"
#include "CoralBase/AttributeList.h"
#include "CoralBase/Attribute.h"
#include "GaudiKernel/IIncidentSvc.h"
#include "GaudiKernel/FileIncident.h"
#include "AthenaBaseComps/AthCheckMacros.h"
#include <stdexcept>
#include <format>

Go to the source code of this file.

Functions

static const pool::Guid DHForm_p6_Guid ("7BE56CEF-C866-4BEE-9348-A5F34B5F1DAD")
std::string getValForKey (const std::string &str, const std::string &key)
std::string getSWNFromStr (const std::string &str)
std::string getFILEFromStr (const std::string &str)
std::string makeKeyValStr (const std::string &key, const std::string &val)
std::string storeSWNInStr (const std::string &str)

Detailed Description

This file contains the implementation for the DataHeaderCnv class.

Author
Peter van Gemmeren gemme.nosp@m.ren@.nosp@m.anl.g.nosp@m.ov

Definition in file DataHeaderCnv.cxx.

Function Documentation

◆ DHForm_p6_Guid()

const pool::Guid DHForm_p6_Guid ( "7BE56CEF-C866-4BEE-9348-A5F34B5F1DAD" )
static

◆ getFILEFromStr()

std::string getFILEFromStr ( const std::string & str)
inline

Definition at line 182 of file DataHeaderCnv.cxx.

182{ return getValForKey(str, "[FILE="); }
std::string getValForKey(const std::string &str, const std::string &key)

◆ getSWNFromStr()

std::string getSWNFromStr ( const std::string & str)
inline

Definition at line 180 of file DataHeaderCnv.cxx.

180{ return getValForKey(str, "[SWN="); }

◆ getValForKey()

std::string getValForKey ( const std::string & str,
const std::string & key )

Definition at line 169 of file DataHeaderCnv.cxx.

170{
171 auto start = str.find(key);
172 if( start == std::string::npos )
173 return "";
174 start += key.size();
175 auto end = str.find("]", start);
176 return str.substr(start, end-start);
177}

◆ makeKeyValStr()

std::string makeKeyValStr ( const std::string & key,
const std::string & val )

Definition at line 184 of file DataHeaderCnv.cxx.

184 {
185 return std::format("[{}={}]", key, val);
186}

◆ storeSWNInStr()

std::string storeSWNInStr ( const std::string & str)
inline

Definition at line 191 of file DataHeaderCnv.cxx.

191{ return std::format("[SWN={}]", str); }