Procedure to Set thresholds on TDRs

The purpose of this method is to ...

To follow this procedure, one should be familiar with the DAQ documents summarizing Data Types and Node Addresses as well as A. Kounine's document about xDR and JINx nodes. They can all be found at

1. Preparing AMS Envelopes

The advantage of using the AMS envelope to send commands to be executed by JMDC (w.r.t send a set of single commands to JMDC) is to have the whole set of commands executed only when the whole envelope is delivered to JMDC (in the other approach you send a command, it will be executed and then you can lose the communication and not be able terminate the procedure).

Check the directory AAL/SlowControl/JMDC (Tools from Alexei Lebedev) for the complete file which shows many other features of AMS envelopes used with the my-tttt commands.

Choose the name of the envelope keeping the ".lst" extension. Write your commands between "BEGIN_ENVELOPE:" and "END_ENVELOPE:". The first character is R or W and indicates if the command is a Read or Write Data Type. The second character is the node address (14 = JMDC-SELF, 11A = TDR-0-00). The third character is the command. Remaining characters are essentially the possible parameters for the command (see C. Xudong document for Data Types).

The envelope is sent with the my-tttt command, see section 2.

Preparing the envelopes

To create the envelope setting the thresholds you can use this root macro:


and to modify the thresholds (layer by layer) you have to modify the initial part:


float layer8[3]={3.625, 3.625, 3.500};//layer 8

float layer1[3]={3.625, 3.625, 3.500};//layer 1

float layer2[3]={4.000, 4.000, 3.875};
float layer3[3]={4.000, 4.000, 3.875};
float layer4[3]={4.000, 4.000, 3.875};
float layer5[3]={4.000, 4.000, 3.875};
float layer6[3]={4.000, 4.000, 3.875};
float layer7[3]={4.000, 4.000, 3.875};

float layer9[3]={3.625, 3.625, 3.500};//layer 9

You can RUN it with root (you need to have on your computer AMSRoot compiled and the $AMSROOT env set):

root Thresholds.C

and you will obtain:

2. Executing the envelopes

Set the command path correctly, for example: set-command-path eas:hosc pcposk0 100 (or edit the command_path.conf file)

The execution is done with the my-tttt command:

> my-tttt

For this execution, remember the extension must be ".com".

You might want to save the reply: my-tttt | tee reply1.txt

One still needs to develop the tool to analyze efficiently the reply of both envelope execution to track rapidly where eventual errors come from. This is an issue essentially for tracker where 192 replies must be checked.

3. Considerations

The procedure above change the thresholds ONLY on the DSP memory. When the system will be powered off and on again or if a configuration file is loaded this setting will be LOST. To save this setting on a configuration file see the section 4 (work in progress).

-- MatteoDuranti - 30-Nov-2010

Topic attachments
I Attachment History Action Size DateSorted ascending Who Comment
Unknown file formatcom r1 manage 8.4 K 2010-11-30 - 18:35 MatteoDuranti  
C source code filec Thresholds.C r2 r1 manage 2.6 K 2010-11-30 - 18:35 MatteoDuranti  

This topic: Main > AmsTracker > NewSetThresholds
Topic revision: r1 - 2010-11-30 - MatteoDuranti
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback