ATLAS Offline Software
Classes | Typedefs | Enumerations | Functions | Variables
IOVDbNamespace Namespace Reference

Classes

class  BasicFolder
 
class  Cool2Json
 
class  CrestFunctions
 
class  FMDReadLock
 
class  IovStore
 
class  Json2Cool
 Produces cool objects from their JSON representation, storing them in a 'BasicFolder'. More...
 
class  ReadFromFileMetaData
 
class  SafeReadFromFileMetaData
 

Typedefs

typedef std::pair< std::string, std::string > IovHashPair
 

Enumerations

enum  FolderType {
  UNKNOWN =-1, AttrList =0, AttrListColl, PoolRef,
  PoolRefColl, CoraCool, CoolVector, JSON,
  NUM_FOLDER_TYPES
}
 

Functions

std::string base64Encode (const coral::Blob &blob)
 
coral::Blob base64Decode (const std::string &base64String)
 
std::ostream & operator<< (std::ostream &o, const Cool2Json &c)
 
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. More...
 
FolderType determineFolderType (const cool::IFolderPtr &pFolder, IClassIDSvc *clidsvc=nullptr)
 Determine folder type with optional check using clid service to check clid matches typename. More...
 
FolderType determineFolderType (const CondAttrListCollection *pAttrListColl)
 Determine folder type using the CondAttrListCollection pointer. More...
 
FolderType determineFolderType (const CondAttrListCollection &pAttrListColl)
 Determine folder typeusing the CondAttrListCollection reference. More...
 
FolderType determineFolderType (const coral::AttributeSpecification &spec)
 Determine folder type using the coral::AttributeSpecification. More...
 
bool poolCompatible (const cool::IRecordSpecification &rspec)
 Is the folder type compatible with Pool storage type? More...
 
bool poolCompatible (const std::string &specString)
 
bool poolCompatible (const CondAttrListCollection *pAttrListColl)
 
bool poolCompatible (const CondAttrListCollection &attrListColl)
 
std::string folderTypeName (const FolderType f)
 Give a string name for the folder type. More...
 
const coral::AttributeListSpecification & attrList2Spec (const coral::AttributeList &atrlist)
 return the AttributeListSpecification of an AttributeList More...
 
unsigned int attributeSize (const coral::Attribute &attribute)
 return the size (in bytes) of an Attribute More...
 
bool typeSizeIsKnown (const coral::Attribute &attribute)
 Return a bool indicating whether the size of a given Attribute can be determined. More...
 
unsigned int attributeListSize (const coral::AttributeList &atrlist)
 return the size (in bytes) of an AttributeList More...
 
int countSelectedChannels (const std::vector< cool::ChannelId > &channels, const cool::ChannelSelection &selected)
 Count the number of selected channels in a vector of channels according to cool::Channel selection. More...
 
IOVTime makeEpochOrRunLumi (const cool::ValidityKey key, const bool timeIsEpoch)
 Create an IOVTime in ns of epoch or run-lumi (determined by the bool) from a ValidityKey. More...
 
unsigned long long iovTimeFromSeconds (const unsigned long long seconds)
 Create a long long time in ns from s. More...
 
unsigned long long iovTimeFromRunLumi (const unsigned long long run, const unsigned long long lumi=0)
 Create a long long representing the IOV from run, lumi. More...
 
std::pair< unsigned long long, unsigned long long > runLumiFromIovTime (const unsigned long long iovTime)
 Return a [run,lumi] pair from an IOV time. More...
 
IOVRange makeRange (const cool::ValidityKey since, const cool::ValidityKey until, const bool timeIsEpoch)
 Make an IOVRange from two validity keys. More...
 
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. More...
 
std::pair< bool, std::string > folderMetadata (IOVDbConn *pConnection, const std::string &folderName)
 Retrieve (bool) multiversion flag and folder description
More...
 
std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > channelList (IOVDbConn *pConnection, const std::string &folderName, const bool named=false)
 Retrieve channel information. More...
 
template<class NumericType >
bool inRange (const NumericType &val, const std::pair< NumericType, NumericType > &range)
 Function to check whether a number is in the inclusive range, given as a pair. More...
 
template<class NumericType >
bool inRange (const NumericType &val, const std::vector< std::pair< NumericType, NumericType > > &ranges)
 
std::string jsonAttribute (const coral::Attribute &)
 Produce a representation of a coral::Attribute as a json string. More...
 
std::string jsonAttributeList (const coral::AttributeList &)
 Produce a representation of a coral::AttributeList as a json string. More...
 
std::string spaceStrip (const std::string &input)
 Trim leading and trailing spaces,return a new trimmed string. More...
 
int makeChannel (const std::string &strval, const int defchan)
 Produce a channel number from the string; default to 'defchan' if empty. More...
 
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. More...
 
unsigned long long iovFromRunString (const std::string &runString)
 Take a string run number and convert it to an ULL representing run<<32. More...
 
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. More...
 
std::string sanitiseJsonString (const std::string &dataString)
 Sanitise json string, escaping raw carriage returns. More...
 
int 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> More...
 
std::string parseTypename (const std::string &description)
 Extract the typename from a folder description. More...
 
std::string deleteRegex (const std::string &original, const std::string &regex)
 Delete characters of a matching regex from the input string. More...
 
std::string quote (const std::string &sentence)
 Enclose a string in ". More...
 
std::string unescapeQuotes (const std::string &original)
 
std::string unescapeBackslash (const std::string &original)
 
std::string sanitiseFilename (const std::string &fname)
 Replace the '/' of a file path with '^'. More...
 
std::string sanitiseCrestTag (const std::string &fname)
 return valid CREST tag name from folder name More...
 
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 in JSON) More...
 
std::string sanitiseXml (const std::string &pseudoXmlString)
 for use when converting cool folder description JSON More...
 
bool looksLikeMagicTag (const std::string &candidateTag)
 Looks like it should be magic. More...
 
bool tagIsMagic (const std::string &candidateTag)
 Resolve magic tag. More...
 
std::vector< std::string > 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. More...
 
