#include "AliEMCALTriggerPatch.h"
#include "AliLog.h"
-#include "AliRawDataHeader.h"
#include "AliRawVEvent.h"
#include "AliRawEventHeaderBase.h"
#include "AliRawEvent.h"
#include <TClonesArray.h> //WriteRaw()
#include <TBox.h> //Draw()
#include <TPolyLine.h> //Draw()
-#include <AliRawDataHeader.h> //WriteRaw()
#include "AliHMPIDParam.h"
#include <AliDAQ.h> //WriteRaw()
#include "Riostream.h" //WriteRaw()
#include "AliMUONLogger.h"
#include "AliRawReader.h"
-#include "AliRawDataHeader.h"
#include "AliDAQ.h"
#include "AliLog.h"
#include "AliMUONPayloadTracker.h"
detail = Form(
"At byte %lu in DDL %d, event %d, iBlock %d, iDsp %d [DSP ID: %d (0x%X)],"
" iBus %d [bus patch ID: %d (0x%X)].",
- (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeader),
+ (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeaderV3),
AliDAQ::DdlID("MUONTRK", fRawStream->GetDDL()),
fRawStream->GetReader()->GetEventIndex(),
int(fBlockCount)-1,
message = Form(
"%s (At byte %lu)",
ErrorCodeToMessage(error),
- (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeader)
+ (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeaderV3)
);
break;
case kHighErrorDetail:
Int_t totalDataWord = GetReader()->GetDataSize(); // in bytes
- Bool_t scalerEvent = GetReader()->GetDataHeader()->GetL1TriggerMessage() & 0x1;
+ AliRawReader * reader = GetReader();
+ if (!reader) return kFALSE;
+
+ const AliRawDataHeader * cdh = reader->GetDataHeader();
+ const AliRawDataHeaderV3 * cdh3 = reader->GetDataHeaderV3();
+
+ if (!cdh && !cdh3) return kFALSE;
+
+ Bool_t scalerEvent = ((cdh ? cdh->GetL1TriggerMessage() : cdh3->GetL1TriggerMessage()) & 0x1) == 0x1;
AliDebug(3, Form("DDL Number %d totalDataWord %d\n", fCurrentDDLIndex,
totalDataWord));
Int_t totalDataWord = GetReader()->GetDataSize(); // in bytes
- Bool_t scalerEvent = GetReader()->GetDataHeader() && GetReader()->GetDataHeader()->GetL1TriggerMessage() & 0x1;
+ AliRawReader * reader = GetReader();
+ if (!reader) return kFALSE;
+
+ const AliRawDataHeader * cdh = reader->GetDataHeader();
+ const AliRawDataHeaderV3 * cdh3 = reader->GetDataHeaderV3();
+
+ if (!cdh && !cdh3) return kFALSE;
+
+ Bool_t scalerEvent = ((cdh ? cdh->GetL1TriggerMessage() : cdh3->GetL1TriggerMessage()) & 0x1) == 0x1;
UInt_t *buffer = new UInt_t[totalDataWord/4];
// use AliMUONRawStreamTriggerHP::GetDDL()
// Check if this is a scalar event.
- bool scalerEvent = (GetReader()->GetDataHeader()->GetL1TriggerMessage() & 0x1) == 0x1;
+ AliRawReader * reader = GetReader();
+ if (!reader) return kFALSE;
+
+ const AliRawDataHeader * cdh = reader->GetDataHeader();
+ const AliRawDataHeaderV3 * cdh3 = reader->GetDataHeaderV3();
+
+ if (!cdh && !cdh3) return kFALSE;
+
+ bool scalerEvent = ((cdh ? cdh->GetL1TriggerMessage() : cdh3->GetL1TriggerMessage()) & 0x1) == 0x1;
bool result = false;
try
message = Form(
"%s (At byte %lu in DDL.)",
ErrorCodeToMessage(error),
- (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeader)
+ (unsigned long)location - (unsigned long)fBufferStart + sizeof(AliRawDataHeaderV3)
);
fRawStream->GetReader()->AddMajorErrorLog(error, message);
break;
// total length in bytes
// DDL header
- Int_t headerSize = sizeof(AliRawDataHeader)/4;
+ Int_t headerSize = sizeof(AliRawDataHeaderV3)/4;
fHeader->fSize = (totalDDLLength + headerSize) * 4;
// DDL event one per half chamber
// DDL header size
- Int_t headerSize = sizeof(AliRawDataHeader)/4;
+ Int_t headerSize = sizeof(AliRawDataHeaderV3)/4;
// global trigger for trigger pattern
AliMUONGlobalTrigger* gloTrg = triggerStore.Global();
Int_t countAllBoards = 0;
Bool_t containTriggerData = kFALSE;
- Bool_t hasReadoutErrors = kFALSE;
+ Bool_t hasReadoutErrors = kFALSE;
AliMUONRawStreamTriggerHP rawStreamTrig(rawReader);
while (rawStreamTrig.NextDDL())
{
containTriggerData = kTRUE;
- Bool_t scalerEvent = rawReader->GetDataHeader()->GetL1TriggerMessage() & 0x1;
+ const AliRawDataHeader * cdh = rawReader->GetDataHeader();
+ const AliRawDataHeaderV3 * cdh3 = rawReader->GetDataHeaderV3();
+
+ if (!cdh && !cdh3) continue;
+
+ Bool_t scalerEvent = ((cdh ? cdh->GetL1TriggerMessage() : cdh3->GetL1TriggerMessage()) & 0x1) == 0x1;
+
if ( scalerEvent ) AliDebug(1,Form("Scaler event: evtSpecie recoParam %s QA %s\n",
AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(GetRecoParam()->GetEventSpecie())),
AliRecoParam::GetEventSpecieName(CurrentEventSpecie())));
#include <AliRawEquipmentHeader.h>
#include <AliTPCRawStreamV3.h>
#include <TCanvas.h>
-
+#include <AliRawDataHeader.h>
+#include <AliRawDataHeaderV3.h>
/** @brief Consturctor of Altro Class
*
UInt_t *trailerDDL =fTrailers+ddlID*9 ;
// CDH
- for (Int_t i=0;i<8;++i)
+ const AliRawDataHeader * cdh = fReader->GetDataHeader();
+ const AliRawDataHeaderV3 * cdhV3 = fReader->GetDataHeaderV3();
+ for (Int_t i=0;i<8;++i) {
// just to show how ugly it is...
- cdhDDL[i]=reinterpret_cast<UInt_t*>(const_cast<AliRawDataHeader*>(fReader->GetDataHeader()))[i];
-
+ if (cdh)
+ cdhDDL[i]=reinterpret_cast<UInt_t*>(const_cast<AliRawDataHeader*>(cdh))[i];
+ if (cdhV3)
+ cdhDDL[i]=reinterpret_cast<UInt_t*>(const_cast<AliRawDataHeaderV3*>(cdhV3))[i];
+ }
// PAYLOAD
while (fDecoder->NextChannel()) {
Int_t hwaddr=fDecoder->GetHWAddress();
{
// Reading CDH
const AliRawDataHeader* header = fRawReader->GetDataHeader();
- if(!header) {
+ const AliRawDataHeaderV3* headerV3 = fRawReader->GetDataHeaderV3();
+ if(!header && !headerV3) {
AliError(" No CDH in raw data streaming");
fRawReader->AddMajorErrorLog(kCDHError);
return;
}
- else{
+
//printf("\t AliZDCRawStream::ReadCDHHeader -> Data Size = %x\n",fRawReader->GetDataSize());
- UChar_t message = header->GetAttributes();
+ UChar_t message = header ? header->GetAttributes() : headerV3->GetAttributes();
//printf("\t AliZDCRawStream::ReadCDHHeader -> Attributes %x\n",message);
if((message & 0xf0) == 0x0){ // PHYSICS RUN
//AliInfo("\t ZDC readout card used: ZRC");
}
- if(header->GetL1TriggerMessage() & 0x1){ // Calibration bit set in CDH
- fIsCalib = kTRUE;
- }
+ fIsCalib = (header ? header->GetL1TriggerMessage() : headerV3->GetL1TriggerMessage()) & 0x1;
+
//printf("\t AliZDCRawStream::ReadCDHHeader -> L1TriggerMessage %x\n",header->GetL1TriggerMessage());
//printf("\t AliZDCRawStream::ReadCDHHeader -> Calibration bit = %d\n",fIsCalib);
fRawReader->AddMajorErrorLog(kDARCError);
}
*/
- }
}