RC12, RC17 violation: suppression
[u/mrichter/AliRoot.git] / ITS / TestPreprocessorSDD.C
CommitLineData
ad2585ed 1
2void TestPreprocessorSDD(Char_t *optRunType="PULSER"){
3 // macro to Test SDD preprocessor
4 // needs:
5 // - 4 tar files with simulated output of PULSER DA
6 // - 4 tar files with simulated output of INJECTOR DA
7 // - 1 root file with simulated output of DCS
8 // all these files can be found on
15b67cdc 9 gSystem->Load("$ALICE_ROOT/SHUTTLE/TestShuttle/libTestShuttle.so");
ad2585ed 10
11 // The parameters are run, startTime, endTime
12 AliTestShuttle* shuttle = new AliTestShuttle(7, 0, 1);
13
14
15 AliTestShuttle::SetMainCDB("local:///home/prino/alice/SDD/Calibration/preprocessor/OCDB");
16 AliTestShuttle::SetMainRefStorage("local:///home/prino/alice/SDD/Calibration/preprocessor/OCDB");
17
18 printf("Test OCDB storage Uri: %s\n", AliShuttleInterface::GetMainCDB().Data());
19 printf("Test Reference storage Uri: %s\n", AliShuttleInterface::GetMainRefStorage().Data());
20
21 // DCS input file
22 TFile *fil=new TFile("DCSAliasMap_3h_SIM.root");
23 TMap* dcsAliasMap =(TMap*)fil->Get("DCSAliasMap");
24 shuttle->SetDCSInput(dcsAliasMap);
25
26 // DA input files
27416b0d 27 gSystem->Exec("rm -v OCDB/ITS/DCS/DataSDD/Run*.root");
ad2585ed 28 if(optRunType=="PULSER"){
29 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC1","SDDbase_LDC1.tar");
30 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC2","SDDbase_LDC2.tar");
31 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC3","SDDbase_LDC3.tar");
32 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC4","SDDbase_LDC4.tar");
27416b0d 33 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC5","SDDbase_LDC5.tar");
34 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC6","SDDbase_LDC6.tar");
35 gSystem->Exec("rm -v OCDB/ITS/Calib/CalibSDD/Run*.root");
5e6e7c0c 36 }else if(optRunType=="INJECTOR"){
ad2585ed 37 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC1","SDDinj_LDC1.tar");
38 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC2","SDDinj_LDC2.tar");
39 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC3","SDDinj_LDC3.tar");
40 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC4","SDDinj_LDC4.tar");
27416b0d 41 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC5","SDDinj_LDC5.tar");
42 shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC6","SDDinj_LDC6.tar");
43 gSystem->Exec("rm -v OCDB/ITS/Calib/DriftSpeedSDD/Run*.root");
ad2585ed 44 }
45
46 shuttle->SetInputRunType(optRunType);
47
48 shuttle->AddInputRunParameter("totalEvents", "30000");
49 shuttle->AddInputRunParameter("NumberOfGDCs", "15");
50 cout<<"Input run parameters added"<<endl;
51
52
53 Bool_t hltStatus=kFALSE;
54 // shuttle->SetInputHLTStatus(hltStatus);
55
56
57 // Call preprocessor
58 AliPreprocessor* test = new AliITSPreprocessorSDD(shuttle);
59 printf("Call SDD Preprocessor\n");
60 shuttle->Process();
61 printf("Preprocessor OK\n");
62
63 // Check the file which should have been created
64 Char_t theDir[100];
65 Bool_t doCheck=kFALSE;
66 if(optRunType=="PULSER"){
27416b0d 67 gSystem->Exec("rm SDDbase_ddl*.data");
68 gSystem->Exec("rm fee.conf");
ad2585ed 69 sprintf(theDir,"ITS/Calib/CalibSDD");
70 doCheck=kTRUE;
5e6e7c0c 71 }else if(optRunType=="INJECTOR"){
27416b0d 72 gSystem->Exec("rm SDDinj_ddl*.data");
ad2585ed 73 sprintf(theDir,"ITS/Calib/DriftSpeedSDD");
74 doCheck=kTRUE;
5e6e7c0c 75 }
27416b0d 76
ad2585ed 77 if(doCheck){
317e638f 78 AliCDBEntry* chkEntry = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())->Get(theDir, 7);
ad2585ed 79 if (!chkEntry){
317e638f 80 printf("The Calib file is not there. Something went wrong.\n");
81 }else{
82 chkEntry->PrintMetaData();
83 TObjArray* arr=(TObjArray*)chkEntry->GetObject();
84 arr->Inspect();
ad2585ed 85 }
86 }
87
317e638f 88 sprintf(theDir,"ITS/DCS/DataSDD");
89 AliCDBEntry* chkEntryDCS = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())
90 ->Get(theDir, 7);
91 if (!chkEntryDCS){
92 printf("The DCS data points file is not there. Something went wrong.\n");
93 }else{
94 chkEntryDCS->PrintMetaData();
95 TObjArray* arrdcs=(TObjArray*)chkEntryDCS->GetObject();
96 arrdcs->Inspect();
97 }
ad2585ed 98}
99
100