std::vector< std::string > parseLinkNames (const std::string &linktext)
 Parse string of format "A:X::B:C" to "A" , "X::B", "C". More...
 
std::pair< std::string, std::string > tag2PrefixTarget (const std::vector< std::string > &parseResult)
 Takes a vector<string> containing {"<fulltag>", "Major|Minor", "<prefix>", "<tag>"} and returns a pair of {"<prefix>", "<tag>"}. More...
 
bool replaceServiceType71 (std::string &addrHeader)
 
template<class IntType >
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. More...
 
std::string getTagInfo (const std::string &tag, const ITagInfoMgr *tagInfoMgr)
 Retrieve the TagInfo. More...
 
std::string getGeoAtlasVersion ()
 Get the GeoAtlas version directly from GeoModelSvc. More...
 
std::optional< bool > checkTagLock (const cool::IFolderPtr &fptr, const std::string &tag)
 Check whether a tag is locked on a folder, if possible. More...
 
std::string resolveUsingTagInfo (const std::string &tag, const ITagInfoMgr *tagInfoMgr)
 

Variables

constexpr unsigned long long ALL_LUMI_BLOCKS {0xFFFFFFFF}
 All the lumi blocks in one run. More...
 

Typedef Documentation

◆ IovHashPair

typedef std::pair<std::string,std::string> IOVDbNamespace::IovHashPair

Definition at line 28 of file CrestFunctions.h.

Enumeration Type Documentation

◆ FolderType

Enumerator
UNKNOWN 
AttrList 
AttrListColl 
PoolRef 
PoolRefColl 
CoraCool 
CoolVector 
JSON 
NUM_FOLDER_TYPES 

Definition at line 26 of file FolderTypes.h.

26  {
27  UNKNOWN=-1,
28  AttrList=0,
30  PoolRef,
32  CoraCool,
33  CoolVector,
34  JSON,
36  };

Function Documentation

◆ attributeListSize()

unsigned int IOVDbNamespace::attributeListSize ( const coral::AttributeList &  atrlist)

return the size (in bytes) of an AttributeList

Definition at line 72 of file IOVDbCoolFunctions.cxx.

72  {
73  unsigned int total{};
74  for (const auto & attribute:atrlist){
75  total+=IOVDbNamespace::attributeSize(attribute);
76  }
77  return total;
78  }

◆ attributeSize()

unsigned int IOVDbNamespace::attributeSize ( const coral::Attribute &  attribute)

return the size (in bytes) of an Attribute

Definition at line 57 of file IOVDbCoolFunctions.cxx.

57  {
58  const auto & spec{attribute.specification()};
59  try{
60  return sizeFunctions.at(std::type_index(spec.type()))(attribute);
61  }catch (const std::out_of_range& oor) {
62  return 0;
63  }
64  }

◆ attrList2Spec()

const coral::AttributeListSpecification & IOVDbNamespace::attrList2Spec ( const coral::AttributeList &  atrlist)

return the AttributeListSpecification of an AttributeList

Definition at line 52 of file IOVDbCoolFunctions.cxx.

52  {
53  return atrlist.specification();
54  }

◆ base64Decode()

coral::Blob IOVDbNamespace::base64Decode ( const std::string &  base64String)

Definition at line 26 of file Base64Codec.cxx.

26  {
27  const auto &charVec = CxxUtils::base64_decode(base64String);
28  coral::Blob blob(charVec.size());
29  memcpy(blob.startingAddress(), charVec.data(), charVec.size());
30  return blob;
31  }

◆ base64Encode()

std::string IOVDbNamespace::base64Encode ( const coral::Blob &  blob)

Definition at line 18 of file Base64Codec.cxx.

18  {
19  //Blob::startingAddress returns a const void *, so cast to byte size
20  const auto *const address = static_cast<const unsigned char *>(blob.startingAddress());
21  const unsigned int nBytes = blob.size();
22  return CxxUtils::base64_encode(address, nBytes);
23  }

◆ channelList()

std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > IOVDbNamespace::channelList ( IOVDbConn pConnection,
const std::string &  folderName,
const bool  named 
)

Retrieve channel information.

Definition at line 160 of file IOVDbCoolFunctions.cxx.

160  {
161  std::vector<cool::ChannelId> channelNumbers;
162  std::vector<std::string> channelNames;
163  //
164  cool::IDatabasePtr dbPtr=pConnection->getCoolDb();
165  // get folder and read information
166  if (!dbPtr->existsFolder(folderName)) {
167  throw std::runtime_error( "Folder " + folderName + " does not exist" );
168  }
169  cool::IFolderPtr fldPtr=dbPtr->getFolder(folderName);
170  if (named) {
171  typedef std::map<cool::ChannelId,std::string> ChanMap_t;
172  const ChanMap_t & chanmap=fldPtr->listChannelsWithNames();
173  channelNumbers.reserve(chanmap.size());
174  channelNames.reserve(chanmap.size());
175  auto unzipElement = [&](const ChanMap_t::value_type & element){
176  channelNumbers.push_back(element.first);
177  channelNames.push_back(element.second);
178  };
179  std::for_each(chanmap.begin(), chanmap.end(),unzipElement);
180  } else {
181  channelNumbers=fldPtr->listChannels();
182  }
183  return std::make_pair(std::move(channelNumbers), std::move(channelNames));
184  }

◆ checkTagLock()

std::optional< bool > IOVDbNamespace::checkTagLock ( const cool::IFolderPtr &  fptr,
const std::string &  tag 
)

Check whether a tag is locked on a folder, if possible.

Definition at line 43 of file TagFunctions.cxx.

43  {
44  try {
45  return (fptr->tagLockStatus(tag)==cool::HvsTagLock::LOCKED);
46  } catch (cool::Exception& e) {
47  //dont do anything, but...
48  }
49  //...return a null object
50  return std::nullopt;
51  }

◆ countSelectedChannels()

int IOVDbNamespace::countSelectedChannels ( const std::vector< cool::ChannelId > &  channels,
const cool::ChannelSelection &  selected 
)

