Algorithm assigning IDs to readout planes. More...
Public Member Functions | |
ROPnumberDispatcher (std::vector< PlaneColl_t > const &refROP, std::string const &logCategory) | |
Constructor: uses refROP as reference to assign number ranges to views. More... | |
void | setTPCset (readout::TPCsetID const &TPCset) |
Rests the object to work with the specified TPC set next. More... | |
readout::ROPID | assignID (PlaneColl_t const &ROP) |
Returns the next available ID for the specified ROP. More... | |
Static Public Member Functions | |
static geo::View_t | ROPview (PlaneColl_t const &planes) |
Returns the view of the planes (geo::kUnknown if mixed or none). More... | |
Private Types | |
template<typename T > | |
using | DataByView_t = std::map< geo::View_t, T > |
Type of collection of T by view. More... | |
Private Member Functions | |
DataByView_t< unsigned int > | ViewROPcounts (std::vector< PlaneColl_t > const &ROPplanes) const |
Returns the number of planes with each view. More... | |
DataByView_t < readout::ROPID::ROPID_t > | PreferredROPrangesByView (std::vector< PlaneColl_t > const &ROPs) const |
Returns the fist ROP number for each view in ROP . More... | |
Private Attributes | |
std::string const | fLogCategory |
Log category name for messages. More... | |
DataByView_t < readout::ROPID::ROPID_t > const | fFirstROPno |
The first ROP number for each view. More... | |
DataByView_t < readout::ROPID::ROPID_t > | fAvailableROPno |
The first available ROP number for each view. More... | |
readout::TPCsetID | fTPCset |
The TPC set being served. More... | |
Algorithm assigning IDs to readout planes.
The usage workflow is the following:
setTPCset()
);assignID()
);The assignment of the ROP number is in blocks according to the view. The distribution between different views is first come, first serve: the first ROP within a certain view conquers the lowest number still available for all the ROP's within that view.
The algorithm assumes that all TPC sets have the same view composition as the model one used in the constructor. If this requirement is violated, the behavior is undefined (but it's likely that a ROP ID will be assigned multiple times).
Definition at line 216 of file ROPandTPCsetBuildingAlg.cxx.
|
private |
Type of collection of T
by view.
Definition at line 220 of file ROPandTPCsetBuildingAlg.cxx.
|
inline |
Constructor: uses refROP
as reference to assign number ranges to views.
Definition at line 244 of file ROPandTPCsetBuildingAlg.cxx.
|
inline |
Returns the next available ID for the specified ROP.
Definition at line 255 of file ROPandTPCsetBuildingAlg.cxx.
|
private |
Returns the fist ROP number for each view in ROP
.
Definition at line 266 of file ROPandTPCsetBuildingAlg.cxx.
|
static |
Returns the view of the planes
(geo::kUnknown
if mixed or none).
Definition at line 336 of file ROPandTPCsetBuildingAlg.cxx.
|
inline |
Rests the object to work with the specified TPC set next.
Definition at line 251 of file ROPandTPCsetBuildingAlg.cxx.
|
private |
Returns the number of planes with each view.
Definition at line 308 of file ROPandTPCsetBuildingAlg.cxx.
|
private |
The first available ROP number for each view.
Definition at line 228 of file ROPandTPCsetBuildingAlg.cxx.
|
private |
The first ROP number for each view.
Definition at line 225 of file ROPandTPCsetBuildingAlg.cxx.
|
private |
Log category name for messages.
Definition at line 222 of file ROPandTPCsetBuildingAlg.cxx.
|
private |
The TPC set being served.
Definition at line 231 of file ROPandTPCsetBuildingAlg.cxx.