ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CondAttrListCollection Class Reference

This class is a collection of AttributeLists where each one is associated with a channel number. This allows R/W with COOL of multichannel conditions objects, stored in COOL itself. The collection looks like a vector of pairs of (channel num, AttributeList) where one may iterate over all of them or access each AttrList by channel number as in a map. One also maintains the IOV of each channel allow update of only invalid channels. More...

#include <CondAttrListCollection.h>

Inheritance diagram for CondAttrListCollection:
Collaboration diagram for CondAttrListCollection:

Public Types

typedef unsigned int ChanNum
 
typedef coral::AttributeList AttributeList
 
typedef std::map< ChanNum, coral::AttributeList > ChanAttrListMap
 
typedef ChanAttrListMap::value_type ChanAttrListPair
 
typedef std::map< ChanNum, IOVRangeChanIOVMap
 
typedef ChanIOVMap::value_type ChanIOVPair
 
typedef std::map< ChanNum, std::string > ChanNameMap
 
typedef ChanNameMap::value_type ChanNamePair
 
typedef ChanAttrListMap::const_iterator const_iterator
 
typedef ChanAttrListMap::iterator iterator
 
typedef ChanAttrListMap::size_type size_type
 
typedef ChanIOVMap::const_iterator iov_const_iterator
 
typedef ChanIOVMap::iterator iov_iterator
 
typedef ChanIOVMap::size_type iov_size_type
 
typedef ChanNameMap::const_iterator name_const_iterator
 
typedef ChanNameMap::iterator name_iterator
 
typedef ChanNameMap::size_type name_size_type
 

Public Member Functions

 CondAttrListCollection (bool hasRunLumiBlockTime)
 Constructor with specification for type of time: run/lumiBlock or timestamp. More...
 
 ~CondAttrListCollection ()
 
 CondAttrListCollection (const CondAttrListCollection &rhs)
 
CondAttrListCollectionoperator= (const CondAttrListCollection &rhs)=delete
 
const_iterator chanAttrListPair (ChanNum chanNum) const
 Access to Chan/AttributeList pairs via channel number: returns map iterator. More...
 
const_iterator begin () const
 Access to Chan/AttributeList pairs via iterators. More...
 
const_iterator end () const
 
size_type size () const
 number of Chan/AttributeList pairs More...
 
iov_const_iterator chanIOVPair (ChanNum chanNum) const
 Access to Chan/IOV pairs via channel number: returns map iterator. More...
 
iov_const_iterator iov_begin () const
 Access to Chan/IOV pairs via iterators. More...
 
iov_const_iterator iov_end () const
 
iov_size_type iov_size () const
 number of Chan/IOV pairs More...
 
name_const_iterator chanNamePair (ChanNum chanNum) const
 Access to Chan/Name pairs via channel number: returns map iterator. More...
 
name_const_iterator name_begin () const
 Access to Chan/Name pairs via iterators. More...
 
name_const_iterator name_end () const
 
name_size_type name_size () const
 number of Chan/Name pairs More...
 
ChanNum chanNum (unsigned int index) const
 channel number for index: (index = 0 to size-1) More...
 
bool fixChanNum (ChanNum oldChan, ChanNum newChan)
 
const AttributeListattributeList (ChanNum chanNum) const
 attribute list for a given channel number More...
 
const IOVRangeiovRange (ChanNum chanNum) const
 IOVRange list for a given channel number. More...
 
const std::string & chanName (ChanNum chanNum) const
 find name for particular channel More...
 
IOVRange minRange () const
 Current minimal IOVRange. More...
 
bool hasUniqueIOV () const
 Check whether there is a unique IOV for all channels. More...
 
bool add (ChanNum chanNum, const AttributeList &attributeList)
 Adding in chan/attrList pairs. More...
 
void addShared (ChanNum chanNum, const AttributeList &attributeList)
 Adding in chan/attrList pairs with shared data. More...
 