Count the number of selected channels in a vector of channels according to cool::Channel selection.

Definition at line 81 of file IOVDbCoolFunctions.cxx.

81  {
82  auto isSelected = [& selected](cool::ChannelId id){return selected.inSelection(id);};
83  return std::count_if(channels.begin(), channels.end(),isSelected);//return type of count_if is signed
84  }

◆ deleteRegex()

std::string IOVDbNamespace::deleteRegex ( const std::string &  original,
const std::string &  regex 
)

Delete characters of a matching regex from the input string.

Definition at line 79 of file IOVDbStringFunctions.cxx.

79  {
80  const std::regex delre(regex);
81  return std::regex_replace(original,delre,"");
82  }

◆ determineFolderType() [1/5]

FolderType IOVDbNamespace::determineFolderType ( const CondAttrListCollection attrListColl)

Determine folder typeusing the CondAttrListCollection reference.

Definition at line 74 of file FolderTypes.cxx.

74  {
75  FolderType ftype(AttrList);
76  //has a single magic channel?
77  if (attrListColl.size()==1 && attrListColl.begin()->first==0xFFFF) {
78  if (poolCompatible (attrListColl)) return PoolRef;
79  return AttrList;
80  } else {
81  ftype=AttrListColl;
82  if ( attrListColl.size()>0) {
83  if (poolCompatible(attrListColl)) return PoolRefColl;
84  }
85  }
86  return ftype;
87  }

◆ determineFolderType() [2/5]

FolderType IOVDbNamespace::determineFolderType ( const CondAttrListCollection pAttrListColl)

Determine folder type using the CondAttrListCollection pointer.

Definition at line 57 of file FolderTypes.cxx.

57  {
58  FolderType ftype(AttrList);
59  //has a single magic channel?
60  if (pAttrListColl->size()==1 && pAttrListColl->begin()->first==0xFFFF) {
61  if (poolCompatible (pAttrListColl)) return PoolRef;
62  return AttrList;
63  } else {
64  ftype=AttrListColl;
65  if ( pAttrListColl->size()>0) {
66  if (poolCompatible(pAttrListColl)) return PoolRefColl;
67  }
68  }
69  return ftype;
70  }

◆ determineFolderType() [3/5]

FolderType IOVDbNamespace::determineFolderType ( const cool::IFolderPtr &  pFolder,
IClassIDSvc *   
)

Determine folder type with optional check using clid service to check clid matches typename.

Definition at line 36 of file FolderTypes.cxx.

36  {
37  const auto & folderDescription = pFolder->description();
38  //If you find a coracool tag, it is unambiguously a coracool folder
39  if (folderDescription.find("<coracool>") != std::string::npos) return CoraCool;
40  const std::string typeName = parseTypename(folderDescription);
41  //if the type is CondAttrListVec, and yet it is not a CoraCool, it must be a CoolVector
42  if (typeName=="CondAttrListVec") return CoolVector;
43  //check if the payload spec is compatible with a pool ref/pool ref collection
44  if (poolCompatible(pFolder->payloadSpecification())){
45  const auto & chans=pFolder->listChannels();
46  const auto nchans = chans.size();
47  const bool onlyOneSpecialChannel = ((nchans == 1) and (chans[0] == 0));
48  return onlyOneSpecialChannel ? PoolRef : PoolRefColl;
49  }
50  if (typeName == "CondAttrListCollection") return AttrListColl;
51  //defaults to AttrList
52  return AttrList;
53  }

◆ determineFolderType() [4/5]

FolderType IOVDbNamespace::determineFolderType ( const coral::AttributeSpecification &  spec)

Determine folder type using the coral::AttributeSpecification.

Definition at line 90 of file FolderTypes.cxx.

90  {
92  if (spec.name()=="PoolRef" && spec.typeName()=="string") result = PoolRef;
93  return result;
94  }

◆ determineFolderType() [5/5]

FolderType IOVDbNamespace::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.

Definition at line 17 of file FolderTypes.cxx.

17  {
18  //If you find a coracool tag, it is unambiguously a coracool folder
19  if (folderDescription.find("<coracool>") != std::string::npos) return CoraCool;
20  const std::string typeName = parseTypename(folderDescription);
21  //if the type is CondAttrListVec, and yet it is not a CoraCool, it must be a CoolVector
22  if (typeName=="CondAttrListVec") return CoolVector;
23  //check if the payload spec is compatible with a pool ref/pool ref collection
24  if (poolCompatible(spec)){
25  const auto nchans = chans.size();
26  const bool onlyOneSpecialChannel = ((nchans == 1) and (chans[0] == 0));
27  return onlyOneSpecialChannel ? PoolRef : PoolRefColl;
28  }
29  if (typeName == "CondAttrListCollection") return AttrListColl;
30  //defaults to AttrList
31  return AttrList;
32  }

◆ folderMetadata()

std::pair< bool, std::string > IOVDbNamespace::folderMetadata ( IOVDbConn pConnection,
const std::string &  folderName 
)

Retrieve (bool) multiversion flag and folder description

Definition at line 136 of file IOVDbCoolFunctions.cxx.

136  {
137  bool multiversion{};
138  std::string folderdesc{};
139  // folder being read from COOL
140  // get COOL database - will wake up connection on first access
141  cool::IDatabasePtr dbPtr=pConnection->getCoolDb();
142  if (not dbPtr.get()) {
143  throw std::runtime_error( "Conditions database connection " + pConnection->name() + " cannot be opened - STOP" );
144  }
145  // get folder and read information
146  if (!dbPtr->existsFolder(folderName)) {
147  throw std::runtime_error( "Folder " + folderName + " does not exist" );
148  }
149  cool::IFolderPtr fldPtr=dbPtr->getFolder(folderName);
150  // get versiontype of folder
151  multiversion=(fldPtr->versioningMode()==cool::FolderVersioning::MULTI_VERSION);
152  // read and process description string
153  folderdesc=fldPtr->description();
154  return std::make_pair(multiversion, std::move(folderdesc));
155  }

