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_parent2
Definition: QualityMetric.h:35
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:34
QualityMetricWatch::QualityMetricWatch ( QualityMetricWatch &&  that)

Definition at line 51 of file QualityMetric.cc.

References m_parent1, m_parent2, and m_start.

52 {
53  m_parent1 = that.m_parent1;
54  m_parent2 = that.m_parent2;
55  m_start = that.m_start;
56  that.m_parent1 = nullptr;
57  that.m_parent2 = nullptr;
58  that.m_start = {0, 0};
59 }
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:34
QualityMetricWatch::~QualityMetricWatch ( )

Definition at line 37 of file QualityMetric.cc.

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

Referenced by QualityMetricWatch().

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

Definition at line 30 of file QualityMetric.cc.

References GET_CLOCK_MONOTONIC, and m_start.

31  : m_parent1(parent1), m_parent2(parent2)
32 {
33  // TODO: just assuming success.
35 }
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35
#define GET_CLOCK_MONOTONIC(ts)
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:34

Member Function Documentation

void QualityMetricWatch::swap ( QualityMetricWatch that)

Definition at line 62 of file QualityMetric.cc.

References m_parent1, m_parent2, m_start, and tmp.

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

63 {
65  tmp = that.m_parent1;
66  that.m_parent1 = m_parent1;
67  m_parent1 = tmp;
68  tmp = that.m_parent2;
69  that.m_parent2 = m_parent2;
70  m_parent2 = tmp;
71  timespec tmp2;
72  tmp2 = that.m_start;
73  that.m_start = m_start;
74  m_start = tmp2;
75 }
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:35
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:34

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().