void add (ChanNum chanNum, const IOVRange &range)
 Adding in chan/iov range pairs. More...
 
void add (ChanNum chanNum, const std::string &name)
 Adding in chan/name pairs: ASSUMED TO BE IN ORDER. More...
 
void addNewStart (const IOVTime &start)
 Add new start time to minRange - make sure that start is >= to new start. More...
 
void addNewStop (const IOVTime &stop)
 Add new stop time to minRange - make sure that stop is <= to new stop
More...
 
void resetMinRange ()
 Reset minRange according to the IOVs of the contained channels. More...
 
void dump () const
 Dump our contents to std::cout. More...
 
void dump (std::ostringstream &stream) const
 Dump the contents to std::ostringstream. More...
 
bool operator== (const CondAttrListCollection &rhs) const
 Equal operator. More...
 
bool operator!= (const CondAttrListCollection &rhs) const
 Comparison operator. More...
 
bool isSameButMinRange (const CondAttrListCollection &rhs, bool ignoreIOVs=false) const
 Equal operator which ignores minRange. More...
 

Private Member Functions

 CondAttrListCollection ()
 Default constructor - we hide it to prevent clients from using it - forcing them to specify the type of IOVTime with the other constructor. More...
 

Private Attributes

ChanAttrListMap m_attrMap
 
ChanIOVMap m_iovMap
 
ChanNameMap m_nameMap
 
IOVRange m_minRange
 
bool m_hasUniqueIOV
 
bool m_hasRunLumiBlockTime
 
coral::AttributeListSpecification * m_spec
 

Detailed Description

This class is a collection of AttributeLists where each one is associated with a channel number. This allows R/W with COOL of multichannel conditions objects, stored in COOL itself. The collection looks like a vector of pairs of (channel num, AttributeList) where one may iterate over all of them or access each AttrList by channel number as in a map. One also maintains the IOV of each channel allow update of only invalid channels.

WARNING: In order to accumulation correctly the minimum IOVRange for all channels one needs to use the constructor which specifies the type of time being used, i.e. run/lumiBlock or timestamp

Definition at line 51 of file CondAttrListCollection.h.

Member Typedef Documentation

◆ AttributeList

typedef coral::AttributeList CondAttrListCollection::AttributeList

Definition at line 56 of file CondAttrListCollection.h.

◆ ChanAttrListMap

typedef std::map<ChanNum, coral::AttributeList> CondAttrListCollection::ChanAttrListMap

Definition at line 57 of file CondAttrListCollection.h.

◆ ChanAttrListPair

typedef ChanAttrListMap::value_type CondAttrListCollection::ChanAttrListPair

Definition at line 58 of file CondAttrListCollection.h.

◆ ChanIOVMap

Definition at line 59 of file CondAttrListCollection.h.

◆ ChanIOVPair

typedef ChanIOVMap::value_type CondAttrListCollection::ChanIOVPair

Definition at line 60 of file CondAttrListCollection.h.

◆ ChanNameMap

typedef std::map<ChanNum, std::string> CondAttrListCollection::ChanNameMap

Definition at line 61 of file CondAttrListCollection.h.

◆ ChanNamePair

typedef ChanNameMap::value_type CondAttrListCollection::ChanNamePair

Definition at line 62 of file CondAttrListCollection.h.

◆ ChanNum

typedef unsigned int CondAttrListCollection::ChanNum

Definition at line 55 of file CondAttrListCollection.h.

◆ const_iterator

typedef ChanAttrListMap::const_iterator CondAttrListCollection::const_iterator

Definition at line 63 of file CondAttrListCollection.h.

◆ iov_const_iterator

typedef ChanIOVMap::const_iterator CondAttrListCollection::iov_const_iterator

Definition at line 66 of file CondAttrListCollection.h.

◆ iov_iterator

typedef ChanIOVMap::iterator CondAttrListCollection::iov_iterator

Definition at line 67 of file CondAttrListCollection.h.

