From f4333ce5e5e01cc2ef0ea0ce9e7f276a0e36aed8 Mon Sep 17 00:00:00 2001 From: policheh Date: Wed, 8 Jul 2009 12:56:50 +0000 Subject: [PATCH] ZS parameters taking from the file in the DA working directory. --- PHOS/PHOSLEDda.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PHOS/PHOSLEDda.cxx b/PHOS/PHOSLEDda.cxx index 1a6bd30851c..e453d41151b 100644 --- a/PHOS/PHOSLEDda.cxx +++ b/PHOS/PHOSLEDda.cxx @@ -51,6 +51,17 @@ int main(int argc, char **argv) { return -1; } + /* Retrieve ZS parameters from DAQ DB */ + const char* zsfile = "zs.txt"; + int failZS = daqDA_DB_getFile(zsfile, zsfile); + + Int_t offset,threshold; + + if(!failZS) { + FILE *f = fopen(zsfile,"r"); + int scan = fscanf(f,"%d %d",&offset,&threshold); + } + /* Retrieve mapping files from DAQ DB */ const char* mapFiles[4] = {"RCU0.data","RCU1.data","RCU2.data","RCU3.data"}; @@ -156,6 +167,12 @@ int main(int argc, char **argv) { AliCaloRawStreamV3 stream(rawReader,"PHOS",mapping); AliPHOSRawFitterv0 fitter; fitter.SubtractPedestals(kTRUE); // assume that data is non-ZS + + if(!failZS) { + fitter.SubtractPedestals(kFALSE); + fitter.SetAmpOffset(offset); + fitter.SetAmpThreshold(threshold); + } while (stream.NextDDL()) { while (stream.NextChannel()) { -- 2.39.3