ATLAS Offline Software
Loading...
Searching...
No Matches
IOVDbStringFunctions.cxx File Reference
#include "IOVDbStringFunctions.h"
#include <regex>
#include <iostream>
#include <algorithm>
Include dependency graph for IOVDbStringFunctions.cxx:

Go to the source code of this file.

Namespaces

namespace  IOVDbNamespace

Functions

std::string IOVDbNamespace::spaceStrip (const std::string &input)
 Trim leading and trailing spaces,return a new trimmed string.
int IOVDbNamespace::makeChannel (const std::string &strval, const int defchan)
 Produce a channel number from the string; default to 'defchan' if empty.
unsigned long long IOVDbNamespace::iovFromTimeString (const std::string &iovString)
 Take a string integer giving a time in seconds and convert it to a ULL in nanoseconds.
unsigned long long IOVDbNamespace::iovFromRunString (const std::string &runString)
 Take a string run number and convert it to an ULL representing run<<32.
unsigned long long IOVDbNamespace::iovFromLumiBlockString (const std::string &lbString)
 String representation of lumiblock just converted to LL (as in original code) and returned as a ULL.
std::string IOVDbNamespace::sanitiseJsonString (const std::string &dataString)
 Sanitise json string, escaping raw carriage returns.
int IOVDbNamespace::parseClid (const std::string &addrHeaderStr)
 Extract the Class ID (an integer) from a string of form <addrHeader><address_header service_type="256" clid="12345" ></addrHeader>
std::string IOVDbNamespace::parseTypename (const std::string &description)
 Extract the typename from a folder description.
std::string IOVDbNamespace::deleteRegex (const std::string &original, const std::string &regex)
 Delete characters of a matching regex from the input string.
std::string IOVDbNamespace::quote (const std::string &sentence)
 Enclose a string in ".
std::string IOVDbNamespace::unescapeQuotes (const std::string &original)
std::string IOVDbNamespace::unescapeBackslash (const std::string &original)
std::string IOVDbNamespace::sanitiseFilename (const std::string &fname)
 Replace the '/' of a file path with '^'.
std::string IOVDbNamespace::sanitiseCrestTag (const std::string &fname)
 return valid CREST tag name from folder name
std::string IOVDbNamespace::replaceNULL (const std::string &possibleNULL)
 replace an uppercase NULL (such as returned by oracle) in string with a lowercase null (such as used in JSON)
std::string IOVDbNamespace::sanitiseXml (const std::string &pseudoXmlString)
 for use when converting cool folder description JSON
bool IOVDbNamespace::looksLikeMagicTag (const std::string &candidateTag)
 Looks like it should be magic.
bool IOVDbNamespace::tagIsMagic (const std::string &candidateTag)
 Resolve magic tag.
std::vector< std::string > IOVDbNamespace::parseMagicTag (const std::string &candidateTag)
 Takes a tag of form TagInfo{Major|Minor}/<tag> or TagInfo{Major|Minor}/<prefix>/<tag> and resolve it to a string vector{"Major|Minor", <prefix>, <tag>} returns an empty vector if a match is not found.
std::vector< std::string > IOVDbNamespace::parseLinkNames (const std::string &linktext)
 Parse string of format "A:X::B:C" to "A" , "X::B", "C".
std::pair< std::string, std::string > IOVDbNamespace::tag2PrefixTarget (const std::vector< std::string > &parseResult)
 Takes a vector<string> containing {"<fulltag>", "Major|Minor", "<prefix>", "<tag>"} and returns a pair of {"<prefix>", "<tag>"}.
bool IOVDbNamespace::replaceServiceType71 (std::string &addrHeader)