ATLAS Offline Software
Loading...
Searching...
No Matches
IOVPayloadContainer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef IOVDBDATAMODEL_IOVPAYLOADCONTAINER_H
6#define IOVDBDATAMODEL_IOVPAYLOADCONTAINER_H
7
20
23
24#include <vector>
25
34
36public:
37
38 typedef std::vector<CondAttrListCollection*> payloadVec;
39 typedef payloadVec::const_iterator const_iterator;
40 typedef payloadVec::size_type size_type;
41
43
49
51
52
54 const_iterator begin() const;
55
57 const_iterator end() const;
58
60 CondAttrListCollection* at(unsigned int i) const;
61
63 size_type size() const;
64
66 //provided IOVTime
67 const_iterator find(const IOVTime& time) const;
68
70
72
73
78 bool merge(CondAttrListCollection* attrListColl);
80
81private:
84
86 public:
88 { return (x->minRange().start() < y); }
89 };
90
92 public:
94 { return (x->minRange().stop() < y); }
95 };
96
98};
99
100// inlines
101inline
104
105inline
108{
109 return (m_payloadVec.begin());
110}
111
112inline
115{
116 return (m_payloadVec.end());
117}
118
119inline
122{
123 return (m_payloadVec.size());
124}
125
126inline
128IOVPayloadContainer::at(unsigned int i) const
129{
130 if (i < m_payloadVec.size()) return m_payloadVec[i];
131 return (0);
132}
133
134inline
137{
138 // Find first collection where time < stop time
139 const_iterator result = std::lower_bound(m_payloadVec.begin(),
140 m_payloadVec.end(),
141 time, AttrListCollSortStop()) ;
142 // At end return:
143 if ( result == m_payloadVec.end() ) return (result) ;
144
145 // If time == stop, move forward one
146 if ( (*result)->minRange().stop() == time) ++result;
147
148 // At end return:
149 if ( result == m_payloadVec.end() ) return (result) ;
150
151 // Check that time is in interval
152 if ( (*result)->minRange().start() <= time) return (result);
153
154 // Not found
155 return (m_payloadVec.end());
156}
157
158
159#endif // IOVDBDATAMODEL_IOVPAYLOADCONTAINER_H
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Validity Range object.
#define y
#define x
This class is a collection of AttributeLists where each one is associated with a channel number.
bool operator()(const CondAttrListCollection *x, const IOVTime &y)
bool operator()(const CondAttrListCollection *x, const IOVTime &y)
size_type size() const
size of payload vector
IOVPayloadContainer & operator=(const IOVPayloadContainer &cont)
payloadVec::const_iterator const_iterator
const_iterator begin() const
Begin of payload vector.
const_iterator end() const
End of payload vector.
const_iterator find(const IOVTime &time) const
find the first payload that has a IOVRange which includes the
payloadVec::size_type size_type
CondAttrListCollection * at(unsigned int i) const
Element access.
std::vector< CondAttrListCollection * > payloadVec
friend class IOVPayloadContainerPTCnv_p1
friend class IOVPayloadContainerCnv_p1
Basic time unit for IOVSvc.
Definition IOVTime.h:33
Definition merge.py:1