ATLAS Offline Software
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 138 of file PileUpMergeSvc.h.

Constructor & Destructor Documentation

◆ Range() [1/3]

PileUpMergeSvc::Range::Range ( )
inline

Definition at line 140 of file PileUpMergeSvc.h.

140 : 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 141 of file PileUpMergeSvc.h.

141  :
142  m_noLimits(false), m_first(first), m_last(last),
143  m_cacheRefreshFrequency(cacheRefreshFrequency) {
145  }

◆ Range() [3/3]

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

Definition at line 146 of file PileUpMergeSvc.h.

146  :
147  m_noLimits(rhs.m_noLimits),
148  m_first(rhs.m_first), m_last(rhs.m_last),
149  m_cacheRefreshFrequency(rhs.m_cacheRefreshFrequency) {}

Member Function Documentation

◆ contains()

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

Definition at line 159 of file PileUpMergeSvc.h.

159  {
160  return m_noLimits || (m_first<=xing && xing<=m_last);
161  }

◆ doRefresh()

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

Definition at line 162 of file PileUpMergeSvc.h.

162  {
163  assert(0.0 <= random && random <= 1.0);
164  // bool result(random < m_cacheRefreshFrequency);
165  // std::cerr << "Range::doRefresh: random " << random
166  // << " frequency " << m_cacheRefreshFrequency
167  // << " result " << result << std::endl;
168  return ( random < m_cacheRefreshFrequency );
169  }

◆ operator=()

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

Definition at line 150 of file PileUpMergeSvc.h.

151  {
152  if (this == &rhs) {return *this;} // Handle self assignment
153  m_noLimits = rhs.m_noLimits;
154  m_first = rhs.m_first;
155  m_last = rhs.m_last;
156  m_cacheRefreshFrequency = rhs.m_cacheRefreshFrequency;
157  return *this;
158  }

Member Data Documentation

◆ m_cacheRefreshFrequency

double PileUpMergeSvc::Range::m_cacheRefreshFrequency
private

Definition at line 173 of file PileUpMergeSvc.h.

◆ m_first

int PileUpMergeSvc::Range::m_first
private

Definition at line 172 of file PileUpMergeSvc.h.

◆ m_last

int PileUpMergeSvc::Range::m_last
private

Definition at line 172 of file PileUpMergeSvc.h.

◆ m_noLimits

bool PileUpMergeSvc::Range::m_noLimits
private

Definition at line 171 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:172
PileUpMergeSvc::Range::m_noLimits
bool m_noLimits
Definition: PileUpMergeSvc.h:171
DeMoScan.first
bool first
Definition: DeMoScan.py:536
PileUpMergeSvc::Range::m_cacheRefreshFrequency
double m_cacheRefreshFrequency
Definition: PileUpMergeSvc.h:173
PileUpMergeSvc::Range::m_first
int m_first
Definition: PileUpMergeSvc.h:172