test
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

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_parent2
Definition: QualityMetric.h:34
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:33
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 }
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:34
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:33
QualityMetricWatch::~QualityMetricWatch ( )

Definition at line 36 of file QualityMetric.cc.

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

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 }
edm::propagate_const< QualityMetric * > m_parent2
Definition: QualityMetric.h:34
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
edm::propagate_const< QualityMetric * > m_parent1
Definition: QualityMetric.h:33

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 33 of file QualityMetric.h.

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

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

Definition at line 34 of file QualityMetric.h.

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

timespec XrdAdaptor::QualityMetricWatch::m_start
private

Definition at line 32 of file QualityMetric.h.

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