#include "AliTRDrawData.h"
#include "AliTRDdigitsManager.h"
#include "AliTRDgeometry.h"
-#include "AliTRDdataArrayI.h"
-#include "AliTRDdataArrayS.h"
+#include "AliTRDarrayDictionary.h"
+#include "AliTRDarrayADC.h"
#include "AliTRDrawStreamBase.h"
#include "AliTRDrawOldStream.h"
#include "AliTRDRawStreamV2.h"
Int_t iDet = fGeo->GetDetector(layer,stack,sect);
if (iDet == 0) newEvent = kTRUE; // it is expected that each event has at least one tracklet; this is only needed for correct readout tree
// Get the digits array
- AliTRDdataArrayS *digits = (AliTRDdataArrayS *) digitsManager->GetDigits(iDet);
+ AliTRDarrayADC *digits = (AliTRDarrayADC *) digitsManager->GetDigits(iDet);
if (digits->HasData() ) { // second part is new!! and is for indicating a new event
digits->Expand();
}
//_____________________________________________________________________________
-Int_t AliTRDrawData::ProduceHcData(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent = kFALSE){
+Int_t AliTRDrawData::ProduceHcData(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent = kFALSE){
//
// This function can be used for both ZS and NZS data
//
Int_t padcol = mcm[entry]->GetCol( iAdc );
if ((padcol >= 0) && (padcol < nCol)) {
for (Int_t iT = 0; iT < kNTBin; iT++) {
- mcm[entry]->SetData( iAdc, iT, digits->GetDataUnchecked( padrow, padcol, iT) );
+ mcm[entry]->SetData( iAdc, iT, digits->GetData( padrow, padcol, iT) );
}
}
else { // this means it is out of chamber, and masked ADC
}
// Simulate process in MCM
- mcm[entry]->Filter(); // Apply filter
- mcm[entry]->ZSMapping(); // Calculate zero suppression mapping
+ // mcm[entry]->Filter(); // Apply filter
+ // mcm[entry]->ZSMapping(); // Calculate zero suppression mapping
+ mcm[entry]->CopyArrays();
+ mcm[entry]->GeneratefZSM1Dim();
if (tracklet_on) {
mcm[entry]->Tracklet();
//_____________________________________________________________________________
-Int_t AliTRDrawData::ProduceHcDataV1andV2(AliTRDdataArrayS *digits, Int_t side
+Int_t AliTRDrawData::ProduceHcDataV1andV2(AliTRDarrayADC *digits, Int_t side
, Int_t det, UInt_t *buf, Int_t maxSize)
{
//
// 3 timebins are packed into one 32 bits word
for (Int_t iT = 0; iT < kNTBin; iT+=3) {
if ((padcol >= 0) && (padcol < nCol)) {
- a[iT ] = ((iT ) < kNTBin ) ? digits->GetDataUnchecked(padrow,padcol,iT ) : 0;
- a[iT+1] = ((iT + 1) < kNTBin ) ? digits->GetDataUnchecked(padrow,padcol,iT + 1) : 0;
- a[iT+2] = ((iT + 2) < kNTBin ) ? digits->GetDataUnchecked(padrow,padcol,iT + 2) : 0;
+ a[iT ] = ((iT ) < kNTBin ) ? digits->GetData(padrow,padcol,iT ) : 0;
+ a[iT+1] = ((iT + 1) < kNTBin ) ? digits->GetData(padrow,padcol,iT + 1) : 0;
+ a[iT+2] = ((iT + 2) < kNTBin ) ? digits->GetData(padrow,padcol,iT + 2) : 0;
}
else {
a[iT] = a[iT+1] = a[iT+2] = 0; // This happenes at the edge of chamber (should be pedestal! How?)
//_____________________________________________________________________________
-//Int_t AliTRDrawData::ProduceHcDataV3(AliTRDdataArrayS *digits, Int_t side , Int_t det, UInt_t *buf, Int_t maxSize)
-Int_t AliTRDrawData::ProduceHcDataV3(AliTRDdataArrayS *digits, Int_t side , Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent = kFALSE)
+//Int_t AliTRDrawData::ProduceHcDataV3(AliTRDarrayADC *digits, Int_t side , Int_t det, UInt_t *buf, Int_t maxSize)
+Int_t AliTRDrawData::ProduceHcDataV3(AliTRDarrayADC *digits, Int_t side , Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent = kFALSE)
{
//
// This function simulates: Raw Version == 3 (Zero Suppression Prototype)
Int_t padcol = mcm[entry]->GetCol( iAdc );
if ((padcol >= 0) && (padcol < nCol)) {
for (Int_t iT = 0; iT < kNTBin; iT++) {
- mcm[entry]->SetData( iAdc, iT, digits->GetDataUnchecked( padrow, padcol, iT) );
+ mcm[entry]->SetData( iAdc, iT, digits->GetData( padrow, padcol, iT) );
}
}
else { // this means it is out of chamber, and masked ADC
}
// Simulate process in MCM
- mcm[entry]->Filter(); // Apply filter
- mcm[entry]->ZSMapping(); // Calculate zero suppression mapping
+ // mcm[entry]->Filter(); // Apply filter
+ // mcm[entry]->ZSMapping(); // Calculate zero suppression mapping
+ mcm[entry]->CopyArrays();
+ mcm[entry]->GeneratefZSM1Dim();
if (tracklet_on) {
mcm[entry]->Tracklet();
// Vx of the raw data reading
//
- AliTRDdataArrayS *digits = 0;
- AliTRDdataArrayI *track0 = 0;
- AliTRDdataArrayI *track1 = 0;
- AliTRDdataArrayI *track2 = 0;
+ AliTRDarrayADC *digits = 0;
+ AliTRDarrayDictionary *track0 = 0;
+ AliTRDarrayDictionary *track1 = 0;
+ AliTRDarrayDictionary *track2 = 0;
//AliTRDSignalIndex *indexes = 0;
// Create the digits manager
if (det >= 0)
{
// get...
- digits = (AliTRDdataArrayS *) digitsManager->GetDigits(det);
- track0 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,0);
- track1 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,1);
- track2 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,2);
+ digits = (AliTRDarrayADC *) digitsManager->GetDigits(det);
+ track0 = (AliTRDarrayDictionary *) digitsManager->GetDictionary(det,0);
+ track1 = (AliTRDarrayDictionary *) digitsManager->GetDictionary(det,1);
+ track2 = (AliTRDarrayDictionary *) digitsManager->GetDictionary(det,2);
// and compress
- if (digits) digits->Compress(1,0);
- if (track0) track0->Compress(1,0);
- if (track1) track1->Compress(1,0);
- if (track2) track2->Compress(1,0);
+ if (digits) digits->Compress();
+ if (track0) track0->Compress();
+ if (track1) track1->Compress();
+ if (track2) track2->Compress();
}
}
// Vx of the raw data reading
//
- AliTRDdataArrayS *digits = 0;
- AliTRDdataArrayI *track0 = 0;
- AliTRDdataArrayI *track1 = 0;
- AliTRDdataArrayI *track2 = 0;
+ AliTRDarrayADC *digits = 0;
+ AliTRDarrayDictionary *track0 = 0;
+ AliTRDarrayDictionary *track1 = 0;
+ AliTRDarrayDictionary *track2 = 0;
AliTRDSignalIndex *indexes = 0;
// Create the digits manager
lastdet = det;
- if (digits) digits->Compress(1,0);
- if (track0) track0->Compress(1,0);
- if (track1) track1->Compress(1,0);
- if (track2) track2->Compress(1,0);
+ if (digits) digits->Compress();
+ if (track0) track0->Compress();
+ if (track1) track1->Compress();
+ if (track2) track2->Compress();
// Add a container for the digits of this detector
- digits = (AliTRDdataArrayS *) digitsManager->GetDigits(det);
- track0 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,0);
- track1 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,1);
- track2 = (AliTRDdataArrayI *) digitsManager->GetDictionary(det,2);
+ digits = (AliTRDarrayADC *) digitsManager->GetDigits(det);
+ track0 = (AliTRDarrayDictionary *) digitsManager->GetDictionary(det,0);
+ track1 = (AliTRDarrayDictionary *) digitsManager->GetDictionary(det,1);
+ track2 = (AliTRDarrayDictionary *) digitsManager->GetDictionary(det,2);
// Allocate memory space for the digits buffer
if (digits->GetNtime() == 0)
{
if (input.GetSignals()[it] > 0)
{
- digits->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, input.GetSignals()[it]);
+ digits->SetData(input.GetRow(), input.GetCol(),input.GetTimeBin() + it, input.GetSignals()[it]);
indexes->AddIndexTBin(input.GetRow(), input.GetCol(),
input.GetTimeBin() + it);
- track0->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, 0);
- track1->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, 0);
- track2->SetDataUnchecked(input.GetRow(), input.GetCol(),
- input.GetTimeBin() + it, 0);
+ track0->SetData(input.GetRow(), input.GetCol(), input.GetTimeBin() + it, 0);
+ track1->SetData(input.GetRow(), input.GetCol(), input.GetTimeBin() + it, 0);
+ track2->SetData(input.GetRow(), input.GetCol(), input.GetTimeBin() + it, 0);
}
}
}
}
- if (digits) digits->Compress(1,0);
- if (track0) track0->Compress(1,0);
- if (track1) track1->Compress(1,0);
- if (track2) track2->Compress(1,0);
+ if (digits) digits->Compress();
+ if (track0) track0->Compress();
+ if (track1) track1->Compress();
+ if (track2) track2->Compress();
return digitsManager;