|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef IOVDbSvc_IOVDbStringFunctions_h
8 #define IOVDbSvc_IOVDbStringFunctions_h
32 template <
class IntType>
33 std::vector<std::pair<IntType, IntType>>
35 typedef std::pair<IntType, IntType> ChanRange;
38 std::vector<ChanRange>
result;
39 std::string::size_type
index;
40 std::string rangespec, chanspec(chanspecString);
43 index=chanspec.find(
',');
44 if (
index!=std::string::npos) {
45 rangespec=chanspec.substr(0,
index);
46 chanspec=chanspec.substr(
index+1,chanspec.size());
50 if (!rangespec.empty()) {
52 std::string::size_type
icol=rangespec.find(
':');
54 if (
icol!=std::string::npos) {
66 }
while (
index!=std::string::npos);
86 parseClid(
const std::string & addrHeaderStr);
98 quote(
const std::string & sentence);
132 std::vector<std::string>
138 std::pair<std::string, std::string>
150 std::vector<std::string>
std::string spaceStrip(const std::string &input)
Trim leading and trailing spaces,return a new trimmed string.
std::vector< std::string > parseMagicTag(const std::string &v)
Takes a tag of form TagInfo{Major|Minor}/<tag> or TagInfo{Major|Minor}/<prefix>/<tag> and resolve it ...
std::pair< std::string, std::string > tag2PrefixTarget(const std::vector< std::string > &tagParseResults)
Takes a vector<string> containing {"<fulltag>", "Major|Minor", "<prefix>", "<tag>"} and returns a pai...
std::string deleteRegex(const std::string &original, const std::string ®ex)
Delete characters of a matching regex from the input string.
std::string sanitiseJsonString(const std::string &dataString)
Sanitise json string, escaping raw carriage returns.
unsigned long long iovFromTimeString(const std::string &iovString)
Take a string integer giving a time in seconds and convert it to a ULL in nanoseconds.
std::vector< std::string > parseLinkNames(const std::string &linktext)
Parse string of format "A:X::B:C" to "A" , "X::B", "C".
bool replaceServiceType71(std::string &addrHeader)
std::string sanitiseCrestTag(const std::string &fname)
return valid CREST tag name from folder name
The Athena Transient Store API.
unsigned long long iovFromLumiBlockString(const std::string &lbString)
String representation of lumiblock just converted to LL (as in original code) and returned as a ULL.
std::string parseTypename(const std::string &description)
Extract the typename from a folder description.
std::string unescapeBackslash(const std::string &original)
std::string sanitiseFilename(const std::string &fname)
Replace the '/' of a file path with '^'.
dictionary defaults
This includes now the top quark, the leptons and the bosons.
std::string replaceNULL(const std::string &possibleNULL)
replace an uppercase NULL (such as returned by oracle) in string with a lowercase null (such as used ...
bool tagIsMagic(const std::string &candidateTag)
Resolve magic tag.
std::string unescapeQuotes(const std::string &original)
=============================================================================
bool looksLikeMagicTag(const std::string &candidateTag)
Looks like it should be magic.
std::string quote(const std::string &sentence)
Enclose a string in ".
std::string sanitiseXml(const std::string &pseudoXmlString)
for use when converting cool folder description JSON
int parseClid(const std::string &addrHeaderStr)
Extract the Class ID (an integer) from a string of form <addrHeader><address_header service_type="256...
std::vector< std::pair< IntType, IntType > > parseChannelSpec(const std::string &chanspecString)
Parse a channel specification string of the format ":3, 65:67,100:120, 130: " into a vector of pairs.
cool::ChannelId makeChannel(const std::string &strval, const cool::ChannelId defchan)
Create a ChannelId from a string; if string is empty, return the default channel number given.
std::string description
glabal timer - how long have I taken so far?
unsigned long long iovFromRunString(const std::string &runString)
Take a string run number and convert it to an ULL representing run<<32.