ATLAS Offline Software
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 
20 #include "AthenaKernel/IOVRange.h"
21 #include "SGTools/DataProxy.h"
22 
23 #include <set>
24 
25 class IOVEntry {
26 public:
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
40  class IOVEntryStopCritereon {
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 
52 
55  m_removedStart(false), m_removedStop(false),
56  m_startITR(0), m_stopITR(0) {}
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; }
64  void setRange( IOVRange* range) { m_range=range; }
65 
66  SG::DataProxy* proxy() { return m_proxy; }
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 
81 private:
84 
87 
90 
91 };
92 
93 // Order by DataProxy
95 public:
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
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
IOVEntry::IOVEntryStopCritereon
Definition: IOVEntry.h:50
IOVRange.h
Validity Range object. Holds two IOVTime instances (start and stop)
IOVEntry::setStopITR
void setStopITR(stopITR itr)
Definition: IOVEntry.h:86
IOVEntry::setRange
void setRange(IOVRange *range)
Definition: IOVEntry.h:74
IOVEntry::startITR
std::multiset< IOVEntry *, IOVEntryStartCritereon >::iterator startITR
Definition: IOVEntry.h:60
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
IOVEntry::getStartITR
startITR getStartITR() const
Definition: IOVEntry.h:88
IOVEntry::operator=
IOVEntry & operator=(const IOVEntry &)=delete
IOVEntry::setRemovedStart
void setRemovedStart(bool b)
Definition: IOVEntry.h:82
IOVEntry::proxy
SG::DataProxy * proxy()
Definition: IOVEntry.h:76
IOVEntry::m_removedStop
bool m_removedStop
Definition: IOVEntry.h:96
IOVEntry::m_stopITR
stopITR m_stopITR
Definition: IOVEntry.h:99
IOVEntry::IOVEntry
IOVEntry(SG::DataProxy *proxy, IOVRange *range)
Definition: IOVEntry.h:63
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
IOVEntry::range
const IOVRange * range() const
Definition: IOVEntry.h:73
IOVEntry::setStartITR
void setStartITR(startITR itr)
Definition: IOVEntry.h:85
IOVEntry::removedStart
bool removedStart() const
Definition: IOVEntry.h:79
IOVEntry::m_proxy
SG::DataProxy * m_proxy
Definition: IOVEntry.h:92
IOVEntryProxyCritereon
Definition: IOVEntry.h:94
IOVEntryProxyCritereon::operator()
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition: IOVEntry.h:96
IOVEntry::removedStop
bool removedStop() const
Definition: IOVEntry.h:80
IOVEntry::setRemovedStop
void setRemovedStop(bool b)
Definition: IOVEntry.h:83
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
IOVEntry::stopITR
std::multiset< IOVEntry *, IOVEntryStopCritereon >::iterator stopITR
Definition: IOVEntry.h:61
IOVEntry
Definition: IOVEntry.h:25
IOVEntry::IOVEntryStartCritereon
Definition: IOVEntry.h:39
IOVEntry::~IOVEntry
~IOVEntry()
Definition: IOVEntry.h:71
IOVEntry::IOVEntryStopCritereon::operator()
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition: IOVEntry.h:52
IOVEntry::m_range
IOVRange * m_range
Definition: IOVEntry.h:93
IOVEntry::m_removedStart
bool m_removedStart
Definition: IOVEntry.h:95
SG::DataProxy
Definition: DataProxy.h:44
IOVEntry::m_startITR
startITR m_startITR
Definition: IOVEntry.h:98
IOVEntry::getStopITR
stopITR getStopITR() const
Definition: IOVEntry.h:89
IOVEntry::IOVEntryStartCritereon::operator()
bool operator()(const IOVEntry &p1, const IOVEntry &p2) const
Definition: IOVEntry.h:51
DataProxy.h