ATLAS Offline Software
Loading...
Searching...
No Matches
IOVRange.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/MsgStream.h"
7#include "GaudiKernel/EventIDRange.h"
8
9#include <format>
10#include <sstream>
11#include <stdexcept>
12#include <iostream>
13
14/*****************************************************************************
15 *
16 * IOVRange.cxx
17 * IOVSvc
18 *
19 * Author: Charles Leggett
20 *
21 * Validity Range object. Holds two IOVTimes (start and stop)
22 *
23 *****************************************************************************/
24
28
29IOVRange::IOVRange( const EventIDRange& eir ):
30 m_start(eir.start()), m_stop(eir.stop()) {
31 static_assert(std::is_trivially_copyable<IOVRange>::value);
32 static_assert(std::is_trivially_destructible<IOVRange>::value);
33 static_assert(std::is_trivially_copyable<IOVTime>::value);
34 static_assert(std::is_trivially_destructible<IOVTime>::value);
35}
36
37
38IOVRange::operator EventIDRange() const {
39 return EventIDRange( EventIDBase(m_start), EventIDBase(m_stop) );
40}
41
42
43std::ostream& operator << (std::ostream& os, const IOVRange& rhs) {
44 os << (std::string) rhs;
45 return os;
46}
47
48MsgStream& operator<< (MsgStream &msg, const IOVRange& rhs) {
49 msg << (std::string) rhs;
50 return msg;
51}
52
53IOVRange::operator std::string () const {
54 return std::format ("{{{} - {}}}", m_start, m_stop);
55}
std::ostream & operator<<(std::ostream &os, const IOVRange &rhs)
Definition IOVRange.cxx:43
Validity Range object.
const IOVTime & stop() const
Definition IOVRange.h:39
IOVRange()
Definition IOVRange.h:32
const IOVTime & start() const
Definition IOVRange.h:38
IOVTime m_start
Definition IOVRange.h:56
IOVTime m_stop
Definition IOVRange.h:57
Basic time unit for IOVSvc.
Definition IOVTime.h:34
MsgStream & msg
Definition testRead.cxx:32