Loading [MathJax]/jax/output/SVG/config.js
 |
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"
180 bool ignoreIOVs =
false)
const;
197 coral::AttributeListSpecification*
m_spec;
202 #include "AthenaKernel/CondCont.h"
213 m_hasUniqueIOV(true),
214 m_hasRunLumiBlockTime(true),
223 m_hasUniqueIOV(true),
224 m_hasRunLumiBlockTime(hasRunLumiBlockTime),
237 DataObject::DataObject(rhs),
238 m_iovMap(rhs.m_iovMap),
239 m_nameMap(rhs.m_nameMap),
240 m_minRange(rhs.m_minRange),
241 m_hasUniqueIOV(rhs.m_hasUniqueIOV),
242 m_hasRunLumiBlockTime(rhs.m_hasRunLumiBlockTime),
248 m_spec=
new coral::AttributeListSpecification();
250 for (coral::AttributeList::const_iterator itr=atr1.begin();itr!=atr1.end();++itr) {
251 const coral::AttributeSpecification& aspec=itr->specification();
252 m_spec->extend(aspec.name(),aspec.typeName());
258 newit->second.fastCopyData(itr->second);
396 else return (0xFFFF);
431 static const std::string
name;
455 m_spec=
new coral::AttributeListSpecification();
457 const coral::AttributeSpecification& aspec=itr->specification();
458 m_spec->extend(aspec.name(),aspec.typeName());
472 m_spec=
new coral::AttributeListSpecification();
474 const coral::AttributeSpecification& aspec=itr->specification();
475 m_spec->extend(aspec.name(),aspec.typeName());
541 for (;
it1 != last1; ++
it1) {
560 std::cout <<
"min range: " <<
m_minRange << std::endl;
565 for (;
it != last; ++
it) {
566 std::cout <<
"chan, attr: " << (*it).first << std::endl;
567 (*it).second.toOutputStream(std::cout) << std::endl;
572 for (;
it1 != last1; ++
it1) {
573 std::cout <<
"chan, iov: " << (*it1).first << std::endl;
574 std::cout << (*it1).second << std::endl;
579 for (; it2 != last2; ++it2) {
580 std::cout <<
"chan, name: " << (*it2).first << std::endl;
581 std::cout << (*it2).second << std::endl;
593 for(; itIOV != lastIOV; ++itIOV) {
594 stream <<
"chan, iov: " << (*itIOV).first <<
" " << (*itIOV).second << std::endl;
599 for(; itAtt != lastAtt; ++itAtt) {
600 stream <<
"chan, attr: " << (*itAtt).first << std::endl;
601 (*itAtt).second.toOutputStream(
stream) << std::endl;
606 for (; itName != lastName; ++itName) {
607 stream <<
"chan, name: " << (*itName).first <<
" " << (*itName).second << std::endl;
629 return (!((*
this) == rhs));
635 bool ignoreIOVs )
const
651 for (;
it1 != end1; ++
it1, ++it2) {
652 if ((*it1).first != (*it2).first)
return false;
653 if ((*it1).second != (*it2).second)
return false;
661 for (; it3 != end3; ++it3, ++it4) {
662 if ((*it3).first != (*it4).first)
return false;
663 if ((*it3).second != (*it4).second)
return false;
670 for (; it5 != end5; ++it5, ++it6) {
671 if ((*it5).first != (*it6).first)
return false;
672 if ((*it5).second != (*it6).second)
return false;
684 if (attrRet.second)
m_attrMap.erase(oldChan);
688 if (iovRet.second)
m_iovMap.erase(oldChan);
692 if (nameRet.second)
m_nameMap.erase(oldChan);
694 return attrRet.first->first == newChan
695 && iovRet.first->first == newChan
696 && nameRet.first->first == newChan;
701 #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
std::vector< HWIdentifier >::iterator it1
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