ATLAS Offline Software
Loading...
Searching...
No Matches
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
21#include "SGTools/DataProxy.h"
22
23#include <memory>
24#include <set>
25
26class IOVEntry {
27public:
28
29 // Ordered by increasing start times
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
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
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
77private:
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
Validity Range object.
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition IOVEntry.h:32
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition IOVEntry.h:43
void setRemovedStart(bool b)
Definition IOVEntry.h:68
StartSet_t::iterator m_startITR
Definition IOVEntry.h:84
void setRemovedStop(bool b)
Definition IOVEntry.h:69
void setRange(std::unique_ptr< IOVRange > range)
Definition IOVEntry.h:60
SG::DataProxy * m_proxy
Definition IOVEntry.h:78
void setStopITR(StopSet_t::iterator itr)
Definition IOVEntry.h:72
StopSet_t::iterator getStopITR() const
Definition IOVEntry.h:75
std::multiset< IOVEntry *, IOVEntryStopCritereon > StopSet_t
Definition IOVEntry.h:52
bool m_removedStart
Definition IOVEntry.h:81
StartSet_t::iterator getStartITR() const
Definition IOVEntry.h:74
const IOVRange * range() const
Definition IOVEntry.h:59
StopSet_t::iterator m_stopITR
Definition IOVEntry.h:85
bool removedStop() const
Definition IOVEntry.h:66
std::unique_ptr< IOVRange > m_range
Definition IOVEntry.h:79
std::multiset< IOVEntry *, IOVEntryStartCritereon > StartSet_t
Definition IOVEntry.h:51
IOVRange * range()
Definition IOVEntry.h:58
void setStartITR(StartSet_t::iterator itr)
Definition IOVEntry.h:71
bool removedStart() const
Definition IOVEntry.h:65
IOVEntry(SG::DataProxy *proxy, std::unique_ptr< IOVRange > range)
Definition IOVEntry.h:54
const SG::DataProxy * proxy() const
Definition IOVEntry.h:63
bool m_removedStop
Definition IOVEntry.h:82
SG::DataProxy * proxy()
Definition IOVEntry.h:62
Validity Range object.
Definition IOVRange.h:30
STL namespace.