/*
-- "Contact:" - henrik.tydesjo@cern.ch
-- "Link:" -
-- "Run Type:" - PHYSICS
-- "DA Type:" - MON
-- "Number of events needed:"
-- "Input Files:" - daq db config files: spd_physics_params , previous dead ref: ./calibResults/DeadReferenceTmp/* , previous dead lists: ./calibResults/DeadToFXS/*
-- "Output Files:" - Ref Data: ./calibResults/NoisyReference/* , Ref Data: ./calibResults/DeadReference/* , noisy lists: ./calibResults/NoisyToFXS/* , persistent files: ./calibResults/DeadReferenceTmp/*,./calibResults/DeadToFXS/*
-- "Trigger types used:" PHYSICS
+Contact: henrik.tydesjo@cern.ch
+Link: tydes.home.cern.ch/tydes/doc/CalibrationOverview/CalibrationAlgorithms/
+Run Type: PHYSICS
+DA Type: MON
+Number of events needed: Depending on muliplicity per event
+Input Files: spd_physics_params , ./calibResults/DeadReferenceTmp/* , ./calibResults/DeadToFXS/*
+Output Files: ./calibResults/NoisyReference/* , ./calibResults/DeadReference/* , ./calibResults/NoisyToFXS/* , ./calibResults/DeadReferenceTmp/*,./calibResults/DeadToFXS/*
+Trigger types used: PHYSICS
*/
////////////////////////////////////////////////////////////////////////////////
// //
////////////////////////////////////////////////////////////////////////////////
+#ifndef SPD_DA_OFF
extern "C" {
#include "daqDA.h"
}
+#endif
#include "event.h"
#include "monitor.h"
#include "AliRawReaderDate.h"
// ********* STEP 1: Produce phys container files (Reference Data). ***********************************
#ifndef SPD_DA_OFF
+ if (getenv("DATE_RUN_NUMBER")==0) {
+ printf("DATE_RUN_NUMBER not properly set.\n");
+ return -1;
+ }
int runNr = atoi(getenv("DATE_RUN_NUMBER"));
#else
int runNr = atoi(argv[1]);
// }
//***
+ printf("Opening id list file\n");
TString idsFXSFileName = Form("%s/FXSids_run_%d.txt",saveDirIdsToFXS,runNr);
ofstream idsFXSfile;
idsFXSfile.open(idsFXSFileName.Data());
+ printf("Preparing dead reference data\n");
// send reference data for dead pixels to FXS
TString tarFiles = "";
for (UInt_t eqId=0; eqId<20; eqId++) {
if (eqActiveDead[eqId]) {
+ printf("Preparing dead pixels for eq %d\n",eqId);
// move file to ref dir
TString fileName = Form("%s/SPDphys_dead_run_0_0_eq_%d.root",saveDirDeadRefTmp,eqId);
TString newFileName = Form("%s/SPDphys_dead_run_%d_%d_eq_%d.root",saveDirDeadRef,firstRunNrDead,runNr,eqId);
}
+ printf("Preparing noisy reference data\n");
// send reference data for this run to FXS
TString tarFiles = "";
for (UInt_t eqId=0; eqId<20; eqId++) {
//#endif
+
+
+ printf("Preparing dead files\n");
// send dead pixels to FXS
// if (nrDeadFilesToTar>0) { //*** old code (used if not all dead data should be uploaded)
// send a tared file of all the dead files
// send noisy pixels to FXS
if (handler->GetNrNoisy()>0) { // there must be at least one file created
+ printf("Preparing noisy files\n");
// send a tared file of all the noisy files
TString command = Form("cd %s; tar -cf noisy_phys.tar *",saveDirNoisyToFXS);
// printf("\n\n%s\n\n",command.Data());
#ifndef SPD_DA_OFF
status = daqDA_FES_storeFile(idsFXSFileName.Data(),id.Data());
if (status!=0) {
- printf("Failed to export file %s , status %d\n",fileName.Data(),status);
+ printf("Failed to export file %s , status %d\n",idsFXSFileName.Data(),status);
return -1;
}
#endif
return 0;
-}
+}
\ No newline at end of file