◆ iov_size_type

typedef ChanIOVMap::size_type CondAttrListCollection::iov_size_type

Definition at line 68 of file CondAttrListCollection.h.

◆ iterator

typedef ChanAttrListMap::iterator CondAttrListCollection::iterator

Definition at line 64 of file CondAttrListCollection.h.

◆ name_const_iterator

typedef ChanNameMap::const_iterator CondAttrListCollection::name_const_iterator

Definition at line 69 of file CondAttrListCollection.h.

◆ name_iterator

typedef ChanNameMap::iterator CondAttrListCollection::name_iterator

Definition at line 70 of file CondAttrListCollection.h.

◆ name_size_type

typedef ChanNameMap::size_type CondAttrListCollection::name_size_type

Definition at line 71 of file CondAttrListCollection.h.

◆ size_type

typedef ChanAttrListMap::size_type CondAttrListCollection::size_type

Definition at line 65 of file CondAttrListCollection.h.

Constructor & Destructor Documentation

◆ CondAttrListCollection() [1/3]

CondAttrListCollection::CondAttrListCollection ( bool  hasRunLumiBlockTime)
inline

Constructor with specification for type of time: run/lumiBlock or timestamp.

Definition at line 219 of file CondAttrListCollection.h.

◆ ~CondAttrListCollection()

CondAttrListCollection::~CondAttrListCollection ( )
inline

Definition at line 231 of file CondAttrListCollection.h.

231  {
232  if (m_spec!=0) m_spec->release();
233 }

◆ CondAttrListCollection() [2/3]

CondAttrListCollection::CondAttrListCollection ( const CondAttrListCollection rhs)
inline

Definition at line 235 of file CondAttrListCollection.h.

236  :
237  DataObject::DataObject(rhs),
238  m_iovMap(rhs.m_iovMap),
239  m_nameMap(rhs.m_nameMap),
240  m_minRange(rhs.m_minRange),
243  m_spec(0)
244 {
245  // members with normal semantics setup in initialisation list
246  // make a new cached AttributeListSpecificaiton and make the payload use it
247  if (rhs.m_attrMap.size()>0) {
248  m_spec=new coral::AttributeListSpecification();
249  const coral::AttributeList& atr1=rhs.m_attrMap.begin()->second;
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());
253  }
254  for (const_iterator itr=rhs.m_attrMap.begin();itr!=rhs.m_attrMap.end();
255  ++itr)
256  {
257  auto newit = m_attrMap.try_emplace (itr->first, *m_spec, true).first;
258  newit->second.fastCopyData(itr->second);
259  }
260  }
261 }

◆ CondAttrListCollection() [3/3]

CondAttrListCollection::CondAttrListCollection ( )
inlineprivate

Default constructor - we hide it to prevent clients from using it - forcing them to specify the type of IOVTime with the other constructor.

Definition at line 209 of file CondAttrListCollection.h.

Member Function Documentation

◆ add() [1/3]

bool CondAttrListCollection::add ( ChanNum  chanNum,
const AttributeList attributeList 
)
inline

Adding in chan/attrList pairs.

Adding in chan/attrList pairs: ASSUMED TO BE IN ORDER.

Definition at line 452 of file CondAttrListCollection.h.

453 {
454  if (m_attrMap.size()==0) {
455  m_spec=new coral::AttributeListSpecification();
456  for (coral::AttributeList::const_iterator itr=attributeList.begin();itr!=attributeList.end();++itr) {
457  const coral::AttributeSpecification& aspec=itr->specification();
458  m_spec->extend(aspec.name(),aspec.typeName());
459  }
460  }
462  m_attrMap[chanNum].fastCopyData(attributeList);
463 
464  return true;
465 }

◆ add() [2/3]

void CondAttrListCollection::add ( ChanNum  chanNum,
const IOVRange range 
)
inline

Adding in chan/iov range pairs.

Adding in chan/iov pairs: ASSUMED TO BE IN ORDER.

