19a3e642 |
1 | |
2 | void DBStorageFEE(){ |
3 | |
4 | AliCDBManager *man = AliCDBManager::Instance(); |
5 | |
6 | AliCDBStorage *storLoc; |
7 | man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
8 | |
9 | // Setting gain and pedestal values : |
10 | |
11 | AliVZEROTriggerData *triggerData = new AliVZEROTriggerData(); |
12 | |
13 | const int N = AliVZEROTriggerData::kNCIUBoards; |
14 | |
98689dbf |
15 | UShort_t Clk1Win1[N] = {1,1,1,1,3,3,3,3}; |
19a3e642 |
16 | UShort_t Clk2Win1[N] = {3,3,3,3,14,14,14,14}; |
17 | triggerData->SetClk1Win1(Clk1Win1); |
18 | triggerData->SetClk2Win1(Clk2Win1); |
19 | |
20 | UShort_t Clk1Win2[N] = {7,7,7,7,7,7,7,7}; |
21 | UShort_t Clk2Win2[N] = {14,14,14,14,14,14,14,14}; |
22 | triggerData->SetClk1Win2(Clk1Win1); |
23 | triggerData->SetClk2Win2(Clk2Win1); |
24 | |
25 | UShort_t delayClk1Win1[N] = {0,0,0,0,300,300,300,300}; // 1 unit correspond to 10 ps delay |
26 | UShort_t delayClk2Win1[N] = {0,0,0,0,200,200,200,200}; // 1 unit correspond to 10 ps delay |
27 | triggerData->SetDelayClk1Win1(delayClk1Win1); |
28 | triggerData->SetDelayClk2Win1(delayClk2Win1); |
29 | |
30 | UShort_t delayClk1Win2[N] = {100,100,100,100,100,100,100,100}; // 1 unit correspond to 10 ps delay |
31 | UShort_t delayClk2Win2[N] = {200,200,200,200,200,200,200,200}; // 1 unit correspond to 10 ps delay |
32 | triggerData->SetDelayClk1Win2(delayClk1Win2); |
33 | triggerData->SetDelayClk2Win2(delayClk2Win2); |
34 | |
35 | UShort_t LatchWin1[N] = {16,16,16,16,16,16,16,16}; |
36 | triggerData->SetLatchWin1(LatchWin1); |
37 | |
38 | UShort_t LatchWin2[N] = {16,16,16,16,16,16,16,16}; |
39 | triggerData->SetLatchWin2(LatchWin2); |
40 | |
41 | UShort_t ResetWin1[N] = {16,16,16,16,16,16,16,16}; |
42 | triggerData->SetResetWin1(ResetWin1); |
43 | |
44 | UShort_t ResetWin2[N] = {16,16,16,16,16,16,16,16}; |
45 | triggerData->SetResetWin2(ResetWin2); |
46 | |
47 | Bool_t PedestalSubtraction[N] = {1,1,1,1,1,1,1,1}; |
48 | triggerData->SetPedestalSubtraction(PedestalSubtraction); |
49 | |
7407f10d |
50 | triggerData->SetBBAThreshold(1); |
51 | triggerData->SetBBCThreshold(1); |
19a3e642 |
52 | |
7407f10d |
53 | triggerData->SetBGAThreshold(1); |
54 | triggerData->SetBGCThreshold(1); |
19a3e642 |
55 | |
7407f10d |
56 | triggerData->SetBBAForBGThreshold(1); |
57 | triggerData->SetBBCForBGThreshold(1); |
19a3e642 |
58 | |
59 | triggerData->SetCentralityV0AThrLow(100); |
60 | triggerData->SetCentralityV0AThrHigh(500); |
61 | |
62 | triggerData->SetCentralityV0CThrLow(100); |
63 | triggerData->SetCentralityV0CThrHigh(500); |
64 | |
65 | triggerData->SetMultV0AThrLow(2); |
66 | triggerData->SetMultV0AThrHigh(10); |
67 | |
68 | triggerData->SetMultV0CThrLow(2); |
69 | triggerData->SetMultV0CThrHigh(10); |
70 | |
71 | for(int ibrd =0;ibrd<8;ibrd++){ |
72 | for(int ich =0;ich<8;ich++){ |
73 | triggerData->SetEnableTiming(kTRUE,ibrd,ich); |
74 | triggerData->SetEnableCharge(kTRUE,ibrd,ich); |
75 | triggerData->SetDelayHit(0,ibrd,ich); |
76 | for(int iint=0;iint<2;iint++){ |
77 | triggerData->SetPedestal(16,iint,ibrd,ich); |
78 | triggerData->SetPedestalCut(17,iint,ibrd,ich); |
79 | } |
80 | } |
81 | } |
82 | |
d5deaaa5 |
83 | for(int i =0;i<5;i++) triggerData->SetTriggerSelected(i, i); |
19a3e642 |
84 | |
85 | // Creation of the object VZERO Trigger Configuration as a MetaData |
86 | |
87 | TObjString str("VZERO Trigger Configuration"); // object that will be stored |
88 | |
89 | AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object |
90 | |
7407f10d |
91 | AliCDBId id("VZERO/Trigger/Data",0,AliCDBRunRange::Infinity()); |
19a3e642 |
92 | |
93 | //md->SetObjectClassName("VZERO calibration parameters"); automatically |
94 | //set to AliVZEROCalibData by the CDB classes during storage |
95 | md->SetResponsible("Brigitte Cheynis"); |
96 | md->SetBeamPeriod(0); |
7407f10d |
97 | md->SetAliRootVersion("v4-18-Release"); |
19a3e642 |
98 | md->SetComment("Prototype"); |
99 | md->PrintMetaData(); |
100 | |
101 | storLoc = man->GetDefaultStorage(); |
102 | storLoc->Put(triggerData, id, md); |
103 | |
104 | storLoc->Delete(); |
105 | delete md; |
106 | |
107 | } |