ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
CoolConvUtilities
src
PoolMapElement.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
#ifndef COOLCONVUTILS_POOLMAPELEMENT_H
6
#define COOLCONVUTILS_POOLMAPELEMENT_H
7
// PoolMapElement.h - simple class to hold information about a POOL file usage
8
// and the conditions data folders that reference it
9
// Used by AtlCoolCopy.cxx
10
11
#include<vector>
12
#include<string>
13
14
class
PoolMapElement
{
15
public
:
16
PoolMapElement
();
17
PoolMapElement
(
const
int
usage
,
const
std::string&
foldertag
);
18
// increment usage count
19
void
inccount
();
20
void
setErrorBit
(
const
int
bit);
21
void
setlfn
(
const
std::string&
lfn
);
22
void
setpfn
(
const
std::string&
pfn
);
23
// access methods
24
int
count
()
const
;
25
int
errcode
()
const
;
26
const
std::string&
lfn
()
const
;
27
const
std::string&
pfn
()
const
;
28
std::vector<std::string>&
foldertag
();
29
const
std::vector<std::string>&
foldertag
()
const
;
30
31
void
addfoldertag
(
const
std::string&
foldertag
);
32
33
private
:
34
int
m_count
;
35
int
m_errcode
;
36
std::string
m_lfn
;
37
std::string
m_pfn
;
38
std::vector<std::string>
m_folders
;
39
};
40
41
inline
PoolMapElement::PoolMapElement
(
const
int
usage
,
42
const
std::string&
foldertag
) :
43
m_count
(
usage
),
m_errcode
(0),
m_lfn
(
""
),
m_pfn
(
""
) {
44
m_folders
.push_back(
foldertag
);
45
}
46
47
inline
PoolMapElement::PoolMapElement
():
m_count
(0),
m_errcode
(0),
m_lfn
(),
m_pfn
(),
m_folders
() {}
48
49
inline
void
PoolMapElement::inccount
() { ++
m_count
;}
50
inline
void
PoolMapElement::setErrorBit
(
const
int
bit)
51
{
m_errcode
=
m_errcode
| (1 << bit);}
52
inline
void
PoolMapElement::setlfn
(
const
std::string&
lfn
) {
m_lfn
=
lfn
;}
53
inline
void
PoolMapElement::setpfn
(
const
std::string&
pfn
) {
m_pfn
=
pfn
;}
54
55
inline
int
PoolMapElement::count
()
const
{
return
m_count
; }
56
inline
int
PoolMapElement::errcode
()
const
{
return
m_errcode
; }
57
inline
const
std::string&
PoolMapElement::lfn
()
const
{
return
m_lfn
; }
58
inline
const
std::string&
PoolMapElement::pfn
()
const
{
return
m_pfn
; }
59
60
inline
std::vector<std::string>&
PoolMapElement::foldertag
() {
return
m_folders
; }
61
inline
const
std::vector<std::string>&
PoolMapElement::foldertag
()
const
{
return
m_folders
; }
62
inline
void
PoolMapElement::addfoldertag
(
const
std::string&
foldertag
) {
63
if
(
find
(
m_folders
.begin(),
m_folders
.end(),
foldertag
)==
m_folders
.end())
64
m_folders
.push_back(
foldertag
);
65
}
66
67
#endif
// COOLCONVUTILS_POOLMAPELEMENT_H
PoolMapElement::errcode
int errcode() const
Definition
PoolMapElement.h:56
PoolMapElement::addfoldertag
void addfoldertag(const std::string &foldertag)
Definition
PoolMapElement.h:62
PoolMapElement::foldertag
std::vector< std::string > & foldertag()
Definition
PoolMapElement.h:60
PoolMapElement::m_errcode
int m_errcode
Definition
PoolMapElement.h:35
PoolMapElement::m_count
int m_count
Definition
PoolMapElement.h:34
PoolMapElement::m_lfn
std::string m_lfn
Definition
PoolMapElement.h:36
PoolMapElement::PoolMapElement
PoolMapElement()
Definition
PoolMapElement.h:47
PoolMapElement::lfn
const std::string & lfn() const
Definition
PoolMapElement.h:57
PoolMapElement::m_folders
std::vector< std::string > m_folders
Definition
PoolMapElement.h:38
PoolMapElement::pfn
const std::string & pfn() const
Definition
PoolMapElement.h:58
PoolMapElement::setErrorBit
void setErrorBit(const int bit)
Definition
PoolMapElement.h:50
PoolMapElement::inccount
void inccount()
Definition
PoolMapElement.h:49
PoolMapElement::count
int count() const
Definition
PoolMapElement.h:55
PoolMapElement::m_pfn
std::string m_pfn
Definition
PoolMapElement.h:37
PoolMapElement::setpfn
void setpfn(const std::string &pfn)
Definition
PoolMapElement.h:53
PoolMapElement::setlfn
void setlfn(const std::string &lfn)
Definition
PoolMapElement.h:52
find
std::string find(const std::string &s)
return a remapped string
Definition
hcg.cxx:140
usage
int usage(std::ostream &s, int, char **argv, int status=-1)
Definition
hcg.cxx:1039
Generated on
for ATLAS Offline Software by
1.17.0