The FEE Server Control Engine of the ALICE-TRD - Westfälische ...
The FEE Server Control Engine of the ALICE-TRD - Westfälische ...
The FEE Server Control Engine of the ALICE-TRD - Westfälische ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5 <strong>The</strong> <strong>FEE</strong><strong>Server</strong> <strong>Control</strong> <strong>Engine</strong><br />
5.3 <strong>The</strong> SCSN Bus Class System<br />
<strong>The</strong> SCSN Bus class system is <strong>the</strong> most complex system in <strong>the</strong> control engine. It provides<br />
an easy to use interface to <strong>the</strong> SCSN Bus. It includes <strong>the</strong> class SCSNBus as its central<br />
class, <strong>the</strong> class SCSNBusBridge as an utility class for SCSNBus which handles <strong>the</strong> bridging,<br />
<strong>the</strong> class SCSNGuardian and <strong>the</strong> file scsn_ids.c which contains functions to convert MCM<br />
addresses, to calculate <strong>the</strong> ROB position <strong>of</strong> MCMs and some more. All classes <strong>of</strong> <strong>the</strong><br />
SCSN system belong to lib<strong>TRD</strong>.<br />
5.3.1 Configuration<br />
SCSNBus::learnConfig()<br />
SCSNBusBridge::learnConfig()<br />
SCSNBusBridge::calculateConfig()<br />
SCSNBusBridge::getSlavesToBridge()<br />
send <strong>the</strong> commands to bridge <strong>the</strong> MCMs<br />
Figure 5.5: Configuration process <strong>of</strong> <strong>the</strong> SCSN Bus class system. Only <strong>the</strong> main steps are shown.<br />
Before <strong>the</strong> SCSN Bus system can be used, it needs to be configured. <strong>The</strong> class SCSNBus<br />
provides <strong>the</strong> function learnConfig() to configure <strong>the</strong> system. Each time learnConfig() is<br />
called first <strong>the</strong> complete old configuration is deleted. This includes bridging information,<br />
information about <strong>the</strong> chamber type or <strong>the</strong> currently active linkpair. In <strong>the</strong> hardware, <strong>the</strong><br />
bridge mode <strong>of</strong> all MCMs is reset, too.<br />
SCSNBus::learnConfig() accepts two sets <strong>of</strong> parameters. <strong>The</strong> simple version void<br />
learnConfig(int) expects <strong>the</strong> chamber type (0 or 1) as <strong>the</strong> only parameter. This version<br />
is used by some tests and most <strong>of</strong> <strong>the</strong> stand-alone utilities based on lib<strong>TRD</strong>. It just resets<br />
everything and sets <strong>the</strong> chamber type. Particularly, all MCMs remain unbridged. <strong>The</strong><br />
information about <strong>the</strong> chamber type is needed to determine <strong>the</strong> number <strong>of</strong> linkpairs on<br />
<strong>the</strong> chamber.<br />
<strong>The</strong> second version void learnConfig(const vector &, bool [4][2], int) expects<br />
three parameters: a list <strong>of</strong> damaged MCMs / broken SCSN lines between MCMs,<br />
an array <strong>of</strong> damaged lines between <strong>the</strong> DCS board and <strong>the</strong> MCMs and <strong>the</strong> chamber type.<br />
Each entry in <strong>the</strong> list contains <strong>the</strong> extended <strong>ALICE</strong> ID <strong>of</strong> two MCMs. If both IDs are<br />
identical <strong>the</strong>n <strong>the</strong> MCM with this ID is damaged. If <strong>the</strong> IDs are not equal <strong>the</strong> line from<br />
<strong>the</strong> first MCM to <strong>the</strong> second one is broken. Since <strong>the</strong>re are two lines between each pair <strong>of</strong><br />
MCMs <strong>the</strong> order <strong>of</strong> <strong>the</strong> IDs is important.<br />
60