23.11.2012 Views

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 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5 <strong>The</strong> <strong>FEE</strong><strong>Server</strong> <strong>Control</strong> <strong>Engine</strong><br />

<strong>The</strong> tests are started by <strong>the</strong> extended SCSN command SCSN_CMD_RUN_TEST. <strong>The</strong><br />

data field determines which test is executed. <strong>The</strong> function ROCExecutor::executeROCCmds<br />

which processes all SCSN commands calls <strong>the</strong> static function static TestClass * TestFactory<br />

:: createTest (int). <strong>The</strong> function creates an instance <strong>of</strong> <strong>the</strong> requested test and returns <strong>the</strong><br />

pointer to <strong>the</strong> instance. Afterwards ROCExecutor::executeROCCmds uses this pointer to<br />

call <strong>the</strong> function int doTest(void) <strong>of</strong> <strong>the</strong> created test. This function runs <strong>the</strong> test and returns<br />

<strong>the</strong> number <strong>of</strong> errors occurred during <strong>the</strong> test. Since all tests are derived from <strong>the</strong><br />

abstract class TestClass which defines <strong>the</strong> public function int doTest(void), ROCExecutor<br />

::executeROCCmds() can use <strong>the</strong> same function calls for all tests. Details about <strong>the</strong> implementation<br />

<strong>of</strong> <strong>the</strong> individual tests can be found in <strong>the</strong> doxygen documentation <strong>of</strong> <strong>the</strong><br />

source code.<br />

If <strong>the</strong> test has been run successful – i.e. <strong>the</strong> number <strong>of</strong> errors returned by <strong>the</strong> test is<br />

zero – <strong>the</strong> FSM switches back to state STDBY and <strong>the</strong> electronics are powered <strong>of</strong>f. In <strong>the</strong><br />

o<strong>the</strong>r case an exception is thrown and <strong>the</strong> FSM <strong>of</strong> <strong>the</strong> control engine switches to state<br />

ERROR. <strong>The</strong> electronics remains in <strong>the</strong> status it had when <strong>the</strong> error was detected. <strong>The</strong><br />

reason for switching to ERROR and not going back to STDBY in case <strong>of</strong> a failed test is<br />

simple. External programs running test sequences automatically need a simple interface<br />

to check whe<strong>the</strong>r a test was successful or not. Parsing all <strong>of</strong> <strong>the</strong> log output is much more<br />

complicated <strong>the</strong>n just monitoring a status channel. However, this approach requires to<br />

reset <strong>the</strong> ERROR state before running ano<strong>the</strong>r test even if <strong>the</strong> next test would not be<br />

affected by <strong>the</strong> detected error.<br />

Presently, seven tests are implemented.<br />

5.4.1 Bridge Test<br />

<strong>The</strong> bridge test is used to identify and locate dead MCMs or broken SCSN Bus lines<br />

between MCMs.<br />

At <strong>the</strong> beginning <strong>of</strong> <strong>the</strong> test all bridging information in class SCSNBus and all bridged<br />

MCMs are reset by reconfiguring <strong>the</strong> class SCSNBus via <strong>the</strong> function learnConfig(). Afterwards<br />

<strong>the</strong> test sends <strong>the</strong> bridging command to <strong>the</strong> MCM with <strong>ALICE</strong> ID 0 via <strong>the</strong> first<br />

link <strong>of</strong> <strong>the</strong> linkpair. <strong>The</strong> MCM switches to bridging mode. <strong>The</strong>n a ping frame is sent via<br />

<strong>the</strong> same link. Since now <strong>the</strong> linkpair is bridged this frame should not return to <strong>the</strong> DCS<br />

board on <strong>the</strong> first link but on <strong>the</strong> second one. Hereupon <strong>the</strong> de-bridging command is<br />

sent to MCM 0. <strong>The</strong> same procedure is repeated for <strong>the</strong> second link. This procedure is<br />

repeated for all MCMs in all linkpairs.<br />

On <strong>the</strong> basis <strong>of</strong> <strong>the</strong> information ga<strong>the</strong>red during <strong>the</strong> test a list <strong>of</strong> unreachable MCMs is<br />

generated. This list can be stored in a database and will be used by <strong>the</strong> class patch_maker<br />

and SCSNBus to bridge <strong>the</strong> MCMs.<br />

5.4.2 Laser ID Test<br />

Each MCM has a serial number, called Laser ID. This name was selected because a laser is<br />

used to blow fuses in a controlled fashion on <strong>the</strong> MCM. <strong>The</strong> resulting circuit encodes <strong>the</strong><br />

Laser ID. Unfortunately, this number is not totally unique, never<strong>the</strong>less it can be used to<br />

identify MCMs. An advantage <strong>of</strong> <strong>the</strong> Laser ID in contrast to o<strong>the</strong>r possibilities to identify<br />

MCMs is that this number can be read out via <strong>the</strong> DCS board.<br />

69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!