]>
Commit | Line | Data |
---|---|---|
e75e6e01 | 1 | void MakeCTPDummyEntries(){ |
2 | ||
6e780c51 | 3 | // Example macro to put in OCDB the dummy entries for CTP configuration and scalers |
4 | // The entries are at present taken from $ALICE_ROOT | |
5 | // Should be used to test the GRP preprocessor | |
e75e6e01 | 6 | |
7 | AliCDBManager *man = AliCDBManager::Instance(); | |
8 | man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
c3ca811b | 9 | Char_t * filenameConfig = gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/stdln.cfg"); |
10 | Char_t * filenameScalers = gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/stdln.cnt"); | |
6614fa48 | 11 | Char_t * filenameCTPtime = gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/stdln.tim"); |
e75e6e01 | 12 | |
13 | AliTriggerConfiguration *runcfg = AliTriggerConfiguration::LoadConfiguration(filenameConfig); | |
14 | AliTriggerRunScalers *scalers = AliTriggerRunScalers::ReadScalers(filenameScalers); | |
6614fa48 | 15 | AliCTPTimeParams *ctptime = AliCTPTimeParams::LoadCTPTimeParams(filenameCTPtime); |
e75e6e01 | 16 | |
6b2ffa8d | 17 | // CTP configuration |
e75e6e01 | 18 | AliCDBMetaData* metaconfig = new AliCDBMetaData(); |
19 | metaconfig->SetResponsible("Roman Lietava"); | |
20 | metaconfig->SetComment("Dummy CTP configuration for standalone runs"); | |
21 | AliCDBId idconfig("GRP/CTP/DummyConfig",0,AliCDBRunRange::Infinity()); | |
22 | man->Put(runcfg,idconfig, metaconfig); | |
23 | ||
6b2ffa8d | 24 | // CTP scalers |
e75e6e01 | 25 | AliCDBMetaData* metascalers = new AliCDBMetaData(); |
26 | metascalers->SetResponsible("Roman Lietava"); | |
27 | metascalers->SetComment("Dummy CTP scalers for standalone runs"); | |
28 | AliCDBId idscalers("GRP/CTP/DummyScalers",0,AliCDBRunRange::Infinity()); | |
29 | man->Put(scalers,idscalers, metascalers); | |
6614fa48 | 30 | |
6b2ffa8d | 31 | // CTP time parameters |
6614fa48 | 32 | AliCDBMetaData* metactptime = new AliCDBMetaData(); |
33 | metactptime->SetResponsible("Roman Lietava"); | |
34 | metactptime->SetComment("Dummy CTP time params for standalone runs"); | |
35 | AliCDBId idctptime("GRP/CTP/DummyCTPtime",0,AliCDBRunRange::Infinity()); | |
36 | man->Put(ctptime,idctptime, metactptime); | |
37 | ||
6b2ffa8d | 38 | // CTP LTU configuration |
39 | ||
40 | TObjArray* ltuarray = new TObjArray(); | |
41 | ltuarray->SetOwner(1); | |
42 | AliLTUConfig* ltu; | |
43 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("ITSSPD"),14000.,16459.,13); | |
44 | ltuarray->AddAtAndExpand(ltu,0); | |
45 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("ITSSDD"),3126.,16459.,8); | |
46 | ltuarray->AddAtAndExpand(ltu,1); | |
47 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("ITSSSD"),3126.,16459.,17); | |
48 | ltuarray->AddAtAndExpand(ltu,2); | |
49 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("TPC"),3126.,16459.,15); | |
50 | ltuarray->AddAtAndExpand(ltu,3); | |
51 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("TRD"),3126.,16459.,17); | |
52 | ltuarray->AddAtAndExpand(ltu,4); | |
53 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("TOF"),3126.,16459.,14); | |
54 | ltuarray->AddAtAndExpand(ltu,5); | |
55 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("HMPID"),3126.,16459.,19); | |
56 | ltuarray->AddAtAndExpand(ltu,6); | |
57 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("PHOS"),3126.,16459.,19); | |
58 | ltuarray->AddAtAndExpand(ltu,7); | |
59 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("CPV"),3126.,16459.,16); | |
60 | ltuarray->AddAtAndExpand(ltu,8); | |
61 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("PMD"),3126.,16459.,22); | |
62 | ltuarray->AddAtAndExpand(ltu,9); | |
63 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("MUONTRK"),3126.,16459.,8); | |
64 | ltuarray->AddAtAndExpand(ltu,10); | |
65 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("MUONTRG"),3126.,16459.,11); | |
66 | ltuarray->AddAtAndExpand(ltu,11); | |
67 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("FMD"),3126.,16459.,17); | |
68 | ltuarray->AddAtAndExpand(ltu,12); | |
69 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("T0"),3126.,16459.,15); | |
70 | ltuarray->AddAtAndExpand(ltu,13); | |
71 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("VZERO"),2000.,16459.,12); | |
72 | ltuarray->AddAtAndExpand(ltu,14); | |
73 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("ZDC"),3126.,16459.,17); | |
74 | ltuarray->AddAtAndExpand(ltu,15); | |
75 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("ACORDE"),16126.,22459.,18); | |
76 | ltuarray->AddAtAndExpand(ltu,16); | |
77 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("EMCAL"),3126.,16459.,19); | |
78 | ltuarray->AddAtAndExpand(ltu,17); | |
79 | ltu = new AliLTUConfig((Char_t)AliDAQ::DetectorID("DAQ_TEST"),3126.,16459.,10); | |
80 | ltuarray->AddAtAndExpand(ltu,18); | |
81 | ||
82 | AliCDBMetaData* md = new AliCDBMetaData(); | |
83 | md->SetResponsible("Roman Lietava"); | |
84 | md->SetComment("Example of (dummy -> default settings from 23/11/2010) entry for the detectors' LTU config"); | |
85 | AliCDBId id("GRP/CTP/DummyLTUConfig",0,AliCDBRunRange::Infinity()); | |
86 | man->Put(ltuarray,id, md); | |
87 | // check if ok | |
88 | /* | |
89 | man->SetRun(0); | |
90 | TObjArray* ltuarrayR = (TObjArray*) man->Get("GRP/CTP/LTUConfig")->GetObject(); | |
91 | cout << "Array size: " << ltuarrayR->GetEntriesFast() << endl; | |
92 | for(Int_t i=0;i<ltuarrayR->GetEntriesFast();i++){ | |
93 | if(ltu=(AliLTUConfig*) ltuarrayR->At(i)) ltu->Print(); | |
94 | else cout << "--------------------->Empty position " << i << endl; | |
95 | } | |
96 | */ | |
97 | ||
e75e6e01 | 98 | return; |
99 | } |