ATLAS Offline Software
Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | List of all members
LWPoolSelector Class Reference

#include <LWPoolSelector.h>

Collaboration diagram for LWPoolSelector:

Static Public Member Functions

static unsigned poolSize (unsigned requestsize)
 
static unsigned poolIndex (unsigned requestsize)
 
static unsigned nPools ()
 
static unsigned maxNonDynamicRequest ()
 

Static Public Attributes

static const unsigned numberOfPools = 58
 

Private Member Functions

 LWPoolSelector ()
 
 ~LWPoolSelector ()
 

Static Private Member Functions

static unsigned roundup (unsigned l, unsigned n)
 

Detailed Description

Definition at line 25 of file LWPoolSelector.h.

Constructor & Destructor Documentation

◆ LWPoolSelector()

LWPoolSelector::LWPoolSelector ( )
private

◆ ~LWPoolSelector()

LWPoolSelector::~LWPoolSelector ( )
private

Member Function Documentation

◆ maxNonDynamicRequest()

static unsigned LWPoolSelector::maxNonDynamicRequest ( )
inlinestatic

Definition at line 32 of file LWPoolSelector.h.

32 { return 5400; }

◆ nPools()

static unsigned LWPoolSelector::nPools ( )
inlinestatic

Definition at line 31 of file LWPoolSelector.h.

31 { return numberOfPools; }

◆ poolIndex()

unsigned LWPoolSelector::poolIndex ( unsigned  requestsize)
inlinestatic

Definition at line 73 of file LWPoolSelector.h.

74 {
75  assert(l>0);
76  if (l<128) {
77  if (l<16)
78  return l-1;
79  if (l<64)
80  return roundup(l,4)/4+11;
81  return roundup(l,8)/8+19;
82  }
83  if (l<256)
84  return roundup(l,16)/16+27;
85  if (l<=640)
86  return roundup(l,32)/32+35;
87  if (l<=1024)
88  return nPools()-2;
89  if (l<=maxNonDynamicRequest())
90  return nPools()-1;
91  return UINT_MAX;
92 }

◆ poolSize()

unsigned LWPoolSelector::poolSize ( unsigned  requestsize)
inlinestatic

Definition at line 53 of file LWPoolSelector.h.

54 {
55  assert(l>0);
56  if (l<16)
57  return l;
58  if (l<64)
59  return roundup(l,4);
60  if (l<128)
61  return roundup(l,8);
62  if (l<256)
63  return roundup(l,16);
64  if (l<=640)//640 should have room for sizeof(THnX)
65  return roundup(l,32);
66  if (l<=1024)
67  return 1024;
68  if (l<=maxNonDynamicRequest())
69  return maxNonDynamicRequest();
70  return UINT_MAX;
71 }

◆ roundup()

unsigned LWPoolSelector::roundup ( unsigned  l,
unsigned  n 
)
inlinestaticprivate

Definition at line 47 of file LWPoolSelector.h.

47  {
48  //Round up to nearest multiple of n without branching
49  assert(l>0&&n>0);
50  return n+l-1-(l-1)%n;
51 }

Member Data Documentation

◆ numberOfPools

const unsigned LWPoolSelector::numberOfPools = 58
static

Definition at line 30 of file LWPoolSelector.h.


The documentation for this class was generated from the following file:
LWPoolSelector::nPools
static unsigned nPools()
Definition: LWPoolSelector.h:31
LWPoolSelector::maxNonDynamicRequest
static unsigned maxNonDynamicRequest()
Definition: LWPoolSelector.h:32
LWPoolSelector::numberOfPools
static const unsigned numberOfPools
Definition: LWPoolSelector.h:30
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
beamspotman.n
n
Definition: beamspotman.py:731
LWPoolSelector::roundup
static unsigned roundup(unsigned l, unsigned n)
Definition: LWPoolSelector.h:47