// **************************************************************************
#include "AliHMPIDCalib.h" //class header
+#include "AliHMPIDParam.h" //class header
+#include "AliHMPIDRawStream.h" //class header
#include <fstream>
#include <TTree.h>
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDCalib::AliHMPIDCalib()
+AliHMPIDCalib::AliHMPIDCalib():
+faddl(0x0),
+fPadAdc(0x0),
+fIsPad(0x0),
+fFile(0x0),
+fLdcId(0),
+fTimeStamp(0),
+fRunNum(0),
+fSigCut(0),
+fWritePads(0)
{
//
//constructor
//
+ faddl = new Bool_t[AliHMPIDRawStream::kNDDL];
+ Int_t nPads = (AliHMPIDParam::kMaxCh+1)*(AliHMPIDParam::kMaxPcx+1)*(AliHMPIDParam::kMaxPcy+1);
+ fPadAdc=new TH1I*[nPads];
+ fIsPad=new Bool_t[nPads];
+ for(Int_t np=0;np<nPads;np++) {fPadAdc[np]=0x0; fIsPad[np]=kFALSE;}
+ fWritePads=kFALSE;
Init();
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//destructor
//
-}//ctor
+ if (faddl) { delete [] faddl; faddl = 0x0; }
+ if (fPadAdc) {delete [] fPadAdc; fPadAdc=0x0; }
+ if (fIsPad) {delete [] fIsPad; fIsPad=0x0; }
+ if (fFile) {delete fFile; fFile=0x0; }
+ fLdcId=0;
+ fTimeStamp=0;
+ fRunNum=0;
+ fSigCut=0;
+ fWritePads=0;
+}//dtor
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDCalib::Init()
{
//
//Init the q calc.
+ //Arguments: none
+ //Return: none
//
-
- for(Int_t iDDL=0; iDDL< AliHMPIDCalib::kNDDL; iDDL++)
+ fSigCut=3;
+
+ for(Int_t iDDL=0; iDDL< AliHMPIDRawStream::kNDDL; iDDL++)
{
+ for(Int_t ierr=0; ierr <AliHMPIDRawStream::kSumErr ; ierr++) {
+ fErr[iDDL][ierr]=0;
+ }
+
faddl[iDDL]=kFALSE;
-
- for(Int_t ierr=0; ierr < AliHMPIDRawStream::kSumErr; ierr++) fNumOfErr[iDDL][ierr]=0; //reset errors for all DDLs
-
- for(Int_t row = 1; row <=AliHMPIDCalib::kNRows; row++){
- for(Int_t dil = 1; dil <=AliHMPIDCalib::kNDILOGICAdd; dil++){
- for(Int_t pad = 0; pad < AliHMPIDCalib::kNPadAdd; pad++){
- fsq[iDDL][row][dil][pad]=0;
- fsq2[iDDL][row][dil][pad]=0;
- }
- }
- }
- }
+ for(Int_t row = 1; row <=AliHMPIDRawStream::kNRows; row++){
+ for(Int_t dil = 1; dil <=AliHMPIDRawStream::kNDILOGICAdd; dil++){
+ for(Int_t pad = 0; pad < AliHMPIDRawStream::kNPadAdd; pad++){
+ fsq[iDDL][row][dil][pad]=0;
+ fsq2[iDDL][row][dil][pad]=0;
+ }//pad
+ }//dil
+ }//row
+ }//DDL
}//Init()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//void AliHMPIDCalib::FillPedestal(Int_t nDDL,Int_t row, Int_t dil,Int_t adr,Int_t q)
-void AliHMPIDCalib::FillPedestal(Int_t pad,Int_t q)
+void AliHMPIDCalib::SetRunParams(ULong_t runNum,Int_t timeStamp, Int_t ldcId)
+{
+ //
+ //Set run parameters for the Pedestal and Error Files
+ //Arguments: run number, time stamp and LDC Id
+ //Returns: none
+ //
+ fRunNum=(Int_t)runNum;
+ fTimeStamp=timeStamp;
+ fLdcId=ldcId;
+}//SetRunParams()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliHMPIDCalib::SetSigCutFromFile(Char_t* name)
{
//
- //Called from the HMPIDda and fills the pedestal tree
+ //Set Sigma Cut from the file on the LDC, if the input file is not present default value is set!
+ //Arguments: the name of the SigmaCut file on the LDC
+ //Returns: none
+ //
+ Int_t nSigCut=0;
+ ifstream infile(name);
+ if(!infile.is_open()) {fSigCut=3; return;}
+ while(!infile.eof())
+ {
+ infile>>nSigCut;
+ }
+ infile.close();
+ fSigCut=nSigCut;
+}//SetSigCutFromFile()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliHMPIDCalib::InitHisto(Int_t q,Int_t histocnt,Char_t* name)
+{
+ //
+ //Init the pad histos. For one DDL we have 11520 pads. ONLY if ENABLED!
+ //Arguments: q-charge, the absolute number of the histogram (AliHMPIDParam::kMaxCh+1)*(AliHMPIDParam::kMaxPcx+1)*(AliHMPIDParam::kMaxPcy+1) and the name of the histogram (unique)
+ //Returns: none
+ //
+
+ fFile->cd();
+ Double_t lowbin,highbin=0;
+// Printf("InitHisto: histocnt: %d Name: %s",histocnt,name);
+ if(fIsPad[histocnt]==kTRUE) return;
+
+ lowbin=q-40.5; highbin=q+40.5;
+ fPadAdc[histocnt]=new TH1I(name,name,81,lowbin,highbin);
+ fPadAdc[histocnt]->Sumw2();
+ fIsPad[histocnt]=kTRUE;
+
+}//InitHisto()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliHMPIDCalib::FillHisto(Int_t histocnt,Int_t q)
+{
+ //
+ //Fill the ADC histograms for each pad
+ //Arguments: q-charge, the absolute number of the histogram (AliHMPIDParam::kMaxCh+1)*(AliHMPIDParam::kMaxPcx+1)*(AliHMPIDParam::kMaxPcy+1)
+ //Returns: none
+ //
+ fFile->cd();
+ if(fIsPad[histocnt]==kFALSE) return;
+ fPadAdc[histocnt]->Fill(q);
+
+}//InitHisto()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliHMPIDCalib::InitFile(Int_t ldcId)
+{
+ //
+ //Initialize the ADC histo output file (one per LDC)
+ //Arguments: LDC Id
+ //Returns: none
+ //
+ fFile=new TFile(Form("HmpidPadsOnLdc%2d.root",ldcId),"RECREATE");
+}//InitFile()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliHMPIDCalib::CloseFile(Int_t /*ldcId*/)
+{
+ //
+ //Close the ADC histo output file (one per LDC)
+ //Arguments: LDC Id
+ //Returns: none
+ //
+ fFile->cd();
+ Int_t nPads = (AliHMPIDParam::kMaxCh+1)*(AliHMPIDParam::kMaxPcx+1)*(AliHMPIDParam::kMaxPcy+1);
+ for(Int_t np=0;np<nPads;np++) {if(fIsPad[np]==kTRUE) fPadAdc[np]->Write();}
+ fFile->Close();
+}//CloseFile()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+void AliHMPIDCalib::FillPedestal(Int_t abspad,Int_t q)
+{
+ //
+ //Called from the HMPIDda and fills the pedestal values
+ //Arguments: absulote pad number as from AliHMPIDParam and q-charge
+ //Returns: none
//
Int_t nDDL=0, row=0, dil=0, adr=0;
//The decoding (abs. pad -> ddl,dil,...) is the same as in AliHMPIDDigit::Raw
Int_t y2a[6]={5,3,1,0,2,4};
- nDDL= 2*AliHMPIDParam::A2C(pad)+AliHMPIDParam::A2P(pad)%2; //DDL# 0..13
- Int_t tmp= 1+AliHMPIDParam::A2P(pad)/2*8+AliHMPIDParam::A2Y(pad)/6; //temp variable
- row= (AliHMPIDParam::A2P(pad)%2)? 25-tmp:tmp; //row r=1..24
- dil= 1+AliHMPIDParam::A2X(pad)/8; //DILOGIC
- adr=y2a[AliHMPIDParam::A2Y(pad)%6]+6*(AliHMPIDParam::A2X(pad)%8); //ADDRESS 0..47
-
- // Printf("AbsPadNum: %d nDDL: %d tmp %d row: %d dil: %d adr: %d",pad,nDDL,tmp,row,dil,adr);
+ nDDL= 2*AliHMPIDParam::A2C(abspad)+AliHMPIDParam::A2P(abspad)%2; //DDL# 0..13
+ Int_t tmp= 1+AliHMPIDParam::A2P(abspad)/2*8+AliHMPIDParam::A2Y(abspad)/6; //temp variable
+ row= (AliHMPIDParam::A2P(abspad)%2)? 25-tmp:tmp; //row r=1..24
+ dil= 1+AliHMPIDParam::A2X(abspad)/8; //DILOGIC
+ adr=y2a[AliHMPIDParam::A2Y(abspad)%6]+6*(AliHMPIDParam::A2X(abspad)%8); //ADDRESS 0..47
//........... decoding done
-
+
+
if(q>0) {
fsq[nDDL][row][dil][adr]+=q;
fsq2[nDDL][row][dil][adr]+=(q*q);
faddl[nDDL]=kTRUE;
}
-
-
-
+ Int_t histocnt=0;
+ histocnt=(nDDL)*11520+(row-1)*480+(dil-1)*48+adr; //Histo counter for a single DDL
+ if(fWritePads==kTRUE)
+ {
+ InitHisto(q,histocnt,Form("hPad_Ch_%d_Pc_%d_Px_%d_Py_%d",
+ AliHMPIDParam::A2C(abspad),AliHMPIDParam::A2P(abspad),AliHMPIDParam::A2X(abspad),AliHMPIDParam::A2Y(abspad)));
+ FillHisto(histocnt,q);
+ }
+
}//FillPedestal()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDCalib::FillErrors(Int_t nDDL,Int_t nErrType, Int_t nErr)
+void AliHMPIDCalib::FillErrors(Int_t nDDL,Int_t eType, Int_t nErr)
{
//
- //Fill decoding errors
+ //Fill decoding errors from AliHMPIDRawStream
+ //Arguments: nDDL-DDL number, eType- error type as in AliHMPIDRawStream.h and the # of occurence for eType
+ //Retutns: none
//
- // fhDdlDecodErrors[nDDL]->Fill(nErrType,nErr); //select DDL, select bin and add the occurence
- fNumOfErr[nDDL][nErrType]+=nErr;
+ if(nErr<=0) return;
+ if(eType < 0 || eType> AliHMPIDRawStream::kSumErr ) return;
+ fErr[nDDL][eType]=fErr[nDDL][eType]+nErr;
}//FillErrors()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-Bool_t AliHMPIDCalib::WriteErrors(ULong_t runNum, Int_t nDDL, Char_t* name, Int_t /*nEv*/)
+Bool_t AliHMPIDCalib::WriteErrors(Int_t nDDL, Char_t* name, Int_t nEv)
{
//
//Write decoding errors to a txt file
+ //Arguments: nDDL-DDL number, name of the error file and number of the read events
+ //Retutns: kTRUE/kFALSE
//
- if(faddl[nDDL]==kFALSE) return kFALSE; //if ddl is missing no error file is created
- ofstream outerr;
- outerr.open(name); //open error file
-
- outerr << Form("%d \n",(Int_t)runNum);
- for(Int_t ierr=1; ierr < AliHMPIDRawStream::kSumErr; ierr++) outerr << Form("%2d\t",fNumOfErr[nDDL][ierr]);
- outerr << Form("\n");
- outerr.close(); //write error file
+ if(faddl[nDDL]==kFALSE) return kFALSE; //if ddl is missing no error file is created
+ ofstream outerr; outerr.open(name); //open error file
+ outerr << Form("%6s %2d\n","RunNum",(Int_t)fRunNum); //read run number
+ outerr << Form("%6s %2d\n","LdcId" , fLdcId); //read LDC Id
+ outerr << Form("%6s %2d\n","TimeSt", fTimeStamp); //read time stamp
+ outerr << Form("%6s %2d\n","NumEvt", nEv); //read number of events processed
+
+ for(Int_t ierr=0; ierr <AliHMPIDRawStream::kSumErr; ierr++) outerr << Form("%2d\t",fErr[nDDL][ierr]); //write errors
+ outerr << Form("\n"); //last break
+ outerr.close(); //write error file
return kTRUE;
}//FillErrors()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-Bool_t AliHMPIDCalib::CalcPedestal(ULong_t runNum, Int_t nDDL, Char_t* name, Int_t nEv)
+Bool_t AliHMPIDCalib::CalcPedestal(Int_t nDDL, Char_t* name, Int_t nEv)
{
//
//Calculate pedestal for each pad
+ //Arguments: nDDL-DDL number, name of the pedestal file and number of the read events
+ //Retutns: kTRUE/kFALSE
//
+
if(faddl[nDDL]==kFALSE) return kFALSE; //if ddl is missing no ped file is created (and also for LDC selection). Check with Paolo what he checks for?!
Float_t mean=0,sigma=0;
Float_t qs2m=0,qsm2=0;
ofstream out; //to write the pedestal text files
Int_t inhard;
- //Printf("From AliHMPIDCalib::CalcPedestal: faddl[%i]= %i",nDDL,faddl[nDDL]);
-
out.open(name);
- out << Form("%d \n",(Int_t)runNum);
- for(Int_t row = 1; row <= AliHMPIDCalib::kNRows; row++){
- for(Int_t dil = 1; dil <= AliHMPIDCalib::kNDILOGICAdd; dil++){
- for(Int_t pad = 0; pad < AliHMPIDCalib::kNPadAdd; pad++){
+ //out << Form("%2d %2d\n",(Int_t)runNum,nEv);
+ out << Form("%6s %2d\n","RunNum",(Int_t)fRunNum);
+ out << Form("%6s %2d\n","LdcId" , fLdcId);
+ out << Form("%6s %2d\n","TimeSt", fTimeStamp);
+ out << Form("%6s %2d\n","NumEvt", nEv);
+ out << Form("%6s %2d\n","SigCut", fSigCut);
+ for(Int_t row = 1; row <= AliHMPIDRawStream::kNRows; row++){
+ for(Int_t dil = 1; dil <= AliHMPIDRawStream::kNDILOGICAdd; dil++){
+ for(Int_t pad = 0; pad < AliHMPIDRawStream::kNPadAdd; pad++){
mean = fsq[nDDL][row][dil][pad]/1.0/nEv;
#include <TH2.h>
#include <TH1S.h>
#include <TMath.h>
+#include <TFile.h>
#include "AliHMPIDParam.h"
#include "AliHMPIDRawStream.h"
+class TH1I;
+class TFile;
class AliHMPIDCalib: public TObject {
AliHMPIDCalib();
virtual ~AliHMPIDCalib();
void Init();
-// void FillPedestal(Int_t nDDL,Int_t row, Int_t dil,Int_t adr,Int_t q);
void FillPedestal(Int_t pad,Int_t q); //absolute pad number and the charge of the pad
- void FillErrors(Int_t nDDL,Int_t nErrType, Int_t nErr);
- Bool_t CalcPedestal(ULong_t runNum, Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
- Bool_t WriteErrors(ULong_t runNum, Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
-
- enum {
- kNRows = 24, // Number of rows (starting from 1 !)//was25
- kNDILOGICAdd = 10, // Number of DILOGIC addresses in a row (starting from 1 !) //was11
- kNPadAdd = 48, // Number of pad row
- kNDDL = 14
- };
-
+ void FillErrors(Int_t nDDL,Int_t nErrType, Int_t nErr); //Fill the errors from RawStream
+ Bool_t CalcPedestal(Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
+ Bool_t WriteErrors(Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
+ void InitHisto(Int_t q,Int_t histocnt,Char_t* name); //Init the pad histograms
+ void FillHisto(Int_t histocnt,Int_t q); //Fill the ADC histograms
+ void InitFile(Int_t nDDL); //Init the ADC histo output file (one per LDC)
+ void CloseFile(Int_t nDDL); //Close the file
+ void SetRunParams(ULong_t runNum,Int_t timeStamp, Int_t ldcId); //Set Run Parameters such as Run Number, TimeStamp, LDCid
+ inline void SetSigCut(Int_t nSigCut) { fSigCut=nSigCut;} //Set Sigma Cuts from Setter
+ void SetSigCutFromFile(Char_t* name); //Set Sigma Cuts from File
+ inline void SetWriteHistoPads(Bool_t isOn) {fWritePads=isOn;} //Set wether ADC histos of pads are written or not
+ inline Bool_t GetWritePads() {return fWritePads;} //Set wether ADC histos of pads are written or not
protected:
- Bool_t faddl[11]; //check is ddl is filled
- Float_t fsq[kNDDL][kNRows][kNDILOGICAdd][kNPadAdd]; //Sum of pad Q
- Float_t fsq2[kNDDL][kNRows][kNDILOGICAdd][kNPadAdd]; //Sum of pad Q^2
- Int_t fNumOfErr[kNDDL][AliHMPIDRawStream::kSumErr]; // Store the numner of errors for a given error type and a given DDL
- ClassDef(AliHMPIDCalib,2) //HMPID calibration and pedestal class
+
+ Bool_t *faddl; //check is ddl is filled
+ Float_t fsq[AliHMPIDRawStream::kNDDL+1][AliHMPIDRawStream::kNRows+1][AliHMPIDRawStream::kNDILOGICAdd+1][AliHMPIDRawStream::kNPadAdd+1]; //Sum of pad Q
+ Float_t fsq2[AliHMPIDRawStream::kNDDL+1][AliHMPIDRawStream::kNRows+1][AliHMPIDRawStream::kNDILOGICAdd+1][AliHMPIDRawStream::kNPadAdd+1]; //Sum of pad Q^2
+ Int_t fErr[AliHMPIDRawStream::kNDDL+1][AliHMPIDRawStream::kSumErr+1]; // Store the numner of errors for a given error type and a given DDL
+ TH1I **fPadAdc; //Charge distribution for pads
+ Bool_t *fIsPad; //Check if the ADC histo for the pad is booked or not
+ TFile *fFile; //ADC histo output file (one per LDC)
+ UInt_t fLdcId; //Ldc ID
+ UInt_t fTimeStamp; //Time Stamp
+ Int_t fRunNum; //Run Number
+ Int_t fSigCut; //n. of pedestal distribution sigmas used to create zero suppresion table
+ Bool_t fWritePads; //Select wether to write ADC pad histograms or not
+ ClassDef(AliHMPIDCalib,2) //HMPID calibration and pedestal class
};
#endif
// Booking QA histo for Raw data
//
const Int_t nerr = (Int_t)AliHMPIDRawStream::kSumErr+1;
- const char *hnames[nerr]={"RawDataSize","RawMarkerSize","WrongRow","WrongDilogic","WrongPad","EoEFlag",
- "EoESize","EoEDILOGIC","EoERow","BadSegWord","WrongSeg","RowMarkerSize","NoErrors","Invalid"};
TH1F *hqPad[14], *hSumErr[14];
- for(Int_t iddl =0; iddl<14; iddl++) {
-
- hqPad[iddl] = new TH1F(Form("hqPadDDL%i",iddl), Form("Pad Q Entries at DDL %i",iddl), 500,0,5000);
- Add2RawsList(hqPad[iddl],iddl);
- hSumErr[iddl] = new TH1F(Form("SumErrDDL%i",iddl), Form("Error summary for ddl %i",iddl), 2*nerr,0,2*nerr);
- hSumErr[iddl]->SetYTitle("%");
- for(Int_t ilabel=0; ilabel< nerr; ilabel++) {
- hSumErr[iddl]->GetXaxis()->CenterLabels(kTRUE);
- hSumErr[iddl]->GetXaxis()->SetBinLabel((2*ilabel+1),Form("%i %s",ilabel+1,hnames[ilabel]));
- }
- Add2RawsList(hSumErr[iddl],iddl+14);
+ for(Int_t iddl =0; iddl<AliHMPIDRawStream::kNDDL; iddl++) {
+ hqPad[iddl] = new TH1F(Form("hqPadDDL%i",iddl), Form("Pad Q Entries at DDL %i",iddl), 500,0,5000);
+ Add2RawsList(hqPad[iddl],iddl);
+ hSumErr[iddl] = new TH1F(Form("SumErrDDL%i",iddl), Form("Error summary for ddl %i",iddl), 2*nerr,0,2*nerr);
+ hSumErr[iddl]->SetYTitle("%");
+
+ for(Int_t ilabel=0; ilabel< nerr; ilabel++) {
+ hSumErr[iddl]->GetXaxis()->CenterLabels(kTRUE);
+ //hSumErr[iddl]->GetXaxis()->SetBinLabel((2*ilabel+1),Form("%i %s",ilabel+1,hnames[ilabel]));
+ hSumErr[iddl]->GetXaxis()->SetBinLabel((2*ilabel+1),Form("%i %s",ilabel+1,AliHMPIDRawStream::GetErrName(ilabel)));
+ }
+
+ Add2RawsList(hSumErr[iddl],iddl+14);
}
TH1F *hNevRaws = new TH1F("NevRaws","Events per DDL",15,0,15);
Add2RawsList(hNevRaws,28);
fCharge(0x0),
fPad(0x0),
fDDLNumber(-1),
+ fLDCNumber( 0),
+ fTimeStamp( 0),
fRawReader(rawReader),
fData(0x0),
fNumOfErr(0x0),
fWord(0),
fZeroSup(kTRUE),
fPos(0x0),
- iPos(0)
+ fiPos(0)
{
+ //
// Constructor
-
+ //
+ fNumOfErr = new Int_t*[kNDDL]; // Store the numner of errors for a given error type and a given DD
+ for(Int_t i=0;i<kNDDL;i++) {
+ fNumOfErr[i] = new Int_t [kSumErr];
+ }
+
+ for(Int_t iddl=0;iddl<kNDDL;iddl++)
+ for(Int_t ierr=0; ierr < kSumErr; ierr++) fNumOfErr[iddl][ierr]=0; //reset errors
fRawReader->Reset();
fRawReader->Select("HMPID");
}
fCharge(0x0),
fPad(0x0),
fDDLNumber(-1),
+ fLDCNumber( 0),
+ fTimeStamp( 0),
fRawReader(0x0),
fData(0x0),
- fNumOfErr(0x0),
+ fNumOfErr(0x0),
fPosition(-1),
fWord(0),
fZeroSup(kTRUE),
fPos(0x0),
- iPos(0)
+ fiPos(0)
{
+ //
+ // Constructor
+ //
+ fNumOfErr = new Int_t*[kNDDL]; // Store the numner of errors for a given error type and a given DD
+ for(Int_t i=0;i<kNDDL;i++) {
+ fNumOfErr[i] = new Int_t [kSumErr];
+ }
+ for(Int_t iddl=0;iddl<kNDDL;iddl++)
+ for(Int_t ierr=0; ierr < kSumErr; ierr++) fNumOfErr[iddl][ierr]=0; //reset errors
+
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AliHMPIDRawStream::~AliHMPIDRawStream()
{
+ //
// destructor
- DelVars();
+ //
+ DelVars();
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDRawStream::Reset()
// reset raw stream params
// Reinitalize the containers
fDDLNumber = -1;
+ fLDCNumber = 0;
+ fTimeStamp = 0;
fPosition = -1;
fData = NULL;
if (fRawReader) fRawReader->Reset();
fPosition = 0;
Bool_t status;
-
+ Int_t rawDataSize=0;
if(fRawReader->GetType() == 7) { //New: Select Physics events, Old: Raw data size is not 0 and not 47148 (pedestal)
fDDLNumber = fRawReader->GetDDLID();
- if (fDDLNumber<0) {
- AliWarning("Negative DDL number!");
- return kFALSE;
- }
+ fLDCNumber = fRawReader->GetLDCId();
+ fTimeStamp = fRawReader->GetTimestamp();
- if(stDeb) Printf("DDL %i started to be decoded!.",fDDLNumber);
- InitVars(fRawReader->GetDataSize()/4);
+ if(stDeb) Printf("DDL %i started to be decoded!",fDDLNumber);
+ rawDataSize=fRawReader->GetDataSize()/4;
+ InitVars(rawDataSize);
+
status = ReadHMPIDRawData();
if(stDeb) {
else Printf("Event DDL %i ERROR in decoding!.",fDDLNumber);
// DumpData(fRawReader->GetDataSize());
}
- DelVars();
// stDeb=kFALSE;
}
// return status;
- return kTRUE;
+ return kTRUE;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDRawStream::InitVars(Int_t n)
{
+ //
+ //
+ //
fNPads = 0;
- if (n>0) fCharge = new Int_t[n];
- if (n>0) fPad = new Int_t[n];
- fNumOfErr = new Int_t*[kNDDL]; // Store the numner of errors for a given error type and a given DD
- for(Int_t i=0;i<kNDDL;i++) {
- fNumOfErr[i] = new Int_t [kSumErr];
- for (Int_t j=0; j<kSumErr; j++) fNumOfErr[i][j] = 0;
- }
+ fCharge = new Int_t[n];
+ fPad = new Int_t[n];
//for debug purpose
- if (n>0) fPos = new Int_t[4*n]; //reset debug
- iPos = 0;
+ fPos = new Int_t[4*n+4]; //reset debug
+ fiPos = 0;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDRawStream::DelVars()
{
+ //
+ //
+ //
fNPads = 0;
- if (fCharge) {
- delete [] fCharge;
- fCharge = 0x0;
- }
- if (fPad) {
- delete [] fPad;
- fPad = 0x0;
- }
- if (fNumOfErr) {
- for(Int_t i=0;i<kNDDL;i++) if(fNumOfErr[i]) delete [] fNumOfErr[i];
- delete [] fNumOfErr;
- fNumOfErr = 0x0;
- }
- if (fPos) {
- delete [] fPos;
- fPos = 0x0;
- }
+ fDDLNumber=0;
+ fLDCNumber=0;
+ fTimeStamp=0;
+ fPosition=0;
+ fWord=0;
+ fZeroSup=0;
+ fiPos=0;
+
+ if (fCharge) { delete [] fCharge; fCharge = 0x0; }
+ if (fPad) { delete [] fPad; fPad = 0x0; }
+ if (fPos) { delete [] fPos; fPos = 0x0; }
+ for(Int_t i=0;i<kSumErr;i++) delete [] fNumOfErr[i];
+ delete [] fNumOfErr;
+
+
+
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bool_t AliHMPIDRawStream::ReadHMPIDRawData()
{
Int_t cntGlob = fRawReader->GetDataSize()/4;
+ if(cntGlob==0) {fNumOfErr[fDDLNumber][kRawDataSizeErr]++; return kFALSE; }
+
Int_t cnt = cntGlob;
Int_t nwSeg;
Int_t cntSegment;
- fWord = GetWord(cnt);cnt--;
+ if(!GetWord(cnt)) return kFALSE;
+ cnt--;
while (cnt>0) {
if(!ReadSegment(cntSegment)) return kFALSE;
if(nwSeg != cntSegment) {if(stDeb){Printf("Error in Segment counters: %i different wrt %i",nwSeg,cntSegment);} return kFALSE;}
- fWord = GetWord(cntSegment+1,kBwd);
+ if(!GetWord(cntSegment+1,kBwd)) return kFALSE;
cnt-=cntSegment+1;
}
Int_t cntRow;
Int_t nwRow;
- fWord = GetWord(cnt,kBwd);
+ if(!GetWord(cnt,kBwd)) return kFALSE;
while (cnt>0) {
if(!ReadRow(nwRow)) return kFALSE;
if(nwRow != cntRow) {if(stDeb){Printf("Error in Row counters: %i different wrt %i",nwRow,cntRow);} return kFALSE;}
- fWord = GetWord(cntRow+1);
+ if(!GetWord(cntRow+1)) return kFALSE;
cnt -= cntRow+1;
}
cntRow = (fWord >> kbit16) & 0xfff;
cnt = cntRow;
- fWord = GetWord(cntRow);
+ if(!GetWord(cntRow)) return kFALSE;
while (cnt>0) {
if(nwDil != cntDilogic) {if(stDeb){Printf("Error in Dilogic counters: %i different wrt %i",nwDil,cntDilogic);}return kFALSE;}
cnt -= cntDilogic;
- fWord = GetWord(1,kBwd); // go to next Dilogic bank...
+ if(!GetWord(1,kBwd)) return kFALSE; // go to next Dilogic bank...
cnt--;
// Printf(" cnt %i cntDilogic %i ",cnt,cntDilogic);
}
for(Int_t iDil=0;iDil<cntDilogic;iDil++) {
UInt_t dilogic = 0, row = 0;
- fWord = GetWord(1,kBwd);
+ if(!GetWord(1,kBwd)) return kFALSE;
//check on row number
cnt--;
row = (fWord >> kbit22) & 0x1f;
return kTRUE;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-UInt_t AliHMPIDRawStream::GetWord(Int_t n,EDirection dir)
+Bool_t AliHMPIDRawStream::GetWord(Int_t n,EDirection dir)
{
// This method returns the n-th 32 bit word
// inside the raw data payload.
// The method is supposed to be endian (platform)
// independent.
- if (!fData || fPosition < 0) AliFatal("Raw data payload buffer is not yet initialized !");
-
- UInt_t word = 0;
+ fWord = 0;
+ if (!fData || fPosition < 0) AliFatal("Raw data payload buffer is not yet initialized !");
+
if(dir==kBwd) n = -n;
fPosition+=4*n-4;
+
+ if(fPosition==-4) return kTRUE;
+ if(fPosition<0 || fPosition > fRawReader->GetDataSize()) {
+ if(stDeb) Printf("fPosition out of boundaries %i",fPosition);
+ return kFALSE;
+ }
+
StorePosition();
- word |= fData[fPosition++];
- word |= fData[fPosition++] << 8;
- word |= fData[fPosition++] << 16;
- word |= fData[fPosition++] << 24;
+ fWord |= fData[fPosition++];
+ fWord |= fData[fPosition++] << 8;
+ fWord |= fData[fPosition++] << 16;
+ fWord |= fData[fPosition++] << 24;
- return word;
+ return kTRUE;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDRawStream::DumpData(Int_t nw)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDRawStream::StorePosition()
{
+// Printf("@@@@@@@@@ fPos: %x fPosition: %d",fPos,fPosition);
if(fPos[fPosition]!=0) {
// Printf("Position already stored!!! Value %i at address %i",fPos[fPosition],fPosition);
return;
}
- iPos++;
- fPos[fPosition] = iPos;
+ fiPos++;
+ fPos[fPosition] = fiPos;
// if(stDeb)Printf("%i - Actual position %i",iPos,fPosition);
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void DelVars();
Int_t GetDDLNumber() const { return fDDLNumber; } // Provide current DDL number
- static inline Int_t GetPad(Int_t ddl,Int_t row,Int_t dil,Int_t pad); //
- Int_t GetNPads() const { return fNPads;}
+ static inline Int_t GetPad(Int_t ddl,Int_t row,Int_t dil,Int_t pad); //
+ static inline Int_t GetNDDL() { return kNDDL;} //return the number of max # of DDLs
+ static inline Int_t GetNErrors() { return kSumErr;} //return the number of max # of Error Types
+
+ Int_t GetNPads() const { return fNPads;}
Int_t* GetPadArray() const { return fPad;}
Int_t* GetChargeArray() const { return fCharge;}
Int_t Pc ( Int_t ddl,Int_t row,Int_t dil,Int_t pad ) {return AliHMPIDParam::A2P(GetPad(ddl,row,dil,pad));} //PC position number
Int_t PadPcX ( Int_t ddl,Int_t row,Int_t dil,Int_t pad ) {return AliHMPIDParam::A2X(GetPad(ddl,row,dil,pad));} //pad pc x # 0..79
Int_t PadPcY ( Int_t ddl,Int_t row,Int_t dil,Int_t pad ) {return AliHMPIDParam::A2Y(GetPad(ddl,row,dil,pad));} //pad pc y # 0..47
-
- inline Bool_t SetZeroSup (Bool_t isSup);
+
+ static inline Char_t* GetErrName(Int_t eType);
+ inline Bool_t SetZeroSup (Bool_t isSup);
inline Bool_t GetZeroSup();
inline Int_t GetErrors(Int_t ddl,Int_t eType); //Get errors and occurance
-
+ inline Int_t GetDDLNumber() { return fDDLNumber;} //return the number of DDL actually being decoded
+ inline UInt_t GetLDCNumber() { return fLDCNumber;} //return the number of LDC actually being decoded
+ inline UInt_t GetTimeStamp() { return fTimeStamp;} //return the time stamp of the event actually being decoded
+
+
+
Bool_t ReadHMPIDRawData(); // Read HMPID Raw data
Bool_t ReadSegment(Int_t &cntSegment); // Read Segment
Bool_t ReadRow(Int_t &cntRow); // Read Row
kbit17,kbit18,kbit19,kbit20,kbit21,kbit22,kbit23,kbit24,
kbit25,kbit26,kbit27,kbit28,kbit29,kbit30,kbit31,kbit32};
- enum EHMPIDRawStreamError {
- kRawDataSizeErr = 1,
- kRowMarkerErr = 2,
- kWrongRowErr = 3,
- kWrongDilogicErr = 4,
- kWrongPadErr = 5,
- kEoEFlagErr = 6,
- kEoESizeErr = 7,
- kEoEDILOGICErr = 8,
- kEoERowErr = 9,
- kBadSegWordErr = 10,
- kWrongSegErr = 11,
- kRowMarkerSizeErr = 12,
- kSumErr = 13 //This is always the last one, to retreive the number of errors
- };
-
- enum {
+ enum EHMPIDRawStreamError { kRawDataSizeErr = 0, kRowMarkerErr = 1, kWrongRowErr = 2, kWrongDilogicErr = 3,
+ kWrongPadErr = 4, kEoEFlagErr = 5, kEoESizeErr = 6, kEoEDILOGICErr = 7,
+ kEoERowErr = 8, kBadSegWordErr = 9, kWrongSegErr = 10, kRowMarkerSizeErr = 11,
+ kSumErr = 12 //This is always the last one, to retreive the number of errors
+ }; //Always check the updated list of names in the .cxx file for print-out!
+
+ enum {
kNRows = 24, // Number of rows (starting from 1 !)//was25
kNDILOGICAdd = 10, // Number of DILOGIC addresses in a row (starting from 1 !) //was11
kNPadAdd = 48, // Number of pad row
kNRowsPerSegment = 8, // Number of rows per segment
kNDDL = 14
};
- enum EHMPIDRawError {
+ enum EHMPIDRawError {
kInvalidRawDataWord = 1
};
AliHMPIDRawStream& operator = (const AliHMPIDRawStream& stream);
AliHMPIDRawStream(const AliHMPIDRawStream& stream);
- UInt_t GetWord(Int_t n=1,EDirection dir=kFwd); // Get n-th word
+ Bool_t GetWord(Int_t n=1,EDirection dir=kFwd); // Get n-th word
UInt_t GetNextWord(); // Get next word
Int_t fNPads; // counter of pads in one DDL
Int_t *fCharge; // Array for charge values for all channels in one DDL
Int_t *fPad; // Array for abs pad values for all channels in one DDL
Int_t fDDLNumber; // index of current DDL number
+ UInt_t fLDCNumber; // index of current LDC number
+ UInt_t fTimeStamp; // TimeStamp
AliRawReader *fRawReader; // object for reading the raw data
UChar_t *fData; // raw data
Int_t **fNumOfErr; // Store the numner of errors for a given error type and a given DDL
UInt_t fWord; // current position in fData
Bool_t fZeroSup; // set if zero suppression is applied
Int_t *fPos; // for debug purposes
- Int_t iPos; // counter for debug
+ Int_t fiPos; // counter for debug
ClassDef(AliHMPIDRawStream, 2) // base class for reading HMPID raw digits
};
AliHMPIDDigit *pDig=(AliHMPIDDigit*)pDigCh->At(isDigThere[iddl][row][dil][pad]);
pDig->Raw(w32,ddl,r,d,a);
if(pDig->Q() < 0 ) continue; //We can turn of the zero sup for pedestal simulation
- //Printf("::::::::::::::: ddl from Digit : %d",ddl);
- if(ddl%2){ //write raw digit selecting on DDL
+ if(ddl%2){ //write raw digit selecting on DDL
ddlL->WriteBuffer((char*)&w32,sizeof(w32)); cntL++; cntLpad++; cntLrow++; cntLdig++; cntwInLseg++;//Printf(" WL: %x isDig: %d",w32,isDigThere[iddl][row][dil][pad]);
}else{
ddlR->WriteBuffer((char*)&w32,sizeof(w32)); cntR++; cntRpad++; cntRrow++; cntRdig++;cntwInRseg++;//Printf(" WR: %x isDig: %d",w32,isDigThere[iddl][row][dil][pad]);
{
// Return the number of errors for a given error tye during raw data reading
// Arguments: errorType
-// Returns: error or -999 if error Type does not exist
+// Returns: error or -999 if error Type does not exist
- if(eType < 1 || eType> kSumErr-1 ) return -999;
- else if( ddl < 0 || ddl > kNDDL-1 ) return -999;
- else if (!fNumOfErr) return -999;
+ if(eType < 0 || eType> kSumErr || ddl < 0 || ddl > kNDDL-1 ) return -999;
else return fNumOfErr[ddl][eType];
} //GetErrors()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
+Char_t* AliHMPIDRawStream::GetErrName(Int_t eType)
+{
+ // Return the name of the error for a given error tye during raw data reading
+ // Arguments: errorType
+ // Returns: error or -999 if error Type does not exist
+ Char_t *eName[]={ "kRawDataSizeErr", "kRowMarkerErr" , "kWrongRowErr" , "kWrongDilogicErr",
+ "kWrongPadErr" , "kEoEFlagErr" , "kEoESizeErr" , "kEoEDILOGICErr",
+ "kEoERowErr" , "kBadSegWordErr", "kWrongSegErr" , "kRowMarkerSizeErr",
+ "kSumErr" };
+ Char_t *eNoErr="NotDefinedErrorType";
+ if(eType<0 || eType>kSumErr) return eNoErr;
+ else return eName[eType];
+}//GetErrName()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+
#endif
Run Type: PEDESTAL -- but we select on the PHYSICS_EVENTS in th HMPIDda.cxx
DA Type: LDC
Number of events needed: 1000 events
-Input Files: Raw pedestal file, no external config file
+Input Files: Raw pedestal file, EXTERNAL config file: HmpidSigmaCut.txt on both HMPID LDCs
Output Files: 14 txt files including pedestal values
Trigger types used: PEDESTAL RUN (selecting on PHYSICS_EVENT)
#include "AliHMPIDCalib.h"
#include "AliRawReaderDate.h"
#include "AliBitPacking.h"
-#include "TMath.h"
//ROOT
#include "TFile.h"
-#include "TSystem.h"
-#include "TKey.h"
-#include "TH2S.h"
+#include "TROOT.h"
#include "TObject.h"
-#include "TBenchmark.h"
-#include "TMath.h"
-#include "TRandom.h"
int main(int argc, char **argv){
/* log start of process */
printf("HMPID DA program started\n");
-
+/*
+ gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
+ "*",
+ "TStreamerInfo",
+ "RIO",
+ "TStreamerInfo()");
+ */
/* check that we got some arguments = list of files */
if (argc<2) {
printf("Wrong number of arguments\n");
/* init the pedestal calculation */
AliHMPIDCalib *pCal=new AliHMPIDCalib();
+ /* Set the number of sigma cuts inside the file HmpidSigmaCut.txt on BOTH LDCs! */
+ /* If the file is NOT present then the default cut 3 will be used!*/
+ pCal->SetSigCutFromFile("HmpidSigmaCut.txt");
+ /* ONLY set this option to kTRUE if you want to create the ADC dsitributions for all 161280 pads!!!!*/
+ /* kTRUE is not suggested for production mode b/c of the memory consumption! */
+ pCal->SetWriteHistoPads(kFALSE);
/* init event counter */
Int_t iEvtNcal=0;
ULong_t runNum=0;
-
+ ULong_t ldcId=0;
+
int n;
for (n=1;n<argc;n++) {
if (eventT==PHYSICS_EVENT) { //we use PHYSICS_EVENT for pedestal not CALIBRATION_EVENT
runNum=(unsigned long)event->eventRunNb; //assuming that only one run is processed at a time
-
- iEvtNcal++;
+ ldcId=(unsigned long)event->eventLdcId;
+ if(iEvtNcal==0 && pCal->GetWritePads()==kTRUE) pCal->InitFile((Int_t)ldcId);
+ iEvtNcal++;
AliRawReader *reader = new AliRawReaderDate((void*)event);
AliHMPIDRawStream stream(reader);
-
while(stream.Next())
{
for(Int_t iPad=0;iPad<stream.GetNPads();iPad++) {
pCal->FillPedestal(stream.GetPadArray()[iPad],stream.GetChargeArray()[iPad]);
- }
-
- for(Int_t iddl=0;iddl<AliHMPIDRawStream::kNDDL;iddl++){
- for(Int_t ierr=0; ierr < AliHMPIDRawStream::kSumErr; ierr++) {
- pCal->FillErrors(iddl,ierr,stream.GetErrors(iddl,ierr));
+ } //pads
+ }//while
+ for(Int_t iddl=0;iddl<stream.GetNDDL();iddl++){
+ for(Int_t ierr=0; ierr < stream.GetNErrors(); ierr++) {
+ pCal->FillErrors(iddl,ierr,stream.GetErrors(iddl,ierr));
}
- }
+ }//err
- }//Next()
+ pCal->SetRunParams(runNum,stream.GetTimeStamp(),stream.GetLDCNumber()); //Get the last TimeStam read and the LDC ID
stream.Delete();
-
}// if CALIBRATION_EVENT
/* exit when last event received, no need to wait for TERM signal */
}//arg
/* write report */
- printf("HMPID DA processed RUN #%s, with %d calibration events\n",getenv("DATE_RUN_NUMBER"),iEvtNcal);
+ printf("HMPID DA processed RUN #%s on LDC#%d, with %d calibration events\n",getenv("DATE_RUN_NUMBER"),ldcId,iEvtNcal);
if (!iEvtNcal) {
printf("No calibration events have been read. Exiting\n");
/* report progress */
daqDA_progressReport(90);
-
-
- for(Int_t nDDL=0; nDDL < AliHMPIDCalib::kNDDL; nDDL++) {
+
+ for(Int_t nDDL=0; nDDL < AliHMPIDRawStream::kNDDL; nDDL++) {
/* Calculate pedestal for the given ddl, if there is no ddl go t next */
- if(!pCal->CalcPedestal(runNum,nDDL,Form("./HmpidPedDdl%02i.txt",nDDL),iEvtNcal)) continue;
- if(!pCal->WriteErrors(runNum,nDDL,Form("./HmpidErrorsDdl%02i.txt",nDDL),iEvtNcal)) continue;
+ if(!pCal->CalcPedestal(nDDL,Form("./HmpidPedDdl%02i.txt",nDDL),iEvtNcal)) continue;
+ if(!pCal->WriteErrors(nDDL,Form("./HmpidErrorsDdl%02i.txt",nDDL),iEvtNcal)) continue;
/* store the result file on FES */
- /*
- status=daqDA_FES_storeFile(Form("./HmpidPedDdl%02i.txt",nDDL),Form("HMPID_DA_Pedestals_ddl=%02i",nDDL));
- if (status) {
- printf("Failed to export file : %d\n",status);
- return -1;
- }
- */
+
status=daqDA_FES_storeFile(Form("./HmpidPedDdl%02i.txt",nDDL),Form("HMPID_DA_Pedestals_ddl=%02i",nDDL));
if (status) { printf("Failed to export file : %d\n",status); }
status=daqDA_FES_storeFile(Form("./HmpidErrorsDdl%02i.txt",nDDL),Form("HMPID_DA_Errors_ddl=%02i",nDDL));
if (status) { printf("Failed to export file : %d\n",status); }
}//nDDL
- delete pCal;
+
+ if(pCal->GetWritePads()==kTRUE) {
+ pCal->CloseFile((Int_t)ldcId);
+ status=daqDA_FES_storeFile(Form("HmpidPadsOnLdc%2d.root",ldcId),Form("HMPID_PADS_ON_LDC=%2d",ldcId));
+ }
+
+ delete pCal;
if (status) return -1;
/* report progress */
daqDA_progressReport(100);
-
+
return status;
}