]>
Commit | Line | Data |
---|---|---|
ad2585ed | 1 | |
2 | void 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 | |
27 | if(optRunType=="PULSER"){ | |
28 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC1","SDDbase_LDC1.tar"); | |
29 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC2","SDDbase_LDC2.tar"); | |
30 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC3","SDDbase_LDC3.tar"); | |
31 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Calib","LDC4","SDDbase_LDC4.tar"); | |
32 | }else if(optRunType=="PHYSICS" || optRunType=="INJECTOR"){ | |
33 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC1","SDDinj_LDC1.tar"); | |
34 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC2","SDDinj_LDC2.tar"); | |
35 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC3","SDDinj_LDC3.tar"); | |
36 | shuttle->AddInputFile(AliShuttleInterface::kDAQ, "SDD","SDD_Injec","LDC4","SDDinj_LDC4.tar"); | |
37 | } | |
38 | ||
39 | shuttle->SetInputRunType(optRunType); | |
40 | ||
41 | shuttle->AddInputRunParameter("totalEvents", "30000"); | |
42 | shuttle->AddInputRunParameter("NumberOfGDCs", "15"); | |
43 | cout<<"Input run parameters added"<<endl; | |
44 | ||
45 | ||
46 | Bool_t hltStatus=kFALSE; | |
47 | // shuttle->SetInputHLTStatus(hltStatus); | |
48 | ||
49 | ||
50 | // Call preprocessor | |
51 | AliPreprocessor* test = new AliITSPreprocessorSDD(shuttle); | |
52 | printf("Call SDD Preprocessor\n"); | |
53 | shuttle->Process(); | |
54 | printf("Preprocessor OK\n"); | |
55 | ||
56 | // Check the file which should have been created | |
57 | Char_t theDir[100]; | |
58 | Bool_t doCheck=kFALSE; | |
59 | if(optRunType=="PULSER"){ | |
60 | sprintf(theDir,"ITS/Calib/CalibSDD"); | |
61 | doCheck=kTRUE; | |
62 | }else if(optRunType=="PHYSICS" || optRunType=="INJECTOR"){ | |
63 | sprintf(theDir,"ITS/Calib/DriftSpeedSDD"); | |
64 | doCheck=kTRUE; | |
65 | } | |
66 | if(doCheck){ | |
317e638f | 67 | AliCDBEntry* chkEntry = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())->Get(theDir, 7); |
ad2585ed | 68 | if (!chkEntry){ |
317e638f | 69 | printf("The Calib file is not there. Something went wrong.\n"); |
70 | }else{ | |
71 | chkEntry->PrintMetaData(); | |
72 | TObjArray* arr=(TObjArray*)chkEntry->GetObject(); | |
73 | arr->Inspect(); | |
ad2585ed | 74 | } |
75 | } | |
76 | ||
317e638f | 77 | sprintf(theDir,"ITS/DCS/DataSDD"); |
78 | AliCDBEntry* chkEntryDCS = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB()) | |
79 | ->Get(theDir, 7); | |
80 | if (!chkEntryDCS){ | |
81 | printf("The DCS data points file is not there. Something went wrong.\n"); | |
82 | }else{ | |
83 | chkEntryDCS->PrintMetaData(); | |
84 | TObjArray* arrdcs=(TObjArray*)chkEntryDCS->GetObject(); | |
85 | arrdcs->Inspect(); | |
86 | } | |
ad2585ed | 87 | } |
88 | ||
89 |