◆ folderTypeName()

std::string IOVDbNamespace::folderTypeName ( const FolderType  f)

Give a string name for the folder type.

Definition at line 135 of file FolderTypes.cxx.

135  {
136  static const std::vector<std::string> names{"AttrList", "AttrListColl", "PoolRef",
137  "PoolRefColl", "CoraCool", "CoolVector", "JSON"};
138  if (f==UNKNOWN) return "Unknown";
139  return names[f];
140  }

◆ getGeoAtlasVersion()

std::string IOVDbNamespace::getGeoAtlasVersion ( )

Get the GeoAtlas version directly from GeoModelSvc.

Definition at line 33 of file TagFunctions.cxx.

33  {
34  SmartIF<IGeoModelSvc> geomodel{Gaudi::svcLocator()->service("GeoModelSvc")};
35  if (not geomodel) {
36  throw std::runtime_error("The GeoModelSvc could not be retrieved in TagFunctions.cxx getGeoAtlasVersion()");
37  } else {
38  return geomodel->atlasVersion();
39  }
40  }

◆ getTagInfo()

std::string IOVDbNamespace::getTagInfo ( const std::string &  tag,
const ITagInfoMgr tagInfoMgr 
)

Retrieve the TagInfo.

Definition at line 21 of file TagFunctions.cxx.

21  {
22  std::string result{};
23  enum ResultIndices{WHOLETAG, MAJMIN, PATH1, PATH2, SIZEWITHPREFIX};
25  if (results.empty()) return result;
27  std::string tagval = tagInfoMgr->findTag(target);
28  if (not tagval.empty()) result=prefix+tagval;
29  return result;
30  }

◆ inRange() [1/2]

template<class NumericType >
bool IOVDbNamespace::inRange ( const NumericType &  val,
const std::pair< NumericType, NumericType > &  range 
)

Function to check whether a number is in the inclusive range, given as a pair.

Typically used with Channel ranges for COOL

Definition at line 42 of file IOVDbCoolFunctions.h.

42  {
43  return (val>=range.first && val<=range.second);
44  }

◆ inRange() [2/2]

template<class NumericType >
bool IOVDbNamespace::inRange ( const NumericType &  val,
const std::vector< std::pair< NumericType, NumericType > > &  ranges 
)

Definition at line 48 of file IOVDbCoolFunctions.h.

48  {
49  auto valueInRange=[val](const std::pair<NumericType, NumericType> & range){ return inRange(val,range); };
50  return std::any_of(ranges.begin(), ranges.end(), valueInRange);
51  }

◆ iovFromLumiBlockString()

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.

Definition at line 45 of file IOVDbStringFunctions.cxx.

45  {
46  if (lbString.empty()) return 0LL;
47  unsigned long long lb=std::stoll(lbString.c_str());
48  return lb;
49  }

◆ iovFromRunString()

unsigned long long IOVDbNamespace::iovFromRunString ( const std::string &  runString)

Take a string run number and convert it to an ULL representing run<<32.

Definition at line 38 of file IOVDbStringFunctions.cxx.

38  {
39  if (runString.empty()) return 0LL;
40  unsigned long long run=std::stoi(runString);
41  return run<<32LL;
42  }

◆ iovFromTimeString()

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.

Definition at line 31 of file IOVDbStringFunctions.cxx.

31  {
32  if (iovString.empty()) return 0LL;
33  unsigned long long time=std::stoi(iovString);
34  return time*1000000000LL;
35  }

◆ iovTimeFromRunLumi()

unsigned long long IOVDbNamespace::iovTimeFromRunLumi ( const unsigned long long  run,
const unsigned long long  lumi 
)

Create a long long representing the IOV from run, lumi.

Definition at line 103 of file IOVDbCoolFunctions.cxx.

103  {
104  return (run<<32) + lumi;
105  }

◆ iovTimeFromSeconds()

unsigned long long IOVDbNamespace::iovTimeFromSeconds ( const unsigned long long  seconds)

Create a long long time in ns from s.

Definition at line 98 of file IOVDbCoolFunctions.cxx.

98  {
99  return seconds*1000000000LL;
100  }

◆ jsonAttribute()

std::string IOVDbNamespace::jsonAttribute ( const coral::Attribute &  attr)

Produce a representation of a coral::Attribute as a json string.

Definition at line 15 of file IOVDbJsonStringFunctions.cxx.

15  {
16  std::ostringstream os;
17  attr.toOutputStream(os);
18  const std::string native=os.str();
19  const bool stringPayload=(native.find(" (string) ") != std::string::npos);
20  const bool blobPayload=(native.find(" (blob) ") != std::string::npos);
21  //take away anything between brackets in the original
22  const std::string regex=R"delim( \‍(.*\))delim";
23  const std::string deleted= deleteRegex(native,regex);
24  const std::string sep(" : ");
25  const auto separatorPosition = deleted.find(sep);
26  const std::string payloadOnly=deleted.substr(separatorPosition+3);
27  if (stringPayload) return quote(sanitiseJsonString(payloadOnly));
28  if (blobPayload){
29  return quote(IOVDbNamespace::base64Encode(attr.data<coral::Blob>()));
30  }
31  std::string result(payloadOnly);
32  if (result=="NULL"){
33  result="null";
34  }
35 
36  return result;
37  }

◆ jsonAttributeList()

std::string IOVDbNamespace::jsonAttributeList ( const coral::AttributeList &  atrlist)

Produce a representation of a coral::AttributeList as a json string.

Definition at line 40 of file IOVDbJsonStringFunctions.cxx.

40  {
41  std::string os("[");
42  const unsigned int nelement=atrlist.size();
43  std::string delimiter(" ");
44  for (unsigned int i(0);i!=nelement;++i){
45  if (i==1) delimiter = s_delimiterJson;
46  os+=delimiter;
47  os+=jsonAttribute(atrlist[i]);
48  }
49  os+="]";
50  return os;
51  }

◆ looksLikeMagicTag()

bool IOVDbNamespace::looksLikeMagicTag ( const std::string &  candidateTag)

