CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
XrdAdaptor::QualityMetricWatch Class Reference

#include <QualityMetric.h>

Inheritance diagram for XrdAdaptor::QualityMetricWatch:

Public Member Functions

 QualityMetricWatch ()
 
 QualityMetricWatch (QualityMetricWatch &&)
 
void swap (QualityMetricWatch &)
 
 ~QualityMetricWatch ()
 

Private Member Functions

 QualityMetricWatch (QualityMetric *parent1, QualityMetric *parent2)
 

Private Attributes

QualityMetricm_parent1
 
QualityMetricm_parent2
 
timespec m_start
 

Friends

class QualityMetricSource
 

Detailed Description

Definition at line 18 of file QualityMetric.h.

Constructor & Destructor Documentation

XrdAdaptor::QualityMetricWatch::QualityMetricWatch ( )
inline

Definition at line 22 of file QualityMetric.h.

22 : m_parent1(nullptr), m_parent2(nullptr) {}
QualityMetricWatch::QualityMetricWatch ( QualityMetricWatch &&  that)

Definition at line 50 of file QualityMetric.cc.

References m_parent1, m_parent2, and m_start.

51 {
52  m_parent1 = that.m_parent1;
53  m_parent2 = that.m_parent2;
54  m_start = that.m_start;
55  that.m_parent1 = nullptr;
56  that.m_parent2 = nullptr;
57  that.m_start = {0, 0};
58 }
QualityMetricWatch::~QualityMetricWatch ( )

Definition at line 36 of file QualityMetric.cc.

References XrdAdaptor::QualityMetric::finishWatch(), GET_CLOCK_MONOTONIC, m_parent1, m_parent2, m_start, and AnalysisDataFormats_SUSYBSMObjects::ms.

37 {
38  if (m_parent1 && m_parent2)
39  {
40  timespec stop;
41  GET_CLOCK_MONOTONIC(stop);
42 
43  int ms = 1000*(stop.tv_sec - m_start.tv_sec) + (stop.tv_nsec - m_start.tv_nsec)/1e6;
44  edm::LogVerbatim("XrdAdaptorInternal") << "Finished timer after " << ms << std::endl;
45  m_parent1->finishWatch(stop, ms);
46  m_parent2->finishWatch(stop, ms);
47  }
48 }
void finishWatch(timespec now, int ms)
#define GET_CLOCK_MONOTONIC(ts)
susybsm::MuonSegment ms
Definition: classes.h:31
QualityMetricWatch::QualityMetricWatch ( QualityMetric parent1,
QualityMetric parent2 
)
private

Definition at line 29 of file QualityMetric.cc.

References GET_CLOCK_MONOTONIC, and m_start.

30  : m_parent1(parent1), m_parent2(parent2)
31 {
32  // TODO: just assuming success.
34 }
#define GET_CLOCK_MONOTONIC(ts)

Member Function Documentation

void QualityMetricWatch::swap ( QualityMetricWatch that)

Definition at line 61 of file QualityMetric.cc.

References m_parent1, m_parent2, m_start, and tmp.

Referenced by XrdAdaptor::ClientRequest::HandleResponse(), and XrdAdaptor::QualityMetricSource::startWatch().

62 {
64  tmp = that.m_parent1;
65  that.m_parent1 = m_parent1;
66  m_parent1 = tmp;
67  tmp = that.m_parent2;
68  that.m_parent2 = m_parent2;
69  m_parent2 = tmp;
70  timespec tmp2;
71  tmp2 = that.m_start;
72  that.m_start = m_start;
73  m_start = tmp2;
74 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100

Friends And Related Function Documentation

friend class QualityMetricSource
friend

Definition at line 19 of file QualityMetric.h.

Member Data Documentation

QualityMetric* XrdAdaptor::QualityMetricWatch::m_parent1
private

Definition at line 31 of file QualityMetric.h.

Referenced by QualityMetricWatch(), swap(), and ~QualityMetricWatch().

QualityMetric* XrdAdaptor::QualityMetricWatch::m_parent2
private

Definition at line 32 of file QualityMetric.h.

Referenced by QualityMetricWatch(), swap(), and ~QualityMetricWatch().

timespec XrdAdaptor::QualityMetricWatch::m_start
private

Definition at line 30 of file QualityMetric.h.

Referenced by QualityMetricWatch(), swap(), and ~QualityMetricWatch().