2 - Contact: - henrik.tydesjo@cern.ch
3 - Link: - http://tydes.home.cern.ch/tydes/doc/CalibrationOverview/CalibrationAlgorithms/
4 - Run Type: - DAQ_MIN_TH_SCAN,DAQ_MEAN_TH_SCAN,DAQ_UNIFORMITY_SCAN,DAQ_NOISY_PIX_SCAN,DAQ_PIX_DELAY_SCAN,DAQ_FO_UNIF_SCAN
6 - Number of events needed:
7 - Input Files: - daq db config files: spd_standal_params,spd_perm_noisy , previous noisy lists: ./calibResults/ScanNoisy/* , raw data
8 - Output Files: - Ref Data: ./calibResults/ScanReference/* , DCS update: ./calibResults/ScanDCSconfigToFXS/* , OCDB update: ./calibResults/ScanNoisyToFXS/* , persistent files: ./calibResults/ScanNoisy/*
12 ////////////////////////////////////////////////////////////////////////////////
13 // This program can be compiled in two modes. //
15 // 1. With the DAQ DA framework on. This is the default operating mode. //
16 // Call this program with the name of the executable followed by the //
17 // data files to process. //
19 // 2. Without the DAQ DA framework on. Define the SPD_DA_OFF environment var. //
20 // Call this program with the name of the executable followed by the //
21 // runNr and the data files to process. //
23 ////////////////////////////////////////////////////////////////////////////////
30 #include "AliRawReaderDate.h"
31 #include "AliITSRawStreamSPD.h"
32 #include "AliITSOnlineSPDscan.h"
33 #include "AliITSOnlineSPDscanSingle.h"
34 #include "AliITSOnlineSPDscanMultiple.h"
35 #include "AliITSOnlineSPDscanMeanTh.h"
36 #include "AliITSOnlineSPDscanAnalyzer.h"
37 #include "AliITSOnlineCalibrationSPDhandler.h"
42 #include <TPluginManager.h>
43 #include <TObjArray.h>
46 int main(int argc, char **argv) {
48 printf("Wrong number of arguments\n");
52 // directory structure, hard coded
53 char *saveDirNoisy = "./calibResults/ScanNoisy"; // may NOT delete content
54 char *saveDirNoisyToFXS = "./calibResults/ScanNoisyToFXS"; // may delete content
55 char *saveDirDCSconfigToFXS= "./calibResults/ScanDCSconfigToFXS"; // may delete content
56 char *saveDirRef = "./calibResults/ScanReference"; // may delete content
57 char *saveDirIdsToFXS = "./calibResults/IdsToFXS"; // may delete content
58 char *configFilesDir = "./configFiles"; // may delete content
60 // make sure the directory structure is correct:
61 system("mkdir ./calibResults >& /dev/null");
62 system("mkdir ./calibResults/ScanNoisy >& /dev/null");
63 system("mkdir ./calibResults/ScanNoisyToFXS >& /dev/null");
64 system("mkdir ./calibResults/ScanDCSconfigToFXS >& /dev/null");
65 system("mkdir ./calibResults/ScanReference >& /dev/null");
66 system("mkdir ./calibResults/IdsToFXS >& /dev/null");
67 system("mkdir ./configFiles >& /dev/null");
68 // prameters config files
69 TString paramsFileName = Form("%s/standal_params.txt",configFilesDir);
70 TString permNoisyFileName = Form("%s/perm_noisy.txt",configFilesDir);
72 // This line is needed in case of a stand-alone application w/o
73 // $ROOTSYS/etc/system.rootrc file
74 gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
80 // turn off annoying warning messages
82 AliLog::Instance()->SetGlobalDebugLevel(-20);
85 enum calib_types{MINTH,MEANTH,DAC,UNIMA,NOISE,DELAY};
88 // ********* STEP 0: Get configuration files from db (if there are any) , then read parameters*********
89 UInt_t nrTuningParams = 0;
90 TObjArray paramNames; paramNames.SetOwner(kTRUE);
91 TObjArray paramVals; paramVals.SetOwner(kTRUE);
96 TString idp = "spd_standal_params";
97 status=daqDA_DB_getFile(idp.Data(),paramsFileName.Data());
99 printf("Failed to get config file %s: status=%d. Using default tuning parameters.\n",idp.Data(),status);
104 paramsFile.open(paramsFileName.Data(), ifstream::in);
105 if (paramsFile.fail()) {
106 printf("No config file (%s) present. Using default tuning parameters.\n",paramsFileName.Data());
112 paramsFile >> paramN;
113 if (paramsFile.eof()) break;
114 paramsFile >> paramV;
115 TString* paramNS = new TString(paramN);
116 TString* paramVS = new TString(paramV);
117 paramNames.AddAtAndExpand((TObject*)paramNS,nrTuningParams);
118 paramVals.AddAtAndExpand((TObject*)paramVS,nrTuningParams);
120 if (paramsFile.eof()) break;
125 // for (UInt_t i=0; i<nrTuningParams; i++) {
126 // printf("Entry %d: N=%s , V=%s\n",i,((TString*)paramNames.At(i))->Data(),((TString*)paramVals.At(i))->Data());
130 Int_t permstatus = 0;
132 TString idn = "spd_perm_noisy";
133 permstatus=daqDA_DB_getFile(idn.Data(),permNoisyFileName.Data());
135 printf("Failed to get config file %s: status=%d. No permanently noisy pixels will be added.\n",idn.Data(),permstatus);
142 // ********* STEP 1: Produce scan container files (Reference Data). ***********************************
146 int runNr = atoi(getenv("DATE_RUN_NUMBER"));
148 int runNr = atoi(argv[1]);
153 AliITSOnlineSPDscan *scanObj[20];
154 Bool_t bScanInit[20];
155 for (UInt_t eqId=0; eqId<20; eqId++) {
157 bScanInit[eqId]=kFALSE;
159 // header data variables
161 Bool_t halfStaveScanned[20][6];
163 Bool_t dataFormat[20];
165 Bool_t chipPresent[20][6][10];
174 UInt_t dacHigh[20][6];
175 UInt_t dacLow[20][6];
177 Bool_t minTHchipPresent[20][10];
178 // current scan step flag
179 Int_t currentStep[20];
180 for (UInt_t eqId=0; eqId<20; eqId++) currentStep[eqId] = 9999;
182 // loop over run segments
183 for (int segNr=startSeg; segNr<argc; segNr++) {
187 /* define data source : this is argument 1 */
188 status=monitorSetDataSource( argv[segNr] );
190 printf("monitorSetDataSource() failed : %s\n",monitorDecodeError(status));
193 /* declare monitoring program */
194 status=monitorDeclareMp("ITS_SPD_CAL");
196 printf("monitorDeclareMp() failed : %s\n",monitorDecodeError(status));
199 /* define wait event timeout - 1s max */
201 monitorSetNoWaitNetworkTimeout(1000);
206 /* main loop (infinite) */
209 struct eventHeaderStruct *event;
210 eventTypeType eventT;
212 /* check shutdown condition */
214 if (daqDA_checkShutdown()) {break;}
216 /* get next event (blocking call until timeout) */
217 status=monitorGetEventDynamic((void **)&event);
218 if (status==MON_ERR_EOF) {
219 printf ("End of File detected\n");
220 break; /* end of monitoring file has been reached */
223 printf("monitorGetEventDynamic() failed : %s\n",monitorDecodeError(status));
226 /* retry if got no event */
231 eventT=event->eventType;
232 if (eventT == PHYSICS_EVENT) {
235 // printf("eventNr %d\n",eventNr);
237 AliRawReader *reader = new AliRawReaderDate((void*)event);
238 AliITSRawStreamSPD *str = new AliITSRawStreamSPD(reader);
240 for (UInt_t eqId=0; eqId<20; eqId++) {
243 reader->Select("ITSSPD",eqId,eqId);
245 // Hit Event flags, specific for one event
246 Bool_t hitEventHSIncremented[6];
247 Bool_t hitEventChipIncremented[6][10];
248 for (UInt_t hs=0; hs<6; hs++) {
249 hitEventHSIncremented[hs] = kFALSE;
250 for (UInt_t chip=0; chip<10; chip++) {
251 hitEventChipIncremented[hs][chip] = kFALSE;
255 if (str->ReadCalibHeader()) {
256 // first check the type:
257 if (bScanInit[eqId] && type[eqId]!=str->GetHtype()) {
258 printf("Calib header problem. Type changed (%d -> %d)!\n",type[eqId],str->GetHtype());
262 routerNr[eqId] = str->GetHrouterNr();
263 type[eqId] = str->GetHtype();
264 dataFormat[eqId] = str->GetHdataFormat();
265 triggers[eqId] = str->GetHtriggers();
266 dacStart[eqId] = str->GetHdacStart();
267 dacEnd[eqId] = str->GetHdacEnd();
268 dacStep[eqId] = str->GetHdacStep();
269 dacId[eqId] = str->GetHdacId();
270 rowStart[eqId] = str->GetHrowStart();
271 rowEnd[eqId] = str->GetHrowEnd();
272 rowValue[eqId] = str->GetHrowValue();
273 dacValue[eqId] = str->GetHdacValue();
274 for (UInt_t hs=0; hs<6; hs++) {
275 halfStaveScanned[eqId][hs] = str->GetHhalfStaveScanned(hs);
276 dacHigh[eqId][hs] = str->GetHdacHigh(hs);
277 dacLow[eqId][hs] = str->GetHdacLow(hs);
278 TPAmp[eqId][hs] = str->GetHTPAmp(hs);
279 for (UInt_t chip=0; chip<10; chip++) {
280 chipPresent[eqId][hs][chip] = str->GetHchipPresent(hs,chip);
283 for (UInt_t chip=0; chip<10; chip++) {
284 minTHchipPresent[eqId][chip] = str->GetHminTHchipPresent(chip);
287 currentStep[eqId] = (dacValue[eqId]-dacStart[eqId])/dacStep[eqId];
288 if (type[eqId]==DELAY) {
289 currentStep[eqId]=currentStep[eqId]*2;
290 dacValue[eqId]=dacValue[eqId]*2;
291 if (dacHigh[eqId][0]==128) { // misc_ctrl value
292 currentStep[eqId]=currentStep[eqId]+1;
293 dacValue[eqId]=dacValue[eqId]+1;
298 if (routerNr[eqId]!=eqId) {
299 printf("Router nr problem? Router nr %d != EqID %d\n",routerNr[eqId],eqId);
302 if (!bScanInit[eqId]) {
303 // initialize container object
304 TString fileName = Form("%s/SPDcal_run_%d_eq_%d.root",saveDirRef,runNr,eqId);
305 switch (type[eqId]) {
308 scanObj[eqId] = new AliITSOnlineSPDscanSingle(fileName.Data());
309 ((AliITSOnlineSPDscanSingle*)scanObj[eqId])->ClearThis();
310 bScanInit[eqId]=kTRUE;
315 scanObj[eqId] = new AliITSOnlineSPDscanMultiple(fileName.Data());
316 scanObj[eqId]->ClearThis();
317 bScanInit[eqId]=kTRUE;
320 scanObj[eqId] = new AliITSOnlineSPDscanMeanTh(fileName.Data());
321 scanObj[eqId]->ClearThis();
322 bScanInit[eqId]=kTRUE;
325 printf("Unknown scan type: %d.\n",type[eqId]);
327 // some multiple scan data
328 if (type[eqId]==MINTH || type[eqId]==MEANTH || type[eqId]==DAC || type[eqId]==DELAY) {
329 ((AliITSOnlineSPDscanMultiple*)scanObj[eqId])->SetDacId(dacId[eqId]);
332 scanObj[eqId]->SetRunNr((UInt_t)runNr);
333 scanObj[eqId]->SetRouterNr(routerNr[eqId]);
334 for (UInt_t hs=0; hs<6; hs++) {
335 scanObj[eqId]->SetHalfStaveScanned(hs,halfStaveScanned[eqId][hs]);
337 scanObj[eqId]->SetType(type[eqId]);
338 scanObj[eqId]->SetDataFormat(dataFormat[eqId]);
339 for (Int_t hs=0; hs<6; hs++) {
341 // remove later when the chip present is set correctly !!!!!!!!!!!!!!!!!!!!!!!!!!!
342 Bool_t halfStavePresent = str->GetHalfStavePresent(hs);
343 // remove later when the chip present is set correctly !!!!!!!!!!!!!!!!!!!!!!!!!!!
345 for (UInt_t chip=0; chip<10; chip++) {
346 scanObj[eqId]->SetChipPresent(hs,chip,chipPresent[eqId][hs][chip]);
348 // remove later when the chip present is set correctly !!!!!!!!!!!!!!!!!!!!!!!!!!!
349 if (halfStavePresent) scanObj[eqId]->SetChipPresent(hs,chip,kTRUE);
350 // remove later when the chip present is set correctly !!!!!!!!!!!!!!!!!!!!!!!!!!!
354 scanObj[eqId]->SetRowStart(rowStart[eqId]);
355 scanObj[eqId]->SetRowEnd(rowEnd[eqId]);
356 scanObj[eqId]->SetDacStart(dacStart[eqId]);
357 scanObj[eqId]->SetDacEnd(dacEnd[eqId]);
358 scanObj[eqId]->SetDacStep(dacStep[eqId]);
361 if (type[eqId]==MINTH) {
362 scanObj[eqId]->SetTriggers(currentStep[eqId],triggers[eqId]);
364 if (type[eqId]==UNIMA || type[eqId]==NOISE) {
365 if (currentStep[eqId]==9999) printf("SPDcalibratorStep1 (eq %d): single step\n",eqId);
368 if (type[eqId]==MINTH || type[eqId]==MEANTH || type[eqId]==DAC || type[eqId]==DELAY) {
369 ((AliITSOnlineSPDscanMultiple*)scanObj[eqId])->SetDacValue(currentStep[eqId],dacValue[eqId]);
370 if (type[eqId]==DELAY) {
371 printf("SPDcalibratorStep1 (eq %d): DAC %d/%d , step %d\n",eqId,dacValue[eqId]/2,dacHigh[eqId][0],currentStep[eqId]);
374 printf("SPDcalibratorStep1 (eq %d): DAC %d , step %d\n",eqId,dacValue[eqId],currentStep[eqId]);
377 if (type[eqId]==MEANTH) {
378 for (Int_t hs=0; hs<6; hs++) {
379 ((AliITSOnlineSPDscanMeanTh*)scanObj[eqId])->SetDacLow(currentStep[eqId],hs,dacLow[eqId][hs]);
380 ((AliITSOnlineSPDscanMeanTh*)scanObj[eqId])->SetDacHigh(currentStep[eqId],hs,dacHigh[eqId][hs]);
381 ((AliITSOnlineSPDscanMeanTh*)scanObj[eqId])->SetTPAmp(currentStep[eqId],hs,TPAmp[eqId][hs]);
388 if (bScanInit[eqId]) {
389 while (str->Next()) {
390 UInt_t hs = str->GetHalfStaveNr();
391 UInt_t chip = str->GetChipAddr();
392 //***remove last condition when minthpresent put correctly in calib header?
394 if (type[eqId]!=MINTH || minTHchipPresent[eqId][chip] || runNr<=416900) {
396 if (type[eqId]!=MINTH || minTHchipPresent[eqId][chip] || runNr<=416900) {
398 //*************************************************************************
399 scanObj[eqId]->IncrementHits(currentStep[eqId],hs,chip,str->GetChipCol(),str->GetChipRow());
401 if (!hitEventHSIncremented[hs]) {
402 scanObj[eqId]->IncrementHitEventsTot(currentStep[eqId],hs);
403 hitEventHSIncremented[hs]=kTRUE;
406 if (!hitEventChipIncremented[hs][chip]) {
407 scanObj[eqId]->IncrementHitEvents(currentStep[eqId],hs,chip);
408 hitEventChipIncremented[hs][chip]=kTRUE;
414 if (type[eqId]!=MINTH) { // for minth, triggers are set from header info
415 scanObj[eqId]->IncrementTriggers(currentStep[eqId]);
433 daqDA_progressReport((unsigned int)( ((Float_t)(segNr-startSeg+1))/(argc-startSeg)*50 ));
435 printf("progress: %d\n",(unsigned int)( ((Float_t)(segNr-startSeg+1))/(argc-startSeg)*50 ));
441 // clean up scan objects (which also saves them)
442 for (UInt_t eqId=0; eqId<20; eqId++) {
443 if (scanObj[eqId]!=NULL) delete scanObj[eqId];
450 // ********* STEP 2: Analyze scan container files. ************************************************
452 // clear noisyToFXS and DCSconfigToFXS dirs:
453 TString command = Form("cd %s; rm -f *",saveDirNoisyToFXS);
454 system(command.Data());
455 TString command2 = Form("cd %s; rm -f *",saveDirDCSconfigToFXS);
456 system(command2.Data());
457 UInt_t nrNoisyFilesProduced=0;
458 UInt_t nrDCSconfigFilesProduced=0;
460 AliITSOnlineCalibrationSPDhandler* handler = new AliITSOnlineCalibrationSPDhandler();
461 AliITSOnlineSPDscanAnalyzer *analyzer = NULL;
462 AliITSOnlineCalibrationSPDhandler* handlerPermNoisy = NULL;
463 // fill permanent noisy list to add later...
465 handlerPermNoisy = new AliITSOnlineCalibrationSPDhandler();
466 UInt_t permNoisy = handlerPermNoisy->ReadNoisyFromText(permNoisyFileName.Data(),240); // 240 = read for all modules
468 printf("%d noisy pixels read from permanent list.\n",permNoisy);
472 Bool_t reset_made = kFALSE;
474 // *** *** *** start loop over equipments (eq_id)
475 for (int eqId=0; eqId<20; eqId++) {
477 // create analyzer for this eq
478 TString fileName = Form("%s/SPDcal_run_%d_eq_%d.root",saveDirRef,runNr,eqId);
479 analyzer = new AliITSOnlineSPDscanAnalyzer(fileName.Data(),handler);
481 // configure analyzer with tuning parameters etc:
482 for (UInt_t i=0; i<nrTuningParams; i++) {
483 analyzer->SetParam(((TString*)paramNames.At(i))->Data(),((TString*)paramVals.At(i))->Data());
486 UInt_t type = analyzer->GetType();
487 UInt_t dacId = analyzer->GetDacId();
488 UInt_t routerNr = analyzer->GetRouterNr();
491 printf("SPD scan calibrator Step2: eqId %d, type %d, dacId %d\n",eqId,type,dacId);
493 else printf("SPD scan calibrator Step2: eqId %d type %d\n",eqId,type);
498 // algorithms for the different types of scans:
504 else if (type==NOISE) {
505 // read previous noisy list (clear if overwriting)
506 handler->SetFileLocation(saveDirNoisy);
507 if (analyzer->IsOverWriteSet() && !reset_made) {
508 handler->ResetNoisy();
509 handler->WriteToFilesAlways();
513 handler->ReadFromFiles();
515 if (analyzer->ProcessNoisyPixels(/*saveDirNoisy*/)) {
517 handler->AddNoisyFrom(handlerPermNoisy);
519 // init dcs config text file
520 TString dcsConfigFileName = Form("%s/dcsConfig_run_%d_eq_%d.txt",saveDirDCSconfigToFXS,runNr,eqId);
522 dcsfile.open(dcsConfigFileName.Data());
523 dcsfile << "[SPD SCAN]\n";
524 dcsfile << "RunNumber=" << runNr << "\n";
525 dcsfile << "Type=" << type << "\n";
526 dcsfile << "Router=" << routerNr << "\n";
527 dcsfile << "ActualDetConfiguration=" << "0,-1,-1\n"; // dummy values for now
528 dcsfile << "[NOISY]\n";
529 nrDCSconfigFilesProduced++;
531 for (UInt_t hs=0; hs<6; hs++) {
532 for (UInt_t chip=0; chip<10; chip++) {
533 if (analyzer->IsChipPresent(hs,chip) || analyzer->IsOverWriteSet()) {
534 dcsfile << "-" << eqId << "," << hs << "," << chip << "\n";
535 UInt_t nrNoisy = handler->GetNrNoisyC(eqId,hs,chip);
536 for (UInt_t ind=0; ind<nrNoisy; ind++) {
537 UInt_t col = handler->GetNoisyColAtC(eqId,hs,chip,ind);
538 UInt_t row = handler->GetNoisyRowAtC(eqId,hs,chip,ind);
539 dcsfile << col << "," << row << "\n";
544 handler->SetFileLocation(saveDirNoisy);
545 handler->WriteNoisyToFile(eqId);
546 handler->SetFileLocation(saveDirNoisyToFXS);
547 handler->WriteNoisyToFile(eqId);
548 nrNoisyFilesProduced++;
554 else if (type==MINTH || (type==DAC && dacId==39)) {
555 // init dcs config text file
556 TString dcsConfigFileName = Form("%s/dcsConfig_run_%d_eq_%d.txt",saveDirDCSconfigToFXS,runNr,eqId);
558 dcsfile.open(dcsConfigFileName.Data());
559 dcsfile << "[SPD SCAN]\n";
560 dcsfile << "RunNumber=" << runNr << "\n";
561 dcsfile << "Type=" << type << "\n";
562 dcsfile << "Router=" << routerNr << "\n";
563 dcsfile << "ActualDetConfiguration=" << "0,-1,-1\n"; // dummy values for now
564 dcsfile << "[DACvalues]\n";
565 nrDCSconfigFilesProduced++;
566 for (UInt_t hs=0; hs<6; hs++) {
567 for (UInt_t chipNr=0; chipNr<10; chipNr++) {
569 if (analyzer->GetOnlineScan()->GetChipPresent(hs,chipNr)) {
570 minTh = analyzer->GetMinTh(hs,chipNr);
572 dcsfile << "39," << eqId << "," << hs << "," << chipNr << "=" << minTh << "\n";
575 printf("MinTh failed for Eq %d , HS %d , Chip %d\n",eqId,hs,chipNr);
583 else if (type==DELAY) {
584 // init dcs config text file
585 TString dcsConfigFileName = Form("%s/dcsConfig_run_%d_eq_%d.txt",saveDirDCSconfigToFXS,runNr,eqId);
587 dcsfile.open(dcsConfigFileName.Data());
588 dcsfile << "[SPD SCAN]\n";
589 dcsfile << "RunNumber=" << runNr << "\n";
590 dcsfile << "Type=" << type << "\n";
591 dcsfile << "Router=" << routerNr << "\n";
592 dcsfile << "ActualDetCoonfiguration=" << "0,-1,-1\n"; // dummy values for now
593 dcsfile << "[DACvalues]\n";
594 nrDCSconfigFilesProduced++;
595 for (UInt_t hs=0; hs<6; hs++) {
596 for (UInt_t chipNr=0; chipNr<10; chipNr++) {
597 Int_t clockCycle = -1;
598 Int_t delayCtrl = -1;
600 if (analyzer->GetOnlineScan()->GetChipPresent(hs,chipNr)) {
601 clockCycle = analyzer->GetDelay(hs,chipNr);
602 delayCtrl = clockCycle/2;
604 if (clockCycle!=-1) {
605 if (clockCycle%2==1) miscCtrl = 128;
606 dcsfile << "42," << eqId << "," << hs << "," << chipNr << "=" << delayCtrl << "\n";
607 dcsfile << "43," << eqId << "," << hs << "," << chipNr << "=" << miscCtrl << "\n";
610 printf("Delay failed for Eq %d , HS %d , Chip %d\n",eqId,hs,chipNr);
621 daqDA_progressReport((unsigned int)(50+(eqId+1)*2.5));
623 printf("progress: %d\n",(unsigned int)(50+(eqId+1)*2.5));
627 // *** *** *** end loop over equipments (eq_id)
631 if (handlerPermNoisy!=NULL) {
632 delete handlerPermNoisy;
636 TString idsFXSFileName = Form("%s/FXSids_run_%d.txt",saveDirIdsToFXS,runNr);
638 idsFXSfile.open(idsFXSFileName.Data());
642 // send noisy data to FXS
643 if (nrNoisyFilesProduced>0) {
644 // send a tared file of all new noisy maps
645 TString command = Form("cd %s; tar -cf noisy_scan.tar *",saveDirNoisyToFXS);
646 // printf("\n\n%s\n\n",command.Data());
647 system(command.Data());
648 TString fileName = Form("%s/noisy_scan.tar",saveDirNoisyToFXS);
649 TString id = "SPD_scan_noisy";
651 Int_t status = daqDA_FES_storeFile(fileName.Data(),id.Data());
653 printf("Failed to export file %s , status %d\n",fileName.Data(),status);
657 idsFXSfile << Form("%s\n",id.Data());
660 // send dcs config files to FXS
661 if (nrDCSconfigFilesProduced>0) {
662 // send a tared file of all the dcsConfig text files
663 TString command = Form("cd %s; tar -cf dcsConfig.tar *",saveDirDCSconfigToFXS);
664 // printf("\n\n%s\n\n",command.Data());
665 system(command.Data());
666 TString fileName = Form("%s/dcsConfig.tar",saveDirDCSconfigToFXS);
667 TString id = "SPD_dcsConfig";
669 Int_t status = daqDA_FES_storeFile(fileName.Data(),id.Data());
671 printf("Failed to export file %s , status %d\n",fileName.Data(),status);
675 //idsFXSfile << Form("%s\n",id.Data()); // do NOT write this id (this is not for preprocessor)
678 // send reference data to FXS
679 for (UInt_t eqId=0; eqId<20; eqId++) {
680 if (bScanInit[eqId]) {
681 TString fileName = Form("%s/SPDcal_run_%d_eq_%d.root",saveDirRef,runNr,eqId);
682 TString id = Form("SPD_ref_scan_%d",eqId);
684 Int_t status = daqDA_FES_storeFile(fileName.Data(),id.Data());
686 printf("Failed to export file %s , status %d\n",fileName.Data(),status);
690 idsFXSfile << Form("%s\n",id.Data());