Loading [MathJax]/jax/input/TeX/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
PileUpMergeSvc::Range Class Reference

the active crossing range for a data object (CLID/key combination) More...

Collaboration diagram for PileUpMergeSvc::Range:

Public Member Functions

 Range ()
 
 Range (int first, int last, double cacheRefreshFrequency)
 
 Range (const Range &rhs)
 
Rangeoperator= (const Range &rhs)
 
bool contains (int xing) const
 
bool doRefresh (float random) const
 

Private Attributes

bool m_noLimits
 
int m_first
 
int m_last
 
double m_cacheRefreshFrequency
 

Detailed Description

the active crossing range for a data object (CLID/key combination)

Definition at line 132 of file PileUpMergeSvc.h.

Constructor & Destructor Documentation

◆ Range() [1/3]

PileUpMergeSvc::Range::Range ( )
inline

Definition at line 134 of file PileUpMergeSvc.h.

134 : m_noLimits(true), m_first(0), m_last(0), m_cacheRefreshFrequency(0.0) {}

◆ Range() [2/3]

PileUpMergeSvc::Range::Range ( int  first,
int  last,
double  cacheRefreshFrequency 
)
inline

Definition at line 135 of file PileUpMergeSvc.h.

135  :
136  m_noLimits(false), m_first(first), m_last(last),
137  m_cacheRefreshFrequency(cacheRefreshFrequency) {
139  }

◆ Range() [3/3]

PileUpMergeSvc::Range::Range ( const Range rhs)
inline

Definition at line 140 of file PileUpMergeSvc.h.

140  :
141  m_noLimits(rhs.m_noLimits),
142  m_first(rhs.m_first), m_last(rhs.m_last),
143  m_cacheRefreshFrequency(rhs.m_cacheRefreshFrequency) {}

Member Function Documentation

◆ contains()

bool PileUpMergeSvc::Range::contains ( int  xing) const
inline

Definition at line 153 of file PileUpMergeSvc.h.

153  {
154  return m_noLimits || (m_first<=xing && xing<=m_last);
155  }

◆ doRefresh()

bool PileUpMergeSvc::Range::doRefresh ( float  random) const
inline

Definition at line 156 of file PileUpMergeSvc.h.

156  {
157  assert(0.0 <= random && random <= 1.0);
158  // bool result(random < m_cacheRefreshFrequency);
159  // std::cerr << "Range::doRefresh: random " << random
160  // << " frequency " << m_cacheRefreshFrequency
161  // << " result " << result << std::endl;
162  return ( random < m_cacheRefreshFrequency );
163  }

◆ operator=()

Range& PileUpMergeSvc::Range::operator= ( const Range rhs)
inline

Definition at line 144 of file PileUpMergeSvc.h.

145  {
146  if (this == &rhs) {return *this;} // Handle self assignment
147  m_noLimits = rhs.m_noLimits;
148  m_first = rhs.m_first;
149  m_last = rhs.m_last;
150  m_cacheRefreshFrequency = rhs.m_cacheRefreshFrequency;
151  return *this;
152  }

Member Data Documentation

◆ m_cacheRefreshFrequency

double PileUpMergeSvc::Range::m_cacheRefreshFrequency
private

Definition at line 167 of file PileUpMergeSvc.h.

◆ m_first

int PileUpMergeSvc::Range::m_first
private

Definition at line 166 of file PileUpMergeSvc.h.

◆ m_last

int PileUpMergeSvc::Range::m_last
private

Definition at line 166 of file PileUpMergeSvc.h.

◆ m_noLimits

bool PileUpMergeSvc::Range::m_noLimits
private

Definition at line 165 of file PileUpMergeSvc.h.


The documentation for this class was generated from the following file:
PileUpMergeSvc::Range::m_last
int m_last
Definition: PileUpMergeSvc.h:166
PileUpMergeSvc::Range::m_noLimits
bool m_noLimits
Definition: PileUpMergeSvc.h:165
DeMoScan.first
bool first
Definition: DeMoScan.py:536
PileUpMergeSvc::Range::m_cacheRefreshFrequency
double m_cacheRefreshFrequency
Definition: PileUpMergeSvc.h:167
PileUpMergeSvc::Range::m_first
int m_first
Definition: PileUpMergeSvc.h:166