Extension:CentralNotice/Allocation system/Notes

Gets everything ready for banner selection via a slot.
 * Receives an  and puts it in.
 * Uses project, language and country data to get an array of appropriate campaigns from.
 * Sends this array of campaigns to  to get the Cartesian product of known devices and the banners assigned to those campaigns.
 * Calls.
 * Calls.
 * After these steps,   is fully prepared for the call to , which makes the final choice based a slot.

Works on , removing banners that aren't available to the user, based on the device, logged-in status and bucket set out in.

Prepares filtered   for the final banner selection by adding properties and re-ordering them (in call to  ).
 * Calculates total the weights (, set via the "Weight" control next to the banner assignment on the UI) of remaining banners for in campaign.
 * Adds the  property to each banner. This is done by calculating the banner's weight relative weight in relation to the total weights for the campaign, then taking a fraction of that as determined by the campaign's throttle (, set via the "Limit traffic" control in the UI). For example, if a banner's weight in this campaign is 25, and the total weights for the campaign is 75 (because there's another banner available in the same bucket with a weight of 50), the banner's relative weight will be 0.333333. If the campaign is not throttled, that will be the  . If the campaign is throttled to 50%, the banner's   will be 0.166666.
 * Makes an index of banners by their campaigns' priority (, which is referred to here as  and uses the values of constants in the   class).
 * Calculates the sum of the  of all the banners at each priority level.
 * Sorts, by priority in descending order, the index of banners-by-priority by priority.
 * ...to be continued