CMS 3D CMS Logo

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

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

Friends

class QualityMetricSource
 

Detailed Description

Definition at line 21 of file QualityMetric.h.

Constructor & Destructor Documentation

XrdAdaptor::QualityMetricWatch::QualityMetricWatch ( )
inline

Definition at line 25 of file QualityMetric.h.

References swap(), and ~QualityMetricWatch().

25 : m_parent1(nullptr), m_parent2(nullptr) {}
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:34
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35
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:34
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35
QualityMetricWatch::~QualityMetricWatch ( )

Definition at line 34 of file QualityMetric.cc.

References GET_CLOCK_MONOTONIC, m_parent1, m_parent2, m_start, and AnalysisDataFormats_SUSYBSMObjects::ms.

Referenced by QualityMetricWatch().

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 }
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:34
#define GET_CLOCK_MONOTONIC(ts)
susybsm::MuonSegment ms
Definition: classes.h:31
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35
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:34
#define GET_CLOCK_MONOTONIC(ts)
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35

Member Function Documentation

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(), QualityMetricWatch(), 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:34
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35
tmp
align.sh
Definition: createJobs.py:716

Friends And Related Function Documentation

friend class QualityMetricSource
friend

Definition at line 22 of file QualityMetric.h.

Member Data Documentation

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

Definition at line 34 of file QualityMetric.h.

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

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

Definition at line 35 of file QualityMetric.h.

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

timespec XrdAdaptor::QualityMetricWatch::m_start
private

Definition at line 33 of file QualityMetric.h.

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