ATLAS Offline Software
Loading...
Searching...
No Matches
IOVEntry.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 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 <set>
24
25class IOVEntry {
26public:
27
28 // Ordered by increasing start times
30 public:
31 bool operator() ( const IOVEntry &p1, const IOVEntry &p2 ) const {
32 return p1.range()->start() > p2.range()->start();
33 }
34 bool operator() ( const IOVEntry *p1, const IOVEntry *p2 ) const {
35 return p1->range()->start() > p2->range()->start();
36 }
37 };
38
39 // Order by decreasing stop times
41 public:
42 bool operator() ( const IOVEntry &p1, const IOVEntry &p2 ) const {
43 return p1.range()->stop() < p2.range()->stop();
44 }
45 bool operator() ( const IOVEntry *p1, const IOVEntry *p2 ) const {
46 return p1->range()->stop() < p2->range()->stop();
47 }
48 };
49
50 typedef std::multiset<IOVEntry*,IOVEntryStartCritereon>::iterator startITR;
51 typedef std::multiset<IOVEntry*,IOVEntryStopCritereon>::iterator stopITR;
52
57
58 IOVEntry (const IOVEntry&) = delete;
59 IOVEntry& operator= (const IOVEntry&) = delete;
60
61 ~IOVEntry() { delete m_range; }
62
63 const IOVRange* range() const { return m_range; }
65
67 const SG::DataProxy* proxy() const { return m_proxy; }
68
69 bool removedStart() const { return m_removedStart; }
70 bool removedStop() const { return m_removedStop; }
71
72 void setRemovedStart(bool b) { m_removedStart = b; }
73 void setRemovedStop(bool b) { m_removedStop = b; }
74
75 void setStartITR( startITR itr ) { m_startITR = itr; }
76 void setStopITR( stopITR itr ) { m_stopITR = itr; }
77
78 startITR getStartITR() const { return m_startITR; }
79 stopITR getStopITR() const { return m_stopITR; }
80
81private:
84
87
90
91};
92
93// Order by DataProxy
95public:
96 bool operator() ( const IOVEntry &p1, const IOVEntry &p2) const {
97 return p1.proxy() < p2.proxy();
98 }
99 bool operator() ( const IOVEntry *p1, const IOVEntry *p2) const {
100 return p1->proxy() < p2->proxy();
101 }
102};
103
104#endif
Validity Range object.
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition IOVEntry.h:96
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition IOVEntry.h:31
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition IOVEntry.h:42
std::multiset< IOVEntry *, IOVEntryStopCritereon >::iterator stopITR
Definition IOVEntry.h:51
void setStartITR(startITR itr)
Definition IOVEntry.h:75
IOVEntry(const IOVEntry &)=delete
IOVEntry & operator=(const IOVEntry &)=delete
void setRemovedStart(bool b)
Definition IOVEntry.h:72
void setStopITR(stopITR itr)
Definition IOVEntry.h:76
void setRemovedStop(bool b)
Definition IOVEntry.h:73
SG::DataProxy * m_proxy
Definition IOVEntry.h:82
void setRange(IOVRange *range)
Definition IOVEntry.h:64
bool m_removedStart
Definition IOVEntry.h:85
const IOVRange * range() const
Definition IOVEntry.h:63
IOVEntry(SG::DataProxy *proxy, IOVRange *range)
Definition IOVEntry.h:53
startITR getStartITR() const
Definition IOVEntry.h:78
bool removedStop() const
Definition IOVEntry.h:70
std::multiset< IOVEntry *, IOVEntryStartCritereon >::iterator startITR
Definition IOVEntry.h:50
IOVRange * m_range
Definition IOVEntry.h:83
~IOVEntry()
Definition IOVEntry.h:61
bool removedStart() const
Definition IOVEntry.h:69
const SG::DataProxy * proxy() const
Definition IOVEntry.h:67
bool m_removedStop
Definition IOVEntry.h:86
startITR m_startITR
Definition IOVEntry.h:88
stopITR m_stopITR
Definition IOVEntry.h:89
SG::DataProxy * proxy()
Definition IOVEntry.h:66
stopITR getStopITR() const
Definition IOVEntry.h:79
Validity Range object.
Definition IOVRange.h:30