CMS 3D CMS Logo

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

#include <QualityMetric.h>

Public Member Functions

QualityMetricWatchoperator= (const QualityMetricWatch &)=delete
 
 QualityMetricWatch ()
 
 QualityMetricWatch (QualityMetricWatch &&)
 
 QualityMetricWatch (const QualityMetricWatch &)=delete
 
void swap (QualityMetricWatch &)
 
 ~QualityMetricWatch ()
 

Private Member Functions

 QualityMetricWatch (QualityMetric *parent1, QualityMetric *parent2)
 

Private Attributes

edm::propagate_const
< QualityMetric * > 
m_parent1
 
edm::propagate_const
< QualityMetric * > 
m_parent2
 
timespec m_start
 

Friends

class QualityMetricSource
 

Detailed Description

Definition at line 20 of file QualityMetric.h.

Constructor & Destructor Documentation

XrdAdaptor::QualityMetricWatch::QualityMetricWatch ( )
inline

Definition at line 24 of file QualityMetric.h.

24 : m_parent1(nullptr), m_parent2(nullptr) {}
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:36
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:37
QualityMetricWatch::QualityMetricWatch ( QualityMetricWatch &&  that)

Definition at line 46 of file QualityMetric.cc.

References m_parent1, m_parent2, and m_start.

46  {
47  m_parent1 = that.m_parent1;
48  m_parent2 = that.m_parent2;
49  m_start = that.m_start;
50  that.m_parent1 = nullptr;
51  that.m_parent2 = nullptr;
52  that.m_start = {0, 0};
53 }
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:36
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:37
QualityMetricWatch::~QualityMetricWatch ( )

Definition at line 34 of file QualityMetric.cc.

References GET_CLOCK_MONOTONIC, m_parent1, m_parent2, and m_start.

34  {
35  if (m_parent1 && m_parent2) {
36  timespec stop;
37  GET_CLOCK_MONOTONIC(stop);
38 
39  int ms = 1000 * (stop.tv_sec - m_start.tv_sec) + (stop.tv_nsec - m_start.tv_nsec) / 1e6;
40  edm::LogVerbatim("XrdAdaptorInternal") << "Finished timer after " << ms << std::endl;
41  m_parent1->finishWatch(stop, ms);
42  m_parent2->finishWatch(stop, ms);
43  }
44 }
Log< level::Info, true > LogVerbatim
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:36
#define GET_CLOCK_MONOTONIC(ts)
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:37
XrdAdaptor::QualityMetricWatch::QualityMetricWatch ( const QualityMetricWatch )
delete
QualityMetricWatch::QualityMetricWatch ( QualityMetric parent1,
QualityMetric parent2 
)
private

Definition at line 28 of file QualityMetric.cc.

References GET_CLOCK_MONOTONIC, and m_start.

29  : m_parent1(parent1), m_parent2(parent2) {
30  // TODO: just assuming success.
32 }
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:36
#define GET_CLOCK_MONOTONIC(ts)
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:37

Member Function Documentation

QualityMetricWatch& XrdAdaptor::QualityMetricWatch::operator= ( const QualityMetricWatch )
delete
void QualityMetricWatch::swap ( QualityMetricWatch that)

Definition at line 55 of file QualityMetric.cc.

References m_parent1, m_parent2, m_start, and createJobs::tmp.

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

55  {
57  tmp = that.m_parent1;
58  that.m_parent1 = m_parent1;
59  m_parent1 = tmp;
60  tmp = that.m_parent2;
61  that.m_parent2 = m_parent2;
62  m_parent2 = tmp;
63  timespec tmp2;
64  tmp2 = that.m_start;
65  that.m_start = m_start;
66  m_start = tmp2;
67 }
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:36
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:37
tmp
align.sh
Definition: createJobs.py:716

Friends And Related Function Documentation

friend class QualityMetricSource
friend

Definition at line 21 of file QualityMetric.h.

Member Data Documentation

edm::propagate_const<QualityMetric *> XrdAdaptor::QualityMetricWatch::m_parent1
private

Definition at line 36 of file QualityMetric.h.

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

edm::propagate_const<QualityMetric *> XrdAdaptor::QualityMetricWatch::m_parent2
private

Definition at line 37 of file QualityMetric.h.

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

timespec XrdAdaptor::QualityMetricWatch::m_start
private

Definition at line 35 of file QualityMetric.h.

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