CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
TimeValidityInterval Struct Reference

Validity interval in timestamps. More...

#include <RPAlignmentCorrectionsDataSequence.h>

Public Member Functions

bool operator< (const TimeValidityInterval &o) const
 
void SetInfinite ()
 
 TimeValidityInterval (edm::TimeValue_t _f=0, edm::TimeValue_t _l=0)
 

Static Public Member Functions

static const edm::TimeValue_t BeginOfTime ()
 
static const edm::TimeValue_t EndOfTime ()
 
static edm::TimeValue_t UNIXStringToValue (const std::string &s)
 
static std::string ValueToUNIXString (const edm::TimeValue_t &v)
 

Public Attributes

edm::TimeValue_t first
 the boundaries (included) of the interval expressed as UNIX timestamps More...
 
edm::TimeValue_t last
 

Detailed Description

Validity interval in timestamps.

Definition at line 23 of file RPAlignmentCorrectionsDataSequence.h.

Constructor & Destructor Documentation

TimeValidityInterval::TimeValidityInterval ( edm::TimeValue_t  _f = 0,
edm::TimeValue_t  _l = 0 
)
inline

Definition at line 28 of file RPAlignmentCorrectionsDataSequence.h.

Referenced by RPAlignmentCorrectionsDataSequence::insert().

28 : first( _f ), last( _l ) {}
edm::TimeValue_t first
the boundaries (included) of the interval expressed as UNIX timestamps

Member Function Documentation

static const edm::TimeValue_t TimeValidityInterval::BeginOfTime ( )
inlinestatic

Definition at line 30 of file RPAlignmentCorrectionsDataSequence.h.

References edm::Timestamp::beginOfTime(), and edm::Timestamp::value().

Referenced by SetInfinite(), UNIXStringToValue(), and ValueToUNIXString().

30 { return edm::Timestamp::beginOfTime().value(); }
static Timestamp beginOfTime()
Definition: Timestamp.h:103
TimeValue_t value() const
Definition: Timestamp.h:56
static const edm::TimeValue_t TimeValidityInterval::EndOfTime ( )
inlinestatic
bool TimeValidityInterval::operator< ( const TimeValidityInterval o) const
inline

Definition at line 57 of file RPAlignmentCorrectionsDataSequence.h.

References first, and last.

57  {
58  if ( first < o.first ) return true;
59  if ( first > o.first ) return false;
60  if ( last < o.last ) return true;
61  return false;
62  }
edm::TimeValue_t first
the boundaries (included) of the interval expressed as UNIX timestamps
void TimeValidityInterval::SetInfinite ( )
inline

Definition at line 33 of file RPAlignmentCorrectionsDataSequence.h.

References BeginOfTime(), and EndOfTime().

Referenced by RPAlignmentCorrectionsDataSequence::loadXMLFile().

33  {
34  first = BeginOfTime();
35  last = EndOfTime();
36  }
static const edm::TimeValue_t BeginOfTime()
edm::TimeValue_t first
the boundaries (included) of the interval expressed as UNIX timestamps
static const edm::TimeValue_t EndOfTime()
static edm::TimeValue_t TimeValidityInterval::UNIXStringToValue ( const std::string &  s)
inlinestatic

Definition at line 48 of file RPAlignmentCorrectionsDataSequence.h.

References BeginOfTime(), EndOfTime(), and findQualityFiles::v.

Referenced by RPAlignmentCorrectionsDataSequence::loadXMLFile().

48  {
49  if ( s == "-inf" ) return BeginOfTime();
50  if ( s == "+inf" ) return EndOfTime();
51 
52  // see: src/framework/DataFormats/Provenance/interface/Timestamp.h
53  edm::TimeValue_t v = atoi(s.c_str());
54  return v << 32;
55  }
unsigned long long TimeValue_t
Definition: Timestamp.h:28
static const edm::TimeValue_t BeginOfTime()
static const edm::TimeValue_t EndOfTime()
static std::string TimeValidityInterval::ValueToUNIXString ( const edm::TimeValue_t v)
inlinestatic

Definition at line 38 of file RPAlignmentCorrectionsDataSequence.h.

References BeginOfTime(), and EndOfTime().

Referenced by CTPPSIncludeAlignments::Merge(), CTPPSIncludeAlignments::setIntervalFor(), and RPAlignmentCorrectionsDataSequence::writeXMLFile().

38  {
39  if ( v == BeginOfTime() ) return "-inf";
40  if ( v == EndOfTime() ) return "+inf";
41 
42  // see: src/framework/DataFormats/Provenance/interface/Timestamp.h
43  char buf[50];
44  sprintf(buf, "%llu", v >> 32);
45  return buf;
46  }
static const edm::TimeValue_t BeginOfTime()
static const edm::TimeValue_t EndOfTime()

Member Data Documentation

edm::TimeValue_t TimeValidityInterval::first

the boundaries (included) of the interval expressed as UNIX timestamps

Definition at line 26 of file RPAlignmentCorrectionsDataSequence.h.

Referenced by CTPPSIncludeAlignments::Merge(), and operator<().

edm::TimeValue_t TimeValidityInterval::last