ATLAS Offline Software
RtRelation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 // $Id: RtRelation.h,v 1.3 2007-06-13 11:10:42 hansenph Exp $
13 
14 #ifndef TRTCONDITIONSDATA_RTRELATION_H
15 #define TRTCONDITIONSDATA_RTRELATION_H
16 
17 #include <sstream>
18 #include <iostream>
19 #include "GaudiKernel/MsgStream.h"
20 
21 namespace TRTCond
22 {
23 
26  class RtRelation
27  {
28  public:
31 
33  RtRelation() = default;
34  virtual ~RtRelation() = default;
35  virtual RtRelation* clone() const = 0 ;
36 
38  virtual int status() const = 0 ;
39 
41  virtual float radius( float driftime ) const = 0 ;
42 
44  virtual float drifttime( float radius ) const = 0 ;
45 
47  virtual float drdt( float driftime ) const = 0 ;
48 
50  virtual size_t footprint() const { return sizeof(*this) ; }
51 
53  virtual bool isequal( const RtRelation& rhs) const = 0 ;
54  bool operator==( const RtRelation& rhs) const { return isequal(rhs) ; }
55 
57  virtual std::ostream& write(std::ostream&) const = 0 ;
58 
60  virtual std::istream& read(std::istream&) = 0 ;
61  } ;
62 
63 }
64 
65 
66 
67 
68 inline std::ostream& operator<<(std::ostream& os,const TRTCond::RtRelation& rtr) {
69  return rtr.write( os ) ;
70 }
71 
72 inline std::istream& operator>>(std::istream& is, TRTCond::RtRelation& rtr) {
73  return rtr.read( is ) ;
74 }
75 
76 inline MsgStream& operator<<(MsgStream& os, const TRTCond::RtRelation& rtr) {
77  std::ostringstream message ;
78  message << rtr ;
79  return os << message.str() ;
80 }
81 #endif
operator<<
std::ostream & operator<<(std::ostream &os, const TRTCond::RtRelation &rtr)
Definition: RtRelation.h:68
TRTCond::RtRelation::status
virtual int status() const =0
status flag of (calibrated) rtrelation
TRTCond::RtRelation::~RtRelation
virtual ~RtRelation()=default
ReweightUtils.message
message
Definition: ReweightUtils.py:15
TRTCond::RtRelation::footprint
virtual size_t footprint() const
memory allocated by this rt-relation
Definition: RtRelation.h:50
TRTCond::RtRelation::read
virtual std::istream & read(std::istream &)=0
read from ascii istream
TRTCond::RtRelation::isequal
virtual bool isequal(const RtRelation &rhs) const =0
equality operator
TRTCond::RtRelation
Definition: RtRelation.h:27
TRTCond::RtRelation::Calibrated
@ Calibrated
Definition: RtRelation.h:30
TRTCond::RtRelation::drifttime
virtual float drifttime(float radius) const =0
drifttime for given radius
TRTCond::RtRelation::Status
Status
enumerates status
Definition: RtRelation.h:30
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TRTCond::RtRelation::RtRelation
RtRelation()=default
constructors, desctructors, cloners
TRTCond::RtRelation::operator==
bool operator==(const RtRelation &rhs) const
Definition: RtRelation.h:54
TRTCond::RtRelation::clone
virtual RtRelation * clone() const =0
TRTCond
Definition: BasicRtRelation.cxx:8
TRTCond::RtRelation::radius
virtual float radius(float driftime) const =0
radius for given drifttime
TRTCond::RtRelation::drdt
virtual float drdt(float driftime) const =0
driftvelocity for given drifttime
TRTCond::RtRelation::Undefined
@ Undefined
Definition: RtRelation.h:30
TRTCond::RtRelation::write
virtual std::ostream & write(std::ostream &) const =0
write to ascii ostream
operator>>
std::istream & operator>>(std::istream &is, TRTCond::RtRelation &rtr)
Definition: RtRelation.h:72