ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
IOVDbSvc
src
IOVDbParser.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//@file IOVDbParser.h
6
//@brief helper class for IOVDbSvc implementing a simple XML-style parser to parse
7
// the folder description string or the provided folder description in job options
8
//@author Richard Hawkings, started 29/11/08
9
#ifndef IOVDBSVC_IOVDBPARSER_H
10
#define IOVDBSVC_IOVDBPARSER_H
11
12
#include <string>
13
#include <map>
14
#include <vector>
15
#include "GaudiKernel/ClassID.h"
//typedef
16
17
class
MsgStream;
18
19
class
IOVDbParser
{
20
public
:
21
22
IOVDbParser
() =
delete
;
23
IOVDbParser
(
const
std::string &input, MsgStream& log);
24
bool
isValid
()
const
;
26
std::pair<std::string, bool>
27
at
(
const
std::string & searchKey,
const
std::string & defaultValue=
""
)
const
;
29
bool
getKey
(
const
std::string&
key
,
const
std::string& devvalue,std::string& value)
const
;
31
std::string
folderName
()
const
;
32
std::string
key
()
const
;
33
bool
hasKey
()
const
;
34
std::string
tag
()
const
;
35
std::string
eventStoreName
()
const
;
36
bool
timebaseIs_nsOfEpoch
()
const
;
37
std::string
cache
()
const
;
38
int
cachehint
()
const
;
39
bool
named
()
const
;
40
std::string
addressHeader
()
const
;
41
std::vector<std::string>
symLinks
()
const
;
42
bool
noTagOverride
()
const
;
43
CLID
classId
(MsgStream&
msg
)
const
;
44
bool
onlyReadMetadata
()
const
;
45
bool
extensible
()
const
;
46
47
unsigned
applyOverrides
(
const
IOVDbParser
& other, MsgStream & log);
49
bool
overridesIov
(MsgStream&
msg
)
const
;
52
bool
overridesIov
(MsgStream&
msg
,
const
bool
folderIs_nsOfEpoch)
const
;
53
unsigned
long
long
iovOverrideValue
(MsgStream&
msg
)
const
;
54
bool
operator==
(
const
IOVDbParser
& other)
const
;
55
std::string
toString
()
const
;
56
57
private
:
58
bool
m_valid
{};
59
typedef
std::map<std::string, std::string, std::less<>>
KeyValMap
;
60
KeyValMap
m_keys
;
62
bool
overridesIovImpl
(MsgStream&
msg
,
const
bool
performFolderCheck,
const
bool
folderIs_nsOfEpoch=
true
)
const
;
63
64
};
65
66
inline
bool
IOVDbParser::isValid
()
const
{
return
m_valid
; }
67
68
MsgStream&
operator<<
(MsgStream& os,
const
IOVDbParser
& fldr);
69
70
71
#endif
// IOVDBSVC_IOVDBPARSER_H
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
operator<<
MsgStream & operator<<(MsgStream &os, const IOVDbParser &fldr)
Definition
IOVDbParser.cxx:324
IOVDbParser
Definition
IOVDbParser.h:19
IOVDbParser::overridesIovImpl
bool overridesIovImpl(MsgStream &msg, const bool performFolderCheck, const bool folderIs_nsOfEpoch=true) const
implementation of overridesIov, with or without check on folder compatibility
Definition
IOVDbParser.cxx:264
IOVDbParser::at
std::pair< std::string, bool > at(const std::string &searchKey, const std::string &defaultValue="") const
'at' accessor with an optional default; the bool is true if the key was found
Definition
IOVDbParser.cxx:123
IOVDbParser::toString
std::string toString() const
Definition
IOVDbParser.cxx:310
IOVDbParser::symLinks
std::vector< std::string > symLinks() const
Definition
IOVDbParser.cxx:211
IOVDbParser::key
std::string key() const
Definition
IOVDbParser.cxx:138
IOVDbParser::cachehint
int cachehint() const
Definition
IOVDbParser.cxx:168
IOVDbParser::cache
std::string cache() const
Definition
IOVDbParser.cxx:163
IOVDbParser::isValid
bool isValid() const
Definition
IOVDbParser.h:66
IOVDbParser::classId
CLID classId(MsgStream &msg) const
Definition
IOVDbParser.cxx:190
IOVDbParser::onlyReadMetadata
bool onlyReadMetadata() const
Definition
IOVDbParser.cxx:179
IOVDbParser::named
bool named() const
Definition
IOVDbParser.cxx:174
IOVDbParser::getKey
bool getKey(const std::string &key, const std::string &devvalue, std::string &value) const
original 'getKey' method, now implemented using 'at'
Definition
IOVDbParser.cxx:108
IOVDbParser::eventStoreName
std::string eventStoreName() const
Definition
IOVDbParser.cxx:153
IOVDbParser::m_valid
bool m_valid
Definition
IOVDbParser.h:58
IOVDbParser::hasKey
bool hasKey() const
Definition
IOVDbParser.cxx:143
IOVDbParser::timebaseIs_nsOfEpoch
bool timebaseIs_nsOfEpoch() const
Definition
IOVDbParser.cxx:158
IOVDbParser::iovOverrideValue
unsigned long long iovOverrideValue(MsgStream &msg) const
Definition
IOVDbParser.cxx:291
IOVDbParser::overridesIov
bool overridesIov(MsgStream &msg) const
return true if this description overrides the timestamp or runlumi
Definition
IOVDbParser.cxx:252
IOVDbParser::operator==
bool operator==(const IOVDbParser &other) const
Definition
IOVDbParser.cxx:247
IOVDbParser::extensible
bool extensible() const
Definition
IOVDbParser.cxx:184
IOVDbParser::noTagOverride
bool noTagOverride() const
Definition
IOVDbParser.cxx:217
IOVDbParser::m_keys
KeyValMap m_keys
Definition
IOVDbParser.h:60
IOVDbParser::addressHeader
std::string addressHeader() const
Definition
IOVDbParser.cxx:206
IOVDbParser::applyOverrides
unsigned applyOverrides(const IOVDbParser &other, MsgStream &log)
Definition
IOVDbParser.cxx:223
IOVDbParser::KeyValMap
std::map< std::string, std::string, std::less<> > KeyValMap
Definition
IOVDbParser.h:59
IOVDbParser::folderName
std::string folderName() const
give the folder name contained in the parsed description
Definition
IOVDbParser.cxx:133
IOVDbParser::tag
std::string tag() const
Definition
IOVDbParser.cxx:148
IOVDbParser::IOVDbParser
IOVDbParser()=delete
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0