//
//////////////////////////////////////////////////////////////////
-#include <stdlib.h>
-#include <Riostream.h>
-#include <TClonesArray.h>
-#include <TTree.h>
-#include <TMath.h>
-#include "AliLog.h"
+#include "Riostream.h"
+
+#include "TBranch.h"
+#include "TClonesArray.h"
+#include "TMath.h"
-#include "AliRawDataHeader.h"
#include "AliBitPacking.h"
+#include "AliLog.h"
+#include "AliRawDataHeader.h"
-#include "AliTOFGeometry.h"
+#include "AliTOFDDLRawData.h"
#include "AliTOFdigit.h"
+#include "AliTOFGeometry.h"
#include "AliTOFRawStream.h"
-#include "AliTOFDDLRawData.h"
+#include "AliDAQ.h"
ClassImp(AliTOFDDLRawData)
//Default constructor
fIndex=-1;
fVerbose=0;
+ fTOFgeometry = 0;
+}
+
+//----------------------------------------------------------------------------------------
+AliTOFDDLRawData::AliTOFDDLRawData(AliTOFGeometry *tofGeom)
+{
+ //Constructor
+ fIndex=-1;
+ fVerbose=0;
+ fTOFgeometry = tofGeom;
}
//----------------------------------------------------------------------------------------
//Copy Constructor
this->fIndex=source.fIndex;
this->fVerbose=source.fVerbose;
+ this->fTOFgeometry=source.fTOFgeometry;
return;
}
//Assigment operator
this->fIndex=source.fIndex;
this->fVerbose=source.fVerbose;
+ this->fTOFgeometry=source.fTOFgeometry;
return *this;
}
//This method packs the TOF digits in a proper 32 bits structure
- Int_t iDDL = nDDL%AliTOFGeometry::NDDL();//(Int_t)((nDDL/4.-(Int_t)(nDDL/4.))*4);
+ Int_t iDDL = nDDL%AliTOFGeometry::NDDL();
Int_t iSector = (Int_t)((Float_t)nDDL/AliTOFGeometry::NDDL());
Int_t iTRM = 0;
Int_t iTDC = 0;
strip = digs->GetStrip(); // Strip Number (0-14/18/19)
padx = digs->GetPadx(); // Pad Number in x direction (0-47)
padz = digs->GetPadz(); // Pad Number in z direction (0-1)
- eureka = digs->GetTotPad(); // Global Pad Number inside a Sector
- totCharge = (Int_t)digs->GetAdc();
+ eureka = digs->GetTotPad(fTOFgeometry); // Global Pad Number inside a Sector
+ // totCharge = (Int_t)digs->GetAdc(); //Use realistic ToT, for Standard production with no miscalibration/Slewing it == fAdC in digit (see AliTOFDigitizer)
+ totCharge = (Int_t)digs->GetToT();
timeOfFlight = (Int_t)digs->GetTdc();
if (sector!=iSector || (Int_t)((Float_t)eureka/AliTOFGeometry::NPadXTRM()/AliTOFGeometry::NTRM())!=iDDL) continue;
if (fVerbose==2) ftxt << "DDL: "<<nDDL<<" TRM: "<<iTRM<<" TDC: "<<iTDC<<" Channel: "<<iCH<<" totCharge: "<<totCharge<<" tof: "<<timeOfFlight<<endl;
- //AliInfo(Form("%2i %2i %2i %2i %2i %2i %2i %2i %2i %7i %8i",nDDL,iTRM,iTDC,iCH,sector,plate,strip,padz,padx,totCharge,timeOfFlight));
AliDebug(2,Form("%2i %2i %2i %2i %2i %2i %2i %2i %2i %7i %8i",nDDL,iTRM,iTDC,iCH,sector,plate,strip,padz,padx,totCharge,timeOfFlight));
baseWord=0;
//loop over TOF DDL files
for(Int_t i = 0; i<AliTOFGeometry::NDDL()*AliTOFGeometry::NSectors(); i++){
- sprintf(fileName,"TOF_%d.ddl",i+AliTOFRawStream::kDDLOffset); //The name of the output file
+ strcpy(fileName,AliDAQ::DdlFileName("TOF",i)); //The name of the output file
#ifndef __DECCXX
outfile.open(fileName,ios::binary);
#else