Looks like it should be magic.

Definition at line 151 of file IOVDbStringFunctions.cxx.

151  {
152  return (candidateTag.compare(0,7, "TagInfo")==0 and
153  candidateTag.find('/')!=std::string::npos);
154  }

◆ makeChannel() [1/2]

cool::ChannelId IOVDbNamespace::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.

Definition at line 128 of file IOVDbCoolFunctions.cxx.

128  {
129  // construct a cool channelId from the string value (numeric)
130  // if empty, use the default value
131  if (not strval.empty()) return std::stol(strval);
132  return defchan;
133  }

◆ makeChannel() [2/2]

int IOVDbNamespace::makeChannel ( const std::string &  strval,
const int  defchan 
)

Produce a channel number from the string; default to 'defchan' if empty.

Definition at line 23 of file IOVDbStringFunctions.cxx.

23  {
24  // construct a cool channelId from the string value (numeric)
25  // if empty, use the default value
26  if (!strval.empty()) return std::stoi(strval);
27  return defchan;
28  }

◆ makeEpochOrRunLumi()

IOVTime IOVDbNamespace::makeEpochOrRunLumi ( const cool::ValidityKey  key,
const bool  timeIsEpoch 
)

Create an IOVTime in ns of epoch or run-lumi (determined by the bool) from a ValidityKey.

Definition at line 87 of file IOVDbCoolFunctions.cxx.

87  {
88  IOVTime time;
89  if(timeIsEpoch){
90  time.setTimestamp(key);
91  } else {
92  time.setRETime(key);
93  }
94  return time;
95  }

◆ makeRange()

IOVRange IOVDbNamespace::makeRange ( const cool::ValidityKey  since,
const cool::ValidityKey  until,
const bool  timeIsEpoch 
)

Make an IOVRange from two validity keys.

Definition at line 113 of file IOVDbCoolFunctions.cxx.

113  {
114  // make an IOVRange object corresponding to given interval
115  // dealing with timestamp/RunLB differences
116  IOVTime itsince,ituntil;
117  if (timeIsEpoch) {
118  itsince.setTimestamp(since);
119  ituntil.setTimestamp(until);
120  } else {
121  itsince.setRETime(since);
122  ituntil.setRETime(until);
123  }
124  return IOVRange(itsince,ituntil);
125  }

◆ operator<<()

std::ostream & IOVDbNamespace::operator<< ( std::ostream &  o,
const Cool2Json c 
)

Definition at line 201 of file Cool2Json.cxx.

201  {
202  o << c.description() << std::endl;
203  return o;
204  }

◆ parseChannelSpec()

template<class IntType >
std::vector<std::pair<IntType, IntType> > IOVDbNamespace::parseChannelSpec ( const std::string &  chanspecString)

Parse a channel specification string of the format ":3, 65:67,100:120, 130: " into a vector of pairs.

Definition at line 34 of file IOVDbStringFunctions.h.

34  {
35  typedef std::pair<IntType, IntType> ChanRange;
36  const auto defaults=ChanRange(0,std::numeric_limits<IntType>::max());
37  //
38  std::vector<ChanRange> result;
39  std::string::size_type index;
40  std::string rangespec, chanspec(chanspecString);
41  bool first=true;
42  do {
43  index=chanspec.find(',');
44  if (index!=std::string::npos) {
45  rangespec=chanspec.substr(0,index);
46  chanspec=chanspec.substr(index+1,chanspec.size());
47  } else {
48  rangespec=chanspec;
49  }
50  if (!rangespec.empty()) {
51  // parse the range specification, look for : separator between limits
52  std::string::size_type icol=rangespec.find(':');
53  int lower,upper;
54  if (icol!=std::string::npos) {
55  lower=makeChannel(spaceStrip(rangespec.substr(0,icol)),defaults.first);
56  upper=makeChannel(spaceStrip(rangespec.substr(icol+1,rangespec.size())),defaults.second);
57  } else {
58  lower=atol(spaceStrip(rangespec).c_str());
59  upper=lower;
60  }
61  if (first) {
62  first=false;
63  }
64  result.push_back(ChanRange(lower,upper));
65  }
66  } while (index!=std::string::npos);
67  return result;
68  }

◆ parseClid()

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>

Definition at line 59 of file IOVDbStringFunctions.cxx.

59  {
60  //string of form
61  //<addrHeader><address_header service_type="256" clid="12345" /></addrHeader>
62  std::string regex=R"delim(clid\s*=\s*"([0-9]*)")delim";
64  std::smatch clidMatch;
65  bool match=std::regex_search(addrHeaderStr, clidMatch,re);
66  return (match) ? std::stoi(clidMatch[1]) : -1;
67  }

◆ parseLinkNames()

std::vector< std::string > IOVDbNamespace::parseLinkNames ( const std::string &  linktext)

Parse string of format "A:X::B:C" to "A" , "X::B", "C".

Definition at line 178 of file IOVDbStringFunctions.cxx.

178  {
179  std::vector<std::string> v{};
180  if (linktext.empty()) return v;
181  //regex:
182  //(anything except colon, multiple times) then _possibly_ (two colons and string of anything except colons)
183  // anything except colon) then (colon or end-of-line)
184  const std::string linkRegexStr{"([^:]*(::[^:]*)?)(:|$)"};
185  std::regex linkMatchSpec(linkRegexStr);
186  //give a token iterator using the regex and returning the first substring (i.e. the
187  //bit before a single colon or line end, which would be for example "ALink" or "MyContext::AnotherLink" )
188  std::sregex_token_iterator pos(linktext.cbegin(), linktext.cend(),linkMatchSpec,{1});
189  std::sregex_token_iterator e;
190  for (;pos!=e;++pos) {
191  // the resulting text _should not_ contain spaces, but strip it to be sure.
192  if (not pos->str().empty()) v.push_back(spaceStrip(pos->str()));
193  }
194  return v;
195  }

◆ parseMagicTag()

std::vector< std::string > IOVDbNamespace::parseMagicTag ( const std::string &  v)

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.

