Update timestamps for new AMANDA simulation (17/02/2015)
[u/mrichter/AliRoot.git] / VZERO / CheckFeeOCDB.C
1 void CheckFeeOCDB(Int_t run)
2 {
3   AliCDBManager *man = AliCDBManager::Instance();
4
5   man->SetDefaultStorage("raw://");
6   man->SetRun(run);
7
8   AliCDBEntry *ent1 = man->Get("VZERO/Trigger/Data");
9   AliVZEROTriggerData *fTriggerData = (AliVZEROTriggerData*)ent1->GetObject();
10
11   for (int i=0; i<AliVZEROTriggerData::kNCIUBoards; i++) {
12     AliVZEROLogicalSignal clk1BB(fTriggerData->GetClk1Win1(i),(UInt_t)fTriggerData->GetDelayClk1Win1(i));
13     AliVZEROLogicalSignal clk2BB(fTriggerData->GetClk2Win1(i),(UInt_t)fTriggerData->GetDelayClk2Win1(i));
14     AliVZEROLogicalSignal bbGate(clk1BB & clk2BB);
15
16     AliVZEROLogicalSignal clk1BG(fTriggerData->GetClk1Win2(i),(UInt_t)fTriggerData->GetDelayClk1Win2(i));
17     AliVZEROLogicalSignal clk2BG(fTriggerData->GetClk2Win2(i),(UInt_t)fTriggerData->GetDelayClk2Win2(i));
18     AliVZEROLogicalSignal bgGate(clk1BG & clk2BG);
19
20     printf("Board=%d\n",i);
21     printf("  Win1: Clk1=%d DelayClk1=%d (%.2f -> %.2f) Clk2=%d DelayClk2=%d (%.2f -> %.2f) Latch=%d Reset=%d  Start=%.2f Stop=%.2f\n",
22            fTriggerData->GetClk1Win1(i), fTriggerData->GetDelayClk1Win1(i),
23            clk1BB.GetStartTime(), clk1BB.GetStopTime(),
24            fTriggerData->GetClk2Win1(i), fTriggerData->GetDelayClk2Win1(i),
25            clk2BB.GetStartTime(), clk2BB.GetStopTime(),
26            fTriggerData->GetLatchWin1(i), fTriggerData->GetResetWin1(i),
27            bbGate.GetStartTime(), bbGate.GetStopTime());
28     printf("  Win2: Clk1=%d DelayClk1=%d (%.2f -> %.2f) Clk2=%d DelayClk2=%d (%.2f -> %.2f) Latch=%d Reset=%d  Start=%.2f Stop=%.2f\n\n",
29            fTriggerData->GetClk1Win2(i), fTriggerData->GetDelayClk1Win2(i),
30            clk1BG.GetStartTime(), clk1BG.GetStopTime(),
31            fTriggerData->GetClk2Win2(i), fTriggerData->GetDelayClk2Win2(i),
32            clk2BG.GetStartTime(), clk2BG.GetStopTime(),
33            fTriggerData->GetLatchWin2(i), fTriggerData->GetResetWin2(i),
34            bgGate.GetStartTime(), bgGate.GetStopTime());
35   }
36
37   printf("What will be used in MC:\n");
38   AliVZEROTriggerSimulator simulator;
39   simulator.Print();
40 }