Fixes in order to treat correctly event and sub-event header extensions.
[u/mrichter/AliRoot.git] / MONITOR / root2date.cxx
index e5eff02..0371553 100644 (file)
@@ -21,6 +21,8 @@ int Root2Date(AliRawEvent *gdcRootEvent, unsigned char *gdcDateEvent, char *ddlD
  p+=chunkSize;
  memcpy(p, aliHeader->HeaderBegin(), chunkSize=aliHeader->HeaderSize()); // Write DATE GDC header
  p+=chunkSize;
+ memcpy(p, aliHeader->GetExtendedData(), chunkSize=aliHeader->GetExtendedDataSize());
+ p+=chunkSize;
  for(ldcCounter=0; ldcCounter<gdcRootEvent->GetNSubEvents(); ldcCounter++) {
   ldcRootEvent=gdcRootEvent->GetSubEvent(ldcCounter);
   aliHeader=ldcRootEvent->GetHeader();
@@ -28,6 +30,8 @@ int Root2Date(AliRawEvent *gdcRootEvent, unsigned char *gdcDateEvent, char *ddlD
   p+=chunkSize;
   memcpy(p, aliHeader->HeaderBegin(), chunkSize=aliHeader->HeaderSize()); // Write DATE LDC header
   p+=chunkSize;
+  memcpy(p, aliHeader->GetExtendedData(), chunkSize=aliHeader->GetExtendedDataSize());
+  p+=chunkSize;
   for(equipmentCounter=0; equipmentCounter<ldcRootEvent->GetNEquipments(); equipmentCounter++) {
    aliEquipment=ldcRootEvent->GetEquipment(equipmentCounter);
    aliEquipmentHeader=aliEquipment->GetEquipmentHeader();