Definition at line 164 of file IOVDbStringFunctions.cxx.

164  {
165  std::vector<std::string> result;
166  std::string regex7=R"delim(TagInfo(Major|Minor)/([^/]*)/?([^/]*)?)delim";
167  std::regex matchmagic(regex7);
168  std::smatch x;
169  bool foundmagic=std::regex_match(v,x,matchmagic);
170  if (foundmagic){
171  for (const auto & i:x)
172  if (i!="") result.push_back(i);
173  }
174  return result;
175  }

◆ parseTypename()

std::string IOVDbNamespace::parseTypename ( const std::string &  description)

Extract the typename from a folder description.

Definition at line 70 of file IOVDbStringFunctions.cxx.

70  {
71  std::string regex=R"delim(<typeName>\s*([^\s]+)\s*</typeName>)delim";
73  std::smatch typeMatch;
74  bool match=std::regex_search(description, typeMatch,re);
75  return (match) ? std::string(typeMatch[1]) : std::string("");
76  }

◆ poolCompatible() [1/4]

bool IOVDbNamespace::poolCompatible ( const CondAttrListCollection attrListColl)

Definition at line 128 of file FolderTypes.cxx.

128  {
129  const coral::AttributeList& payload1=attrListColl.begin()->second;
130  const coral::AttributeSpecification& spec=payload1[0].specification();
131  return (spec.name()=="PoolRef" && spec.typeName()=="string");
132  }

◆ poolCompatible() [2/4]

bool IOVDbNamespace::poolCompatible ( const CondAttrListCollection pAttrListColl)

Definition at line 121 of file FolderTypes.cxx.

121  {
122  const coral::AttributeList& payload1=pAttrListColl->begin()->second;
123  const coral::AttributeSpecification& spec=payload1[0].specification();
124  return (spec.name()=="PoolRef" && spec.typeName()=="string");
125  }

◆ poolCompatible() [3/4]

bool IOVDbNamespace::poolCompatible ( const cool::IRecordSpecification &  rspec)

Is the folder type compatible with Pool storage type?

Definition at line 97 of file FolderTypes.cxx.

97  {
98  return (rspec.exists("PoolRef") && rspec[0].name()=="PoolRef" &&
99  rspec[0].storageType()==cool::StorageType::String4k);
100  }

◆ poolCompatible() [4/4]

bool IOVDbNamespace::poolCompatible ( const std::string &  specString)

Definition at line 103 of file FolderTypes.cxx.

103  {
104  nlohmann::json js = nlohmann::json::parse(specString);
105  if(js.is_array()){
106  int n = js.size();
107  for (int i = 0; i <= n; i++) {
108  nlohmann::json j_object = js[i];
109  for (auto& [key, val] : j_object.items()){
110  if(key=="PoolRef" && val=="String4k")
111  return true;
112  }
113  }
114  return false;
115  }
116  return (specString.find("PoolRef:String4k") != std::string::npos || specString.find("PoolRef: String4k") != std::string::npos ||
117  specString.find("PoolRef : String4k") != std::string::npos);
118  }

◆ quote()

std::string IOVDbNamespace::quote ( const std::string &  sentence)

Enclose a string in ".

Definition at line 85 of file IOVDbStringFunctions.cxx.

85  {
86  std::string out;
87  out.reserve(sentence.size() + 2);
88  out += '\"';
89  out += sentence;
90  out += '\"';
91  return out;
92  }

◆ replaceNULL()

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)

Definition at line 127 of file IOVDbStringFunctions.cxx.

127  {
128  const std::string &original{possibleNULL};
129  const std::string regex=R"delim( NULL)delim";
130  const std::regex nullre(regex);
131  return std::regex_replace(original,nullre," null");
132  }

◆ replaceServiceType71()

bool IOVDbNamespace::replaceServiceType71 ( std::string &  addrHeader)

Definition at line 212 of file IOVDbStringFunctions.cxx.

212  {
213  const std::size_t svcType = addrHeader.find("service_type=\"71\"");
214  if (svcType != std::string::npos) {
215  addrHeader.replace(svcType, 17, "service_type=\"256\"");
216  return true;
217  }
218  return false;
219  }

◆ resolveUsingTagInfo()

std::string IOVDbNamespace::resolveUsingTagInfo ( const std::string &  tag,
const ITagInfoMgr tagInfoMgr 
)

Definition at line 54 of file TagFunctions.cxx.

54  {
55  // tag an input tag of form TagInfo{Major|Minor}/<tag> or
56  // TagInfo(Major|Minor}/<prefix>/<tag>
57  // and resolve to value of TagInfo object tag <tag>
58  // with optional prefix
59  // <prefix>DEFAULT tags are no longer returned
60  // return true for successful resolution
61  std::string result="";
62  enum ResultIndices{WHOLETAG, MAJMIN, PATH1, PATH2, SIZEWITHPREFIX};
64  if (results.empty()) {
65  return result;
66  }
68  // try to get the Tag value
69  if( tagInfoMgr ) {
71  }
72  // if nothing found, try to get GeoAtlas directly from GeoModelSvc
73  if (result.empty() and target=="GeoAtlas") {
75  }
76  if (not result.empty()) {
77  std::string::size_type rstrip{};
78  //number of characters to strip from tag end
79  if (results[MAJMIN] == "Major") rstrip=6;
80  if (results[MAJMIN] == "Minor") rstrip=3;
81  // check if characters need to be stripped from end of tag
82  if (rstrip>0 && tag.size()>rstrip) result.erase(result.size()-rstrip);
83  } else {
84  throw std::runtime_error("Could not resolve TagInfo tag " + target );
85  }
86  return result;
87  }

◆ runLumiFromIovTime()

std::pair< unsigned long long, unsigned long long > IOVDbNamespace::runLumiFromIovTime ( const unsigned long long  iovTime)

Return a [run,lumi] pair from an IOV time.

Definition at line 108 of file IOVDbCoolFunctions.cxx.

108  {
109  return std::pair<unsigned long long, unsigned long long>{iovTime>>32, iovTime&0xFFFFFFFF};
110  }

◆ sanitiseCrestTag()

std::string IOVDbNamespace::sanitiseCrestTag ( const std::string &  fname)

return valid CREST tag name from folder name

Definition at line 121 of file IOVDbStringFunctions.cxx.

121  {
122  const std::string newName{sanitiseFilename(fname)};
123  return newName;
124  }

◆ sanitiseFilename()

std::string IOVDbNamespace::sanitiseFilename ( const std::string &  fname)

Replace the '/' of a file path with '^'.

Definition at line 110 of file IOVDbStringFunctions.cxx.

110  {
111  std::string newName{fname};
112  auto oldEnd = newName.end();
113  auto newEnd = std::remove(newName.begin(), oldEnd, '/');
114  //keep this line for reference
115  //std::replace(newName.begin(), newName.end(), '/', '^');
116  newName.erase(newEnd, newName.end());
117  return newName;
118  }

◆ sanitiseJsonString()

std::string IOVDbNamespace::sanitiseJsonString ( const std::string &  dataString)

Sanitise json string, escaping raw carriage returns.

Definition at line 52 of file IOVDbStringFunctions.cxx.

52  {
53  const std::string regex="\n";
54  const std::regex lf(regex);
55  return std::regex_replace(dataString,lf,"\\n");
56  }

◆ sanitiseXml()

std::string IOVDbNamespace::sanitiseXml ( const std::string &  pseudoXmlString)

for use when converting cool folder description JSON

Definition at line 135 of file IOVDbStringFunctions.cxx.

135  {
136  std::string result;
137  unsigned int strSize(pseudoXmlString.size());
138  unsigned int bufsize(strSize*1.1);
139  result.reserve(bufsize);
140  for(size_t pos = 0; pos != strSize; ++pos) {
141  switch(pseudoXmlString[pos]) {
142  case '\"': result.append("\\\""); break;
143 
144  default: result.append(&pseudoXmlString[pos], 1); break;
145  }
146  }
147  return result;
148  }

◆ spaceStrip()

std::string IOVDbNamespace::spaceStrip ( const std::string &  input)

Trim leading and trailing spaces,return a new trimmed string.

Definition at line 11 of file IOVDbStringFunctions.cxx.

11  {
12  // return the input string stripped of leading/trailing spaces
13  std::string::size_type idx1=input.find_first_not_of(" \n\r\t");
14  std::string::size_type idx2=input.find_last_not_of(" \n\r\t");
15  if (idx1==std::string::npos || idx2==std::string::npos) {
16  return "";
17  } else {
18  return std::string(input.substr(idx1,1+idx2-idx1));
19  }
20  }

◆ tag2PrefixTarget()

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>"}.

Note "<prefix>" is optional in the input and if missing will be an empty string on output.

Definition at line 198 of file IOVDbStringFunctions.cxx.

198  {
199  std::pair<std::string, std::string> pair;
200  std::string &prefix{pair.first};
201  std::string &target{pair.second};
202  if (tagParseResults.size() == 4){ //4 is the size of result set if there is a prefix
203  prefix = tagParseResults[2]; //index of first path
204  target = tagParseResults[3]; //index of second path
205  } else {
206  target = tagParseResults[2];
207  }
208  return pair;
209  }

◆ tagIsMagic()

bool IOVDbNamespace::tagIsMagic ( const std::string &  candidateTag)

Resolve magic tag.

Definition at line 157 of file IOVDbStringFunctions.cxx.

157  {
158  const std::string regex=R"delim(TagInfo(Major|Minor)/.*)delim";
159  const std::regex magicx(regex);
160  return std::regex_match(candidateTag, magicx);
161  }

◆ typeSizeIsKnown()

bool IOVDbNamespace::typeSizeIsKnown ( const coral::Attribute &  attribute)

Return a bool indicating whether the size of a given Attribute can be determined.

Definition at line 67 of file IOVDbCoolFunctions.cxx.

67  {
68  return (sizeFunctions.find(std::type_index(attribute.specification().type())) != sizeFunctions.end());
69  }

◆ unescapeBackslash()

std::string IOVDbNamespace::unescapeBackslash ( const std::string &  original)

Definition at line 102 of file IOVDbStringFunctions.cxx.

102  {
103  const std::string regex=R"delim([\\]+)delim";
104  const std::string replace=R"delim(\)delim";
105  const std::regex re(regex);
106  return std::regex_replace(original, re,replace);
107  }

◆ unescapeQuotes()

std::string IOVDbNamespace::unescapeQuotes ( const std::string &  original)

Definition at line 95 of file IOVDbStringFunctions.cxx.

95  {
96  const std::string regex=R"delim(\\")delim";
98  return std::regex_replace(original, re,"\"");
99  }

Variable Documentation

◆ ALL_LUMI_BLOCKS

constexpr unsigned long long IOVDbNamespace::ALL_LUMI_BLOCKS {0xFFFFFFFF}
constexpr

All the lumi blocks in one run.

Definition at line 36 of file IOVDbCoolFunctions.h.

