1 /**************************************************************************
2 - "Contact": - Oleksandr Borysov, aborysov@ts.infnf.it
3 - "Link:" - link to test files: /afs/infn.it/ts/user/aborysov/public/C23_run387.000.raw
4 - "Run Type:" - run type (exactly as defined in the ECS)
6 - "Number of events needed:" at least 500
8 - "Input Files:" - config file: ssdpeddaconfig
10 data source: raw data file on LDC
12 - "Output Files:" - local names $DA_TEST_DIR/ssddaldc_<LDCID>_<RunID>.root
13 FXS name: ITSSSDda_<LDCID>_<RunID>.root,
14 local files are persistent over runs: data source
15 - "Trigger types used:"
16 **************************************************************************/
23 #include "AliITSHandleDaSSD.h"
28 int main( int argc, char** argv )
30 AliITSHandleDaSSD *ssddaldc;
31 TString feefname, cmddbsave;
33 Char_t *dafname = NULL, *dadaqdir = NULL;
35 /* check that we got some arguments = list of files */
37 printf("Wrong number of arguments\n");
41 char *datafilename = argv[1];
43 ssddaldc = new AliITSHandleDaSSD(datafilename);
44 if (ssddaldc->IsZombie()) return -1;
45 if (!ssddaldc->ProcessRawData())
47 cout << "Error !ssddaldc->ProcessRawData()" << endl;
51 daqDA_progressReport(90);
54 cout << "Error: the call system(NULL) in main() returned NULL!" << endl;
57 dadaqdir = getenv ("DA_TEST_DIR");
60 if (!(ssddaldc->SaveCalibrationSSDLDC(dafname)))
61 cout << "Error saving DA data to the file! Probably $DA_TEST_DIR defined incorrectly!" << endl;
62 else cout << "SSDDA data are saved in " << dafname << endl;
63 feefname = Form("%s/ssddaldc_%i_%i.root", dadaqdir, ssddaldc->GetLdcId(), ssddaldc->GetRunId());
64 cout << "Saving feessdda data in " << feefname << endl;
65 TFile *fileRun = new TFile (feefname.Data(),"RECREATE");
69 status = daqDA_FES_storeFile(dafname, "DASSD_DB_results");
70 if (status) printf("Failed to export file : %d\n",status);
72 if (getenv("DATE_DB_DIR")) {
73 cmddbsave = Form("$DATE_DB_DIR/daqDetDB_store ssddaldc.root %s", feefname.Data());
74 status = system(cmddbsave.Data());
75 if (status) printf("Failed to export file to the detector db: %d\n",status);
76 } else cout << "Error main(): $DATE_DB_DIR is not defined!" << endl;
78 else cout << "Error: DA_TEST_DIR is not defined, DA data are not saved!" << endl;
80 daqDA_progressReport(100);