ATLAS Offline Software
Loading...
Searching...
No Matches
transientKey.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4 */
25
26
27#include <string>
28
29
30#ifndef SGTOOLS_TRANSIENTKEY_H
31#define SGTOOLS_TRANSIENTKEY_H
32
33
34namespace SG {
35
36
41inline bool isTransientKey (const std::string& key)
42{
43 return !key.empty() && key[0] == '_';
44}
45
46
51inline std::string transientKey (const std::string& key)
52{
53 if (isTransientKey (key)) {
54 return key;
55 }
56 return "_" + key;
57}
58
59
60
61} // namespace SG
62
63
64#endif // not SGTOOLS_TRANSIENTKEY_H
Forward declaration.
std::string transientKey(const std::string &key)
Make a key transient.
bool isTransientKey(const std::string &key)
Test to see if a key is transoent.