Definition at line 484 of file CondAttrListCollection.h.

485 {
487 
488  // Accumulate minRange
490  if (m_minRange.start() < range.start()) start = range.start();
492  if (range.stop() < m_minRange.stop()) stop = range.stop();
494  if (m_hasUniqueIOV && range != m_minRange)m_hasUniqueIOV = false;
495 }

◆ add() [3/3]

void CondAttrListCollection::add ( ChanNum  chanNum,
const std::string &  name 
)
inline

Adding in chan/name pairs: ASSUMED TO BE IN ORDER.

Definition at line 499 of file CondAttrListCollection.h.

500 {
502 }

◆ addNewStart()

void CondAttrListCollection::addNewStart ( const IOVTime start)
inline

Add new start time to minRange - make sure that start is >= to new start.

Definition at line 508 of file CondAttrListCollection.h.

509 {
510  if (start > m_minRange.start()) {
512  }
513 }

◆ addNewStop()

void CondAttrListCollection::addNewStop ( const IOVTime stop)
inline

Add new stop time to minRange - make sure that stop is <= to new stop

Add new stop time to minRange - make sure that stop is <= to new stop.

Definition at line 518 of file CondAttrListCollection.h.

519 {
520  if (stop < m_minRange.stop()) {
522  }
523 }

◆ addShared()

void CondAttrListCollection::addShared ( ChanNum  chanNum,
const AttributeList attributeList 
)
inline

Adding in chan/attrList pairs with shared data.

Adding in chan/attrList pairs with shared AttrList: ASSUMED TO BE IN ORDER.

Definition at line 469 of file CondAttrListCollection.h.

470 {
471  if (m_attrMap.size()==0) {
472  m_spec=new coral::AttributeListSpecification();
473  for (coral::AttributeList::const_iterator itr=attributeList.begin();itr!=attributeList.end();++itr) {
474  const coral::AttributeSpecification& aspec=itr->specification();
475  m_spec->extend(aspec.name(),aspec.typeName());
476  }
477  }
480 }

◆ attributeList()

const CondAttrListCollection::AttributeList & CondAttrListCollection::attributeList ( ChanNum  chanNum) const
inline

attribute list for a given channel number

Definition at line 401 of file CondAttrListCollection.h.

402 {
403  const_iterator itr=m_attrMap.find(chanNum);
404  if (itr!=m_attrMap.end()) {
405  return itr->second;
406  } else {
407  static const AttributeList attr;
408  return attr;
409  }
410 }

◆ begin()

CondAttrListCollection::const_iterator CondAttrListCollection::begin ( ) const
inline

Access to Chan/AttributeList pairs via iterators.

Definition at line 309 of file CondAttrListCollection.h.

310 {
311  return (m_attrMap.begin());
312 }

◆ chanAttrListPair()

CondAttrListCollection::const_iterator CondAttrListCollection::chanAttrListPair ( ChanNum  chanNum) const
inline

Access to Chan/AttributeList pairs via channel number: returns map iterator.

Access to Chan/AttributeList pairs via channel number.

Definition at line 301 of file CondAttrListCollection.h.

302 {
303  return (m_attrMap.find(chanNum));
304 }

◆ chanIOVPair()

CondAttrListCollection::iov_const_iterator CondAttrListCollection::chanIOVPair ( ChanNum  chanNum) const
inline

Access to Chan/IOV pairs via channel number: returns map iterator.

Access to IOV pairs via channel number.

Definition at line 330 of file CondAttrListCollection.h.

331 {
332  return (m_iovMap.find(chanNum));
333 }

◆ chanName()

const std::string & CondAttrListCollection::chanName ( ChanNum  chanNum) const
inline

find name for particular channel

Definition at line 426 of file CondAttrListCollection.h.

426  {
428  if (itr!=m_nameMap.end()) {
429  return itr->second;
430  } else {
431  static const std::string name;
432  return name;
433  }
434 }

