 |
ATLAS Offline Software
|
Go to the documentation of this file.
16 #ifndef DBDATAOBJECTS_CONDATTRLISTCOLLECTION_H
17 #define DBDATAOBJECTS_CONDATTRLISTCOLLECTION_H
20 #include "CoralBase/Attribute.h"
21 #include "CoralBase/AttributeList.h"
22 #include "CoralBase/AttributeListSpecification.h"
26 #include "GaudiKernel/DataObject.h"
179 bool ignoreIOVs =
false)
const;
196 coral::AttributeListSpecification*
m_spec;
201 #include "AthenaKernel/CondCont.h"
212 m_hasUniqueIOV(true),
213 m_hasRunLumiBlockTime(true),
222 m_hasUniqueIOV(true),
223 m_hasRunLumiBlockTime(hasRunLumiBlockTime),
238 DataObject::DataObject(rhs),
239 m_iovMap(rhs.m_iovMap),
240 m_nameMap(rhs.m_nameMap),
241 m_minRange(rhs.m_minRange),
242 m_hasUniqueIOV(rhs.m_hasUniqueIOV),
243 m_hasRunLumiBlockTime(rhs.m_hasRunLumiBlockTime),
249 m_spec=
new coral::AttributeListSpecification();
251 for (
const auto& attr : atr1) {
252 const coral::AttributeSpecification& aspec=attr.specification();
253 m_spec->extend(aspec.name(),aspec.typeName());
257 newit->second.fastCopyData(attrList);
395 else return (0xFFFF);
430 static const std::string
name;
454 m_spec=
new coral::AttributeListSpecification();
456 const coral::AttributeSpecification& aspec=attr.specification();
457 m_spec->extend(aspec.name(),aspec.typeName());
471 m_spec=
new coral::AttributeListSpecification();
473 const coral::AttributeSpecification& aspec=attr.specification();
474 m_spec->extend(aspec.name(),aspec.typeName());
540 for (; it1 != last1; ++it1) {
559 std::cout <<
"min range: " <<
m_minRange << std::endl;
563 std::cout <<
"chan, attr: " <<
chanNum << std::endl;
564 attrList.toOutputStream(std::cout) << std::endl;
568 std::cout <<
"chan, iov: " <<
chanNum << std::endl;
569 std::cout <<
iov << std::endl;
573 std::cout <<
"chan, name: " <<
chanNum << std::endl;
574 std::cout <<
name << std::endl;
590 attrList.toOutputStream(
stream) << std::endl;
616 return (!((*
this) == rhs));
622 bool ignoreIOVs )
const
638 for (; it1 != end1; ++it1, ++it2) {
639 if (it1->first != it2->first)
return false;
640 if (it1->second != it2->second)
return false;
648 for (; it3 != end3; ++it3, ++it4) {
649 if (it3->first != it4->first)
return false;
650 if (it3->second != it4->second)
return false;
657 for (; it5 != end5; ++it5, ++it6) {
658 if (it5->first != it6->first)
return false;
659 if (it5->second != it6->second)
return false;
671 if (attrRet.second)
m_attrMap.erase(oldChan);
675 if (iovRet.second)
m_iovMap.erase(oldChan);
679 if (nameRet.second)
m_nameMap.erase(oldChan);
681 return attrRet.first->first == newChan
682 && iovRet.first->first == newChan
683 && nameRet.first->first == newChan;
688 #endif // DBDATAOBJECTS_CONDATTRLISTCOLLECTION_H
JetConstituentVector::iterator iterator
void resetMinRange()
Reset minRange according to the IOVs of the contained channels.
const IOVRange & minRange() const
Current minimal IOVRange.
ChanNameMap::iterator name_iterator
const_iterator end() const
bool fixChanNum(ChanNum oldChan, ChanNum newChan)
iov_size_type iov_size() const
number of Chan/IOV pairs
Validity Range object. Holds two IOVTimes (start and stop)
iov_const_iterator iov_end() const
static constexpr uint32_t MAXRUN
Validity Range object. Holds two IOVTime instances (start and stop)
void addNewStop(const IOVTime &stop)
Add new stop time to minRange - make sure that stop is <= to new stop
ChanIOVMap::iterator iov_iterator
const IOVTime & start() const
bool hasUniqueIOV() const
Check whether there is a unique IOV for all channels.
~CondAttrListCollection()
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
ChanIOVMap::size_type iov_size_type
std::map< ChanNum, IOVRange > ChanIOVMap
void addNewStart(const IOVTime &start)
Add new start time to minRange - make sure that start is >= to new start.
ChanIOVMap::value_type ChanIOVPair
ChanAttrListMap::value_type ChanAttrListPair
This class is a collection of AttributeLists where each one is associated with a channel number....
ChanIOVMap::const_iterator iov_const_iterator
static constexpr uint32_t MINRUN
const IOVTime & stop() const
ChanAttrListMap::iterator iterator
ChanNameMap::const_iterator name_const_iterator
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
void dump() const
Dump our contents to std::cout.
std::map< ChanNum, std::string > ChanNameMap
std::map< ChanNum, coral::AttributeList > ChanAttrListMap
CondAttrListCollection & operator=(const CondAttrListCollection &rhs)=delete
CONDCONT_DEF(CondAttrListCollection, 1223307417)
bool operator!=(const CondAttrListCollection &rhs) const
Comparison operator.
static constexpr uint64_t MAXTIMESTAMP
bool isTimestamp() const noexcept
ChanAttrListMap m_attrMap
ChanNum chanNum(unsigned int index) const
channel number for index: (index = 0 to size-1)
const AttributeList & attributeList(ChanNum chanNum) const
attribute list for a given channel number
bool m_hasRunLumiBlockTime
const std::string & chanName(ChanNum chanNum) const
find name for particular channel
name_const_iterator name_begin() const
Access to Chan/Name pairs via iterators.
static constexpr uint32_t MAXEVENT
name_size_type name_size() const
number of Chan/Name pairs
bool isSameButMinRange(const CondAttrListCollection &rhs, bool ignoreIOVs=false) const
Equal operator which ignores minRange.
coral::AttributeListSpecification * m_spec
CondAttrListCollection()
Default constructor - we hide it to prevent clients from using it - forcing them to specify the type ...
ChanAttrListMap::size_type size_type
iov_const_iterator iov_begin() const
Access to Chan/IOV pairs via iterators.
static constexpr uint32_t MINEVENT
size_type size() const
number of Chan/AttributeList pairs
const_iterator chanAttrListPair(ChanNum chanNum) const
Access to Chan/AttributeList pairs via channel number: returns map iterator.
ChanAttrListMap::const_iterator const_iterator
name_const_iterator chanNamePair(ChanNum chanNum) const
Access to Chan/Name pairs via channel number: returns map iterator.
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
const IOVRange & iovRange(ChanNum chanNum) const
IOVRange list for a given channel number.
static constexpr uint64_t MINTIMESTAMP
coral::AttributeList AttributeList
iov_const_iterator chanIOVPair(ChanNum chanNum) const
Access to Chan/IOV pairs via channel number: returns map iterator.
bool operator==(const CondAttrListCollection &rhs) const
Equal operator.
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
macros to associate a CLID to a type
ChanNameMap::value_type ChanNamePair
ChanNameMap::size_type name_size_type
void addShared(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs with shared data.
name_const_iterator name_end() const