IOVDbNamespace::spaceStrip
std::string spaceStrip(const std::string &input)
Trim leading and trailing spaces,return a new trimmed string.
Definition: IOVDbStringFunctions.cxx:11
python.StoreID.UNKNOWN
int UNKNOWN
Definition: StoreID.py:16
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
IOVDbNamespace::parseMagicTag
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 ...
Definition: IOVDbStringFunctions.cxx:164
IOVDbNamespace::tag2PrefixTarget
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...
Definition: IOVDbStringFunctions.cxx:198
trigbs_pickEvents.ranges
ranges
Definition: trigbs_pickEvents.py:60
verify_menu_config.results
results
Definition: verify_menu_config.py:67
ITagInfoMgr::findTag
virtual std::string findTag(const std::string &name) const =0
Find tag by its name, return by value - empty string if not found.
IOVDbNamespace::base64Encode
std::string base64Encode(const coral::Blob &blob)
Definition: Base64Codec.cxx:18
get_generator_info.result
result
Definition: get_generator_info.py:21
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
json
nlohmann::json json
Definition: HistogramDef.cxx:9
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:47
index
Definition: index.py:1
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
IOVDbConn::name
const std::string & name() const
Definition: IOVDbConn.h:70
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
IOVDbNamespace::UNKNOWN
@ UNKNOWN
Definition: FolderTypes.h:27
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
IOVDbNamespace::PoolRefColl
@ PoolRefColl
Definition: FolderTypes.h:31
IOVDbNamespace::getGeoAtlasVersion
std::string getGeoAtlasVersion()
Get the GeoAtlas version directly from GeoModelSvc.
Definition: TagFunctions.cxx:33
upper
int upper(int c)
Definition: LArBadChannelParser.cxx:49
IOVDbNamespace::PoolRef
@ PoolRef
Definition: FolderTypes.h:30
python.TriggerAPI.TriggerAPISession.lf
lf
Definition: TriggerAPISession.py:390
IOVDbNamespace::deleteRegex
std::string deleteRegex(const std::string &original, const std::string &regex)
Delete characters of a matching regex from the input string.
Definition: IOVDbStringFunctions.cxx:79
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
IOVDbNamespace::sanitiseJsonString
std::string sanitiseJsonString(const std::string &dataString)
Sanitise json string, escaping raw carriage returns.
Definition: IOVDbStringFunctions.cxx:52
x
#define x
IOVDbNamespace::getTagInfo
std::string getTagInfo(const std::string &tag, const ITagInfoMgr *tagInfoMgr)
Retrieve the TagInfo.
Definition: TagFunctions.cxx:21
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
dq_defect_copy_defect_database.channels
def channels
Definition: dq_defect_copy_defect_database.py:56
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
IOVDbConn::getCoolDb
cool::IDatabasePtr getCoolDb()
Definition: IOVDbConn.cxx:31
dq_defect_copy_defect_database.until
def until
Definition: dq_defect_copy_defect_database.py:55
PixelModuleFeMask_create_db.remove
string remove
Definition: PixelModuleFeMask_create_db.py:83
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
python.AthDsoLogger.delimiter
delimiter
Definition: AthDsoLogger.py:71
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
CxxUtils::base64_decode
std::vector< unsigned char > base64_decode(const std::string &)
Definition: base64.cxx:97
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
python.subdetectors.mmg.names
names
Definition: mmg.py:8
IOVDbNamespace::JSON
@ JSON
Definition: FolderTypes.h:34
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
IOVDbNamespace::CoolVector
@ CoolVector
Definition: FolderTypes.h:33
IOVDbNamespace::CoraCool
@ CoraCool
Definition: FolderTypes.h:32
hist_file_dump.f
f
Definition: hist_file_dump.py:135
IOVTime::setRETime
void setRETime(uint64_t time) noexcept
Definition: IOVTime.cxx:84
run
Definition: run.py:1
fptr
std::vector< TFile * > fptr
Definition: hcg.cxx:48
python.LArCalib_HVCorrConfig.seconds
seconds
Definition: LArCalib_HVCorrConfig.py:86
IOVDbNamespace::AttrListColl
@ AttrListColl
Definition: FolderTypes.h:29
IOVDbNamespace::parseTypename
std::string parseTypename(const std::string &description)
Extract the typename from a folder description.
Definition: IOVDbStringFunctions.cxx:70
IOVTime::setTimestamp
void setTimestamp(uint64_t timestamp) noexcept
Definition: IOVTime.cxx:72
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
inRange
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
Definition: LArSCIdVsIdTest.cxx:5
grepfile.sep
sep
Definition: grepfile.py:38
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
IOVDbNamespace::sanitiseFilename
std::string sanitiseFilename(const std::string &fname)
Replace the '/' of a file path with '^'.
Definition: IOVDbStringFunctions.cxx:110
MakeNewFileFromOldAndSubstitution.newName
dictionary newName
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:95
Base_Fragment.defaults
dictionary defaults
This includes now the top quark, the leptons and the bosons.
Definition: GeneratorFilters/share/common/Base_Fragment.py:79
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
IOVDbNamespace::jsonAttribute
std::string jsonAttribute(const coral::Attribute &attr)
Produce a representation of a coral::Attribute as a json string.
Definition: IOVDbJsonStringFunctions.cxx:15
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
python.PyAthena.v
v
Definition: PyAthena.py:154
DeMoScan.index
string index
Definition: DeMoScan.py:364
CxxUtils::base64_encode
std::string base64_encode(const unsigned char *, unsigned int)
Definition: base64.cxx:55
lumiFormat.lumi
lumi
Definition: lumiFormat.py:106
IOVDbNamespace::attributeSize
unsigned int attributeSize(const coral::Attribute &attribute)
return the size (in bytes) of an Attribute
Definition: IOVDbCoolFunctions.cxx:57
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
IOVDbNamespace::poolCompatible
bool poolCompatible(const CondAttrListCollection &attrListColl)
Definition: FolderTypes.cxx:128
copySelective.target
string target
Definition: copySelective.py:37
WriteCalibToCool.strval
strval
Definition: WriteCalibToCool.py:583
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
DeMoScan.first
bool first
Definition: DeMoScan.py:536
re
const boost::regex re(r_e)
IOVDbNamespace::AttrList
@ AttrList
Definition: FolderTypes.h:28
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
IOVDbNamespace::quote
std::string quote(const std::string &sentence)
Enclose a string in ".
Definition: IOVDbStringFunctions.cxx:85
python.compressB64.c
def c
Definition: compressB64.py:93
IOVDbNamespace::makeChannel
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.
Definition: IOVDbCoolFunctions.cxx:128
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
python.LArCondContChannels.chans
list chans
Definition: LArCondContChannels.py:638
IOVDbNamespace::FolderType
FolderType
Definition: FolderTypes.h:26
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
IOVDbNamespace::NUM_FOLDER_TYPES
@ NUM_FOLDER_TYPES
Definition: FolderTypes.h:35