◆ chanNamePair()

CondAttrListCollection::name_const_iterator CondAttrListCollection::chanNamePair ( ChanNum  chanNum) const
inline

Access to Chan/Name pairs via channel number: returns map iterator.

Access to name via channel number.

Definition at line 357 of file CondAttrListCollection.h.

358 {
359  return (m_nameMap.find(chanNum));
360 }

◆ chanNum()

CondAttrListCollection::ChanNum CondAttrListCollection::chanNum ( unsigned int  index) const
inline

channel number for index: (index = 0 to size-1)

Definition at line 384 of file CondAttrListCollection.h.

385 {
386  if (index < size()) {
387  const_iterator it = begin();
388  unsigned int count = index;
389  while (count > 0) {
390  ++it;
391  --count;
392  }
393  return (it->first);
394  }
395  // otherwise return max
396  else return (0xFFFF);
397 }

◆ dump() [1/2]

void CondAttrListCollection::dump ( ) const
inline

Dump our contents to std::cout.

Definition at line 557 of file CondAttrListCollection.h.

558 {
559  // min range
560  std::cout << "min range: " << m_minRange << std::endl;
561 
562  // attribute list
563  const_iterator it = begin();
564  const_iterator last = end();
565  for (; it != last; ++it) {
566  std::cout << "chan, attr: " << (*it).first << std::endl;
567  (*it).second.toOutputStream(std::cout) << std::endl;
568  }
569  // IOVs
571  iov_const_iterator last1 = iov_end();
572  for (; it1 != last1; ++it1) {
573  std::cout << "chan, iov: " << (*it1).first << std::endl;
574  std::cout << (*it1).second << std::endl;
575  }
576  // channel names
578  name_const_iterator last2 = name_end();
579  for (; it2 != last2; ++it2) {
580  std::cout << "chan, name: " << (*it2).first << std::endl;
581  std::cout << (*it2).second << std::endl;
582  }
583 
584 }

◆ dump() [2/2]

void CondAttrListCollection::dump ( std::ostringstream &  stream) const
inline

Dump the contents to std::ostringstream.

Definition at line 587 of file CondAttrListCollection.h.

588 {
589  stream << m_minRange << " iov size " << m_iovMap.size() << std::endl;
590  // IOVs
591  iov_const_iterator itIOV = iov_begin();
592  iov_const_iterator lastIOV = iov_end();
593  for(; itIOV != lastIOV; ++itIOV) {
594  stream << "chan, iov: " << (*itIOV).first << " " << (*itIOV).second << std::endl;
595  }
596  // Attribute list
597  const_iterator itAtt = begin();
598  const_iterator lastAtt = end();
599  for(; itAtt != lastAtt; ++itAtt) {
600  stream << "chan, attr: " << (*itAtt).first << std::endl;
601  (*itAtt).second.toOutputStream(stream) << std::endl;
602  }
603  // channel names
604  name_const_iterator itName = name_begin();
605  name_const_iterator lastName = name_end();
606  for (; itName != lastName; ++itName) {
607  stream << "chan, name: " << (*itName).first << " " << (*itName).second << std::endl;
608  }
609 }

◆ end()

CondAttrListCollection::const_iterator CondAttrListCollection::end ( ) const
inline

Definition at line 315 of file CondAttrListCollection.h.

316 {
317  return (m_attrMap.end());
318 }

◆ fixChanNum()

bool CondAttrListCollection::fixChanNum ( ChanNum  oldChan,
ChanNum  newChan 
)
inline

Definition at line 680 of file CondAttrListCollection.h.

681  {
682  auto attrRet = m_attrMap.emplace(newChan, m_attrMap[oldChan]);
683  // if a new element was inserted, erase the old one
684  if (attrRet.second) m_attrMap.erase(oldChan);
685 
686  auto iovRet = m_iovMap.emplace(newChan, m_iovMap[oldChan]);
687  // if a new element was inserted, erase the old one
688  if (iovRet.second) m_iovMap.erase(oldChan);
689 
690  auto nameRet = m_nameMap.emplace(newChan, m_nameMap[oldChan]);
691  // if a new element was inserted, erase the old one
692  if (nameRet.second) m_nameMap.erase(oldChan);
693 
694  return attrRet.first->first == newChan
695  && iovRet.first->first == newChan
696  && nameRet.first->first == newChan;
697  }

◆ hasUniqueIOV()

bool CondAttrListCollection::hasUniqueIOV ( ) const
inline

Check whether there is a unique IOV for all channels.

Definition at line 445 of file CondAttrListCollection.h.

446 {
447  return (m_hasUniqueIOV);
448 }

◆ iov_begin()

CondAttrListCollection::iov_const_iterator CondAttrListCollection::iov_begin ( ) const
inline

Access to Chan/IOV pairs via iterators.

Access to AttributeList pairs via iterators.

Definition at line 337 of file CondAttrListCollection.h.

338 {
339  return (m_iovMap.begin());
340 }

◆ iov_end()

CondAttrListCollection::iov_const_iterator CondAttrListCollection::iov_end ( ) const
inline

Definition at line 343 of file CondAttrListCollection.h.

344 {
345  return (m_iovMap.end());
346 }

◆ iov_size()

CondAttrListCollection::iov_size_type CondAttrListCollection::iov_size ( ) const
inline

number of Chan/IOV pairs

number of pairs

Definition at line 350 of file CondAttrListCollection.h.

351 {
352  return (m_iovMap.size());
353 }

◆ iovRange()

const IOVRange & CondAttrListCollection::iovRange ( ChanNum  chanNum) const
inline

IOVRange list for a given channel number.

Definition at line 414 of file CondAttrListCollection.h.

415 {
417  if (itr!=m_iovMap.end()) {
418  return itr->second;
419  } else {
420  // Default is the minRange
421  return (m_minRange);
422  }
423 }

◆ isSameButMinRange()

bool CondAttrListCollection::isSameButMinRange ( const CondAttrListCollection rhs,
bool  ignoreIOVs = false 
) const
inline

Equal operator which ignores minRange.

Same as equal operator but ignores the values for minRange. This allows merging of AttrListColls which have the same content and differ only by the minRange.

Definition at line 634 of file CondAttrListCollection.h.

636 {
637 
638  // Compare with right hand side
639 
640  if(m_hasUniqueIOV != rhs.m_hasUniqueIOV) return false;
641  if(m_hasRunLumiBlockTime != rhs.m_hasRunLumiBlockTime) return false;
642  if (m_attrMap.size() != rhs.m_attrMap.size()) return false;
643  if (m_iovMap.size() != rhs.m_iovMap.size()) return false;
644  if (m_nameMap.size() != rhs.m_nameMap.size()) return false;
645 
646  if (!ignoreIOVs) {
647  // Check IOVs
648  iov_const_iterator it1 = m_iovMap.begin();
649  iov_const_iterator it2 = rhs.m_iovMap.begin();
650  iov_const_iterator end1 = m_iovMap.end();
651  for (; it1 != end1; ++it1, ++it2) {
652  if ((*it1).first != (*it2).first) return false;
653  if ((*it1).second != (*it2).second) return false;
654  }
655  }
656 
657  // Check attribute lists
658  const_iterator it3 = m_attrMap.begin();
659  const_iterator it4 = rhs.m_attrMap.begin();
660  const_iterator end3 = m_attrMap.end();
661  for (; it3 != end3; ++it3, ++it4) {
662  if ((*it3).first != (*it4).first) return false;
663  if ((*it3).second != (*it4).second) return false;
664  }
665 
666  // Check names
667  name_const_iterator it5 = m_nameMap.begin();
668  name_const_iterator it6 = rhs.m_nameMap.begin();
669  name_const_iterator end5 = m_nameMap.end();
670  for (; it5 != end5; ++it5, ++it6) {
671  if ((*it5).first != (*it6).first) return false;
672  if ((*it5).second != (*it6).second) return false;
673  }
674 
675  return true;
676 }

◆ minRange()

IOVRange CondAttrListCollection::minRange ( ) const
inline

Current minimal IOVRange.

Definition at line 438 of file CondAttrListCollection.h.

439 {
440  return (m_minRange);
441 }

◆ name_begin()

CondAttrListCollection::name_const_iterator CondAttrListCollection::name_begin ( ) const
inline

Access to Chan/Name pairs via iterators.

Access to chan/name pairs via iterators.

Definition at line 364 of file CondAttrListCollection.h.

365 {
366  return (m_nameMap.begin());
367 }

◆ name_end()

CondAttrListCollection::name_const_iterator CondAttrListCollection::name_end ( ) const
inline

Definition at line 370 of file CondAttrListCollection.h.

371 {
372  return (m_nameMap.end());
373 }

◆ name_size()

CondAttrListCollection::name_size_type CondAttrListCollection::name_size ( ) const
inline

number of Chan/Name pairs

number of pairs

Definition at line 377 of file CondAttrListCollection.h.

378 {
379  return (m_nameMap.size());
380 }

◆ operator!=()

Comparison operator.

Compares channels, IOVs and attributes. For attributes only types and values are compared, not the attribute names

Definition at line 627 of file CondAttrListCollection.h.

628 {
629  return (!((*this) == rhs));
630 }

◆ operator=()

CondAttrListCollection& CondAttrListCollection::operator= ( const CondAttrListCollection rhs)
delete

◆ operator==()

bool CondAttrListCollection::operator== ( const CondAttrListCollection rhs) const
inline

Equal operator.

Compares channels, IOVs and attributes. For attributes only types and values are compared, not the attribute names

Definition at line 614 of file CondAttrListCollection.h.

615 {
616 
617  // Compare minRange
618  if (m_minRange != rhs.m_minRange) return false;
619  // Rest is in isSameButMinRange
620  return (isSameButMinRange (rhs));
621 }

◆ resetMinRange()

void CondAttrListCollection::resetMinRange ( )
inline

Reset minRange according to the IOVs of the contained channels.

This is needed to expand minRange, done with a subsequent addNewStart/Stop.

Definition at line 529 of file CondAttrListCollection.h.

530 {
531  // Reset minRange to max
532  if (m_minRange.start().isTimestamp()) {
534  }
535  else {
538  }
540  iov_const_iterator last1 = iov_end();
541  for (; it1 != last1; ++it1) {
542  const IOVTime& start = (*it1).second.start();
543  const IOVTime& stop = (*it1).second.stop();
544  if (start > m_minRange.start() && stop < m_minRange.stop()) {
546  }
547  else if (start > m_minRange.start()) {
549  }
550  else if (stop < m_minRange.stop()) {
552  }
553  }
554 }

◆ size()

CondAttrListCollection::size_type CondAttrListCollection::size ( ) const
inline

number of Chan/AttributeList pairs

number of pairs

Definition at line 322 of file CondAttrListCollection.h.

323 {
324  return (m_attrMap.size());
325 }

Member Data Documentation

◆ m_attrMap

ChanAttrListMap CondAttrListCollection::m_attrMap
private

Definition at line 191 of file CondAttrListCollection.h.

◆ m_hasRunLumiBlockTime

bool CondAttrListCollection::m_hasRunLumiBlockTime
private

Definition at line 196 of file CondAttrListCollection.h.

◆ m_hasUniqueIOV

bool CondAttrListCollection::m_hasUniqueIOV
private

Definition at line 195 of file CondAttrListCollection.h.

◆ m_iovMap

ChanIOVMap CondAttrListCollection::m_iovMap
private

Definition at line 192 of file CondAttrListCollection.h.

◆ m_minRange

IOVRange CondAttrListCollection::m_minRange
private

Definition at line 194 of file CondAttrListCollection.h.

◆ m_nameMap

ChanNameMap CondAttrListCollection::m_nameMap
private

Definition at line 193 of file CondAttrListCollection.h.

◆ m_spec

coral::AttributeListSpecification* CondAttrListCollection::m_spec
private

Definition at line 197 of file CondAttrListCollection.h.


The documentation for this class was generated from the following file:
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
CondAttrListCollection::iov_end
iov_const_iterator iov_end() const
Definition: CondAttrListCollection.h:343
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
index
Definition: index.py:1
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
IOVRange::start
const IOVTime & start() const
Definition: IOVRange.h:38
skel.it
it
Definition: skel.GENtoEVGEN.py:423
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
CondAttrListCollection::iov_const_iterator
ChanIOVMap::const_iterator iov_const_iterator
Definition: CondAttrListCollection.h:66
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
IOVTime::MINRUN
static constexpr uint32_t MINRUN
Definition: IOVTime.h:44
IOVRange::stop
const IOVTime & stop() const
Definition: IOVRange.h:39
CondAttrListCollection::name_const_iterator
ChanNameMap::const_iterator name_const_iterator
Definition: CondAttrListCollection.h:69
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
CondAttrListCollection::m_iovMap
ChanIOVMap m_iovMap
Definition: CondAttrListCollection.h:192
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IOVTime::MAXTIMESTAMP
static constexpr uint64_t MAXTIMESTAMP
Definition: IOVTime.h:58
IOVTime::isTimestamp
bool isTimestamp() const noexcept
Definition: IOVTime.h:111
CondAttrListCollection::m_attrMap
ChanAttrListMap m_attrMap
Definition: CondAttrListCollection.h:191
CondAttrListCollection::chanNum
ChanNum chanNum(unsigned int index) const
channel number for index: (index = 0 to size-1)
Definition: CondAttrListCollection.h:384
CondAttrListCollection::attributeList
const AttributeList & attributeList(ChanNum chanNum) const
attribute list for a given channel number
Definition: CondAttrListCollection.h:401
CondAttrListCollection::m_hasRunLumiBlockTime
bool m_hasRunLumiBlockTime
Definition: CondAttrListCollection.h:196
CondAttrListCollection::name_begin
name_const_iterator name_begin() const
Access to Chan/Name pairs via iterators.
Definition: CondAttrListCollection.h:364
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
CondAttrListCollection::isSameButMinRange
bool isSameButMinRange(const CondAttrListCollection &rhs, bool ignoreIOVs=false) const
Equal operator which ignores minRange.
Definition: CondAttrListCollection.h:634
CondAttrListCollection::m_spec
coral::AttributeListSpecification * m_spec
Definition: CondAttrListCollection.h:197
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CondAttrListCollection::iov_begin
iov_const_iterator iov_begin() const
Access to Chan/IOV pairs via iterators.
Definition: CondAttrListCollection.h:337
IOVTime::MINEVENT
static constexpr uint32_t MINEVENT
Definition: IOVTime.h:50
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
CondAttrListCollection::m_hasUniqueIOV
bool m_hasUniqueIOV
Definition: CondAttrListCollection.h:195
CondAttrListCollection::m_minRange
IOVRange m_minRange
Definition: CondAttrListCollection.h:194
DeMoScan.index
string index
Definition: DeMoScan.py:362
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
IOVTime::MINTIMESTAMP
static constexpr uint64_t MINTIMESTAMP
Definition: IOVTime.h:56
CondAttrListCollection::AttributeList
coral::AttributeList AttributeList
Definition: CondAttrListCollection.h:56
CondAttrListCollection::m_nameMap
ChanNameMap m_nameMap
Definition: CondAttrListCollection.h:193
CondAttrListCollection::name_end
name_const_iterator name_end() const
Definition: CondAttrListCollection.h:370