ATLAS Offline Software
Loading...
Searching...
No Matches
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)
Range & operator= (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 137 of file PileUpMergeSvc.h.

Constructor & Destructor Documentation

◆ Range() [1/3]

PileUpMergeSvc::Range::Range ( )
inline

◆ Range() [2/3]

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

Definition at line 140 of file PileUpMergeSvc.h.

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

◆ Range() [3/3]

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

Definition at line 145 of file PileUpMergeSvc.h.

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

Member Function Documentation

◆ contains()

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

Definition at line 158 of file PileUpMergeSvc.h.

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

◆ doRefresh()

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

Definition at line 161 of file PileUpMergeSvc.h.

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

◆ operator=()

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

Definition at line 149 of file PileUpMergeSvc.h.

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

Member Data Documentation

◆ m_cacheRefreshFrequency

double PileUpMergeSvc::Range::m_cacheRefreshFrequency
private

Definition at line 172 of file PileUpMergeSvc.h.

◆ m_first

int PileUpMergeSvc::Range::m_first
private

Definition at line 171 of file PileUpMergeSvc.h.

◆ m_last

int PileUpMergeSvc::Range::m_last
private

Definition at line 171 of file PileUpMergeSvc.h.

◆ m_noLimits

bool PileUpMergeSvc::Range::m_noLimits
private

Definition at line 170 of file PileUpMergeSvc.h.


The documentation for this class was generated from the following file: