This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern for current CERN information.
Based on discussions held on 6th and 21st June
Input: Greg Kruk, Steve Page, Lionel Mestre, Robin Lauckner, Herv� Milcent, Franck Di Maio, Adriaan Rijllart, Kris Kostro, Sergio Pasinelli, Mike Lamont.
Main input: Greg
Reported by: Mike
Meta data already cached in PM server - sent by separate channel well before PM event [BinX XML description]
Example:
- A front-end is not reachable on the network.
- The PM server is not reachable on the network.
- There is some sort of general fault with the network.
If none of those cases is true, then the network link between the PM client
and server should be okay. Would we really want PM alarms from all of the
front-ends in the case of a network problem?
RL I am also not sure if this should be offered. If
it is then it would be intended so that clients could include post mortem
ready in their �permit� conditions
Team decided that it was unnecessary, however API should implement PMcheck call. Periodic checks if felt needed. Raise alarm if problem (if it can it see the server). On re-arm of buffer check. etc.
The first 3 attributes: system ID, device class, device ID, are a triplet serving to identify the data object. As objects may vary from single values to complex structures (as in the case of the QPS) they will not generally map to �official� LHC device classes. Objects may even come from more than one �system� where I assume the definition of �system� to be linked to the accelerator hardware systems. While the main ambition is that the triplet is unique I would not try and map it to an existing entity within the control system.
The Event timestamp attribute identifies the instance of the data object. It should be in UTC.
The server should not be involved with re-assembling segmented data. The sequence number identifies the segments.
The first 5 attributes will be used by the server to generate a unique file path and name where the associated instance of the data object will be stored.
The Number of segments is not correct here. Assembly of segments should be done when the data is converted into the SDDS file. This quantity will be stored in the meta data. Consider two transactions with the same data object triplet but different Number of segments.
The Alternative storage address is not correct here. This safety mechanism should be hidden from the client.
CMWStructure {
char* systemId; ???????
char* deviceClass;
char* deviceId;
64bits eventTimestamp;
longlong firstRecordTimestamp; [standardised ns]
(...)
byte[] pmData;
}
This is just an example how it could look like. As you see the additional meta information is not included in the binary data but as separate fields in CMW structure.
If you remember on the TC "Software for LHC HWC" on the presentation I made - I mentioned that it seems a good idea to have a kind of client API that could be used to send the data. I would see such API like:
//Pseudo-code in Java
PMClient client = new PMClient("MySystemID", "MyDeviceClass", "MyDeviceID");
PMData data = client.createData(<timestamp>, <binaryblock>);
data.setAdditionalProperty(...); ...
client.sendData(data);
//Pseudo-code in C++ !!
PMClient* client = new PMClient("MySystemID", "MyDeviceClass", "MyDeviceID");
PMData* data = client->createData(<timestamp>, <binaryblock>);
data->setAdditionalProperty(...); ...
client->sendData(data);
// C interface would implement the above as a function call
// Thread to submit post-mortem data
void run(void)
{
unsigned int pm_index;
unsigned int pub_index;
while(pm_globals.run)
{
// Wait for a post-mortem event
sem_wait(&pm_globals.sem);
// Do nothing if data is not frozen for post-mortem
if(!pub.frozen) continue;
logPrintf("PM dump started\n");
// Copy frozen published data to post-mortem buffer
for(pm_index = 0, pub_index = (pub.published_data_index + 1) % (PM_BUF_LEN +
1) ; pub_index != pub.published_data_index ; pub_index = (pub_index + 1) % (PM_BUF_LEN
+ 1))
{
pm_globals.pm_data[pm_index++] = pub.published_data[pub_index];
}
// Un-freeze published data
pub.frozen = 0;
// Send post-mortem data
pmclient->simple_PO_test_set((const signed char *)pm_globals.pm_data, (unsigned long)sizeof(pm_globals.pm_data));
pmclient->simple_PO_test_send();
logPrintf("PM dump completed\n");
}
}