]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/CreateIdealOnlineCalibPars.C
Remove a run from LHC10e wo AODs; added run list for the new PbPb MC LHC11a10b_bis
[u/mrichter/AliRoot.git] / TOF / CreateIdealOnlineCalibPars.C
CommitLineData
be2ca2e7 1void CreateIdealOnlineCalibPars(){
17149e6b 2
3 // Create TOF Dummy (delay=0, pulser/noise/HW status ok) Online Calibration Object for reconstruction
be2ca2e7 4 // and write it on CDB
17149e6b 5 // Both old type objects (using TObjArrays) and new type objects (using AliTOFChannelOnlineArray/
6 // AliTOFChannelOnlineStatusArray are written
7
be2ca2e7 8 AliTOFcalib *tofcalib = new AliTOFcalib();
9 tofcalib->CreateCalArrays();
10 TObjArray *tofCalOnline = (TObjArray*) tofcalib->GetTOFCalArrayOnline();
7fffa85b 11 TObjArray *tofCalOnlinePulser = (TObjArray*) tofcalib->GetTOFCalArrayOnlinePulser();
12 TObjArray *tofCalOnlineNoise = (TObjArray*) tofcalib->GetTOFCalArrayOnlineNoise();
13 TObjArray *tofCalOnlineHW = (TObjArray*) tofcalib->GetTOFCalArrayOnlineHW();
17149e6b 14 AliTOFChannelOnlineArray *delayArr = (AliTOFChannelOnlineArray*) tofcalib->GetTOFOnlineDelay();
15 AliTOFChannelOnlineStatusArray *status = (AliTOFChannelOnlineStatusArray*) tofcalib->GetTOFOnlineStatus();
be2ca2e7 16 // Write the dummy offline calibration object on CDB
17
18 AliCDBManager *man = AliCDBManager::Instance();
162637e4 19 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
be2ca2e7 20 Int_t nChannels = AliTOFGeometry::NSectors()*(2*(AliTOFGeometry::NStripC()+AliTOFGeometry::NStripB())+AliTOFGeometry::NStripA())*AliTOFGeometry::NpadZ()*AliTOFGeometry::NpadX();
21 for (Int_t ipad = 0 ; ipad<nChannels; ipad++){
22 AliTOFChannelOnline *calChannelOnline = (AliTOFChannelOnline*)tofCalOnline->At(ipad);
7fffa85b 23 AliTOFChannelOnlineStatus *calChannelOnlinePulser = (AliTOFChannelOnlineStatus*)tofCalOnlinePulser->At(ipad);
24 AliTOFChannelOnlineStatus *calChannelOnlineNoise = (AliTOFChannelOnlineStatus*)tofCalOnlineNoise->At(ipad);
25 AliTOFChannelOnlineStatus *calChannelOnlineHW = (AliTOFChannelOnlineStatus*)tofCalOnlineHW->At(ipad);
be2ca2e7 26 Float_t delay = 0.;
17149e6b 27 delayArr->SetDelay(ipad,delay);
7fffa85b 28 calChannelOnline->SetDelay(delay);
29 calChannelOnlinePulser->SetStatus(AliTOFChannelOnlineStatus::kTOFPulserOk);
30 calChannelOnlineNoise->SetStatus(AliTOFChannelOnlineStatus::kTOFNoiseOk);
31 calChannelOnlineHW->SetStatus(AliTOFChannelOnlineStatus::kTOFHWOk);
17149e6b 32 status->SetHWStatus(ipad,AliTOFChannelOnlineStatusArray::kTOFHWOk);
33 status->SetPulserStatus(ipad,AliTOFChannelOnlineStatusArray::kTOFPulserOk);
34 status->SetNoiseStatus(ipad,AliTOFChannelOnlineStatusArray::kTOFNoiseOk);
7fffa85b 35 }
17149e6b 36 tofcalib->WriteParOnlineDelayOnCDB("TOF/Calib"); // new obj
37 tofcalib->WriteParOnlineStatusOnCDB("TOF/Calib"); // new obj
38 tofcalib->WriteParOnlineOnCDB("TOF/Calib"); // old obj
39 tofcalib->WriteParOnlinePulserOnCDB("TOF/Calib"); // old obj
40 tofcalib->WriteParOnlineNoiseOnCDB("TOF/Calib"); // old obj
41 tofcalib->WriteParOnlineHWOnCDB("TOF/Calib"); // old obj
7fffa85b 42 return;
be2ca2e7 43}