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