ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
IOVSvc
src
IOVEntry.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef IOVSVC_IOVENTRY_H
6
#define IOVSVC_IOVENTRY_H
7
8
/*****************************************************************************
9
*
10
* IOVEntry.h
11
* IOVSvc
12
*
13
* Author: Charles Leggett
14
*
15
* Validity range object that manages start and stop times, holding link
16
* to object DataProxy
17
*
18
*****************************************************************************/
19
20
#include "
AthenaKernel/IOVRange.h
"
21
#include "
SGTools/DataProxy.h
"
22
23
#include <memory>
24
#include <set>
25
26
class
IOVEntry
{
27
public
:
28
29
// Ordered by increasing start times
30
class
IOVEntryStartCritereon
{
31
public
:
32
bool
operator()
(
const
IOVEntry
&p1,
const
IOVEntry
&p2 )
const
{
33
return
p1.range()->start() > p2.range()->start();
34
}
35
bool
operator()
(
const
IOVEntry
*p1,
const
IOVEntry
*p2 )
const
{
36
return
p1->range()->start() > p2->range()->start();
37
}
38
};
39
40
// Order by decreasing stop times
41
class
IOVEntryStopCritereon
{
42
public
:
43
bool
operator()
(
const
IOVEntry
&p1,
const
IOVEntry
&p2 )
const
{
44
return
p1.range()->stop() < p2.range()->stop();
45
}
46
bool
operator()
(
const
IOVEntry
*p1,
const
IOVEntry
*p2 )
const
{
47
return
p1->range()->stop() < p2->range()->stop();
48
}
49
};
50
51
typedef
std::multiset<IOVEntry*, IOVEntryStartCritereon>
StartSet_t
;
52
typedef
std::multiset<IOVEntry*, IOVEntryStopCritereon>
StopSet_t
;
53
54
IOVEntry
(
SG::DataProxy
*
proxy
, std::unique_ptr<IOVRange>
range
):
55
m_proxy
(
proxy
),
m_range
(
std
::move(
range
))
56
{}
57
58
IOVRange
*
range
() {
return
m_range
.get(); }
59
const
IOVRange
*
range
()
const
{
return
m_range
.get(); }
60
void
setRange
( std::unique_ptr<IOVRange>
range
) {
m_range
= std::move(
range
); }
61
62
SG::DataProxy
*
proxy
() {
return
m_proxy
; }
63
const
SG::DataProxy
*
proxy
()
const
{
return
m_proxy
; }
64
65
bool
removedStart
()
const
{
return
m_removedStart
; }
66
bool
removedStop
()
const
{
return
m_removedStop
; }
67
68
void
setRemovedStart
(
bool
b) {
m_removedStart
= b; }
69
void
setRemovedStop
(
bool
b) {
m_removedStop
= b; }
70
71
void
setStartITR
( StartSet_t::iterator itr ) {
m_startITR
= itr; }
72
void
setStopITR
( StopSet_t::iterator itr ) {
m_stopITR
= itr; }
73
74
StartSet_t::iterator
getStartITR
()
const
{
return
m_startITR
; }
75
StopSet_t::iterator
getStopITR
()
const
{
return
m_stopITR
; }
76
77
private
:
78
SG::DataProxy
*
m_proxy
{};
79
std::unique_ptr<IOVRange>
m_range
;
80
81
bool
m_removedStart
{
false
};
82
bool
m_removedStop
{
false
};
83
84
StartSet_t::iterator
m_startITR
{};
85
StopSet_t::iterator
m_stopITR
{};
86
87
};
88
89
#endif
DataProxy.h
IOVRange.h
Validity Range object.
IOVEntry::IOVEntryStartCritereon
Definition
IOVEntry.h:30
IOVEntry::IOVEntryStartCritereon::operator()
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition
IOVEntry.h:32
IOVEntry::IOVEntryStopCritereon
Definition
IOVEntry.h:41
IOVEntry::IOVEntryStopCritereon::operator()
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition
IOVEntry.h:43
IOVEntry::setRemovedStart
void setRemovedStart(bool b)
Definition
IOVEntry.h:68
IOVEntry::m_startITR
StartSet_t::iterator m_startITR
Definition
IOVEntry.h:84
IOVEntry::setRemovedStop
void setRemovedStop(bool b)
Definition
IOVEntry.h:69
IOVEntry::setRange
void setRange(std::unique_ptr< IOVRange > range)
Definition
IOVEntry.h:60
IOVEntry::m_proxy
SG::DataProxy * m_proxy
Definition
IOVEntry.h:78
IOVEntry::setStopITR
void setStopITR(StopSet_t::iterator itr)
Definition
IOVEntry.h:72
IOVEntry::getStopITR
StopSet_t::iterator getStopITR() const
Definition
IOVEntry.h:75
IOVEntry::StopSet_t
std::multiset< IOVEntry *, IOVEntryStopCritereon > StopSet_t
Definition
IOVEntry.h:52
IOVEntry::m_removedStart
bool m_removedStart
Definition
IOVEntry.h:81
IOVEntry::getStartITR
StartSet_t::iterator getStartITR() const
Definition
IOVEntry.h:74
IOVEntry::range
const IOVRange * range() const
Definition
IOVEntry.h:59
IOVEntry::m_stopITR
StopSet_t::iterator m_stopITR
Definition
IOVEntry.h:85
IOVEntry::removedStop
bool removedStop() const
Definition
IOVEntry.h:66
IOVEntry::m_range
std::unique_ptr< IOVRange > m_range
Definition
IOVEntry.h:79
IOVEntry::StartSet_t
std::multiset< IOVEntry *, IOVEntryStartCritereon > StartSet_t
Definition
IOVEntry.h:51
IOVEntry::range
IOVRange * range()
Definition
IOVEntry.h:58
IOVEntry::setStartITR
void setStartITR(StartSet_t::iterator itr)
Definition
IOVEntry.h:71
IOVEntry::removedStart
bool removedStart() const
Definition
IOVEntry.h:65
IOVEntry::IOVEntry
IOVEntry(SG::DataProxy *proxy, std::unique_ptr< IOVRange > range)
Definition
IOVEntry.h:54
IOVEntry::proxy
const SG::DataProxy * proxy() const
Definition
IOVEntry.h:63
IOVEntry::m_removedStop
bool m_removedStop
Definition
IOVEntry.h:82
IOVEntry::proxy
SG::DataProxy * proxy()
Definition
IOVEntry.h:62
IOVRange
Validity Range object.
Definition
IOVRange.h:30
SG::DataProxy
Definition
DataProxy.h:45
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0