diff --git a/analysis/detectors/tof/CbmTofAnaTestbeam.cxx b/analysis/detectors/tof/CbmTofAnaTestbeam.cxx index 3585ac2a0fe61f297ba5480fd27bd3134a1f226b..33fbb4cd7f1a24ffb0f4a159fbe3966c573cdd83 100644 --- a/analysis/detectors/tof/CbmTofAnaTestbeam.cxx +++ b/analysis/detectors/tof/CbmTofAnaTestbeam.cxx @@ -782,7 +782,7 @@ void CbmTofAnaTestbeam::Exec(Option_t* opt) } */ Int_t iNbHits = 0; - for (Int_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { + for (size_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { Int_t iHitIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kTofHit, iHit)); CbmTofHit* tHit = dynamic_cast<CbmTofHit*>(fTofHitsCollIn->At(iHitIndex)); new ((*fTofHitsColl)[iNbHits]) CbmTofHit(*tHit); @@ -794,7 +794,7 @@ void CbmTofAnaTestbeam::Exec(Option_t* opt) } Int_t iNbTrks = 0; - for (Int_t iTrk = 0; iTrk < tEvent->GetNofData(ECbmDataType::kTofTrack); iTrk++) { + for (size_t iTrk = 0; iTrk < tEvent->GetNofData(ECbmDataType::kTofTrack); iTrk++) { Int_t iTrkIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kTofTrack, iTrk)); CbmTofTracklet* tTrk = dynamic_cast<CbmTofTracklet*>(fTofTrackCollIn->At(iTrkIndex)); new ((*fTofTrackColl)[iNbTrks++]) CbmTofTracklet(*tTrk); diff --git a/core/eventdisplay/CbmTimesliceManager.cxx b/core/eventdisplay/CbmTimesliceManager.cxx index dc8bdfdeb0e42f31e538b5dc103518c43c650c29..1cff1d083e903a50cc1810cf5a6de5a2adb3708d 100644 --- a/core/eventdisplay/CbmTimesliceManager.cxx +++ b/core/eventdisplay/CbmTimesliceManager.cxx @@ -204,7 +204,7 @@ void CbmTimesliceManager::PrevTimeslice() GotoTimeslice(GetCurrentTimeslice() - 1); } -void CbmTimesliceManager::GotoEvent(uint32_t event) +void CbmTimesliceManager::GotoEvent(Int_t event) { fEventIdx = event; /// Get List of tasks from FairRunAna diff --git a/core/eventdisplay/CbmTimesliceManager.h b/core/eventdisplay/CbmTimesliceManager.h index 18a350bb79d55f7118c4b96eb6fe68ae3a03f708..893988a4d9630528b7ea6e106abb5d573be7450a 100644 --- a/core/eventdisplay/CbmTimesliceManager.h +++ b/core/eventdisplay/CbmTimesliceManager.h @@ -85,7 +85,7 @@ public: virtual void GotoTimeslice(uint32_t timeslice); // *MENU* virtual void NextTimeslice(); // *MENU* virtual void PrevTimeslice(); // *MENU* - virtual void GotoEvent(uint32_t event); // *MENU* + virtual void GotoEvent(Int_t event); // *MENU* virtual void NextEvent(); // *MENU* virtual void PrevEvent(); // *MENU* diff --git a/core/eventdisplay/CbmTimesliceRecoTracks.cxx b/core/eventdisplay/CbmTimesliceRecoTracks.cxx index b8ad83f856ee0da9d2405cfc5a335cbb16d388e4..c7e4356ce2da72785c41379188f71ff6369c7d5c 100644 --- a/core/eventdisplay/CbmTimesliceRecoTracks.cxx +++ b/core/eventdisplay/CbmTimesliceRecoTracks.cxx @@ -227,7 +227,7 @@ void CbmTimesliceRecoTracks::Reset() TEveTrackList* CbmTimesliceRecoTracks::GetTrGroup(TParticle* P) { char name_buf[128]; - sprintf(name_buf, "reco_%s", P->GetName()); + snprintf(name_buf, 128, "reco_%s", P->GetName()); fTrList = 0; for (Int_t i = 0; i < fEveTrList->GetEntriesFast(); i++) { TEveTrackList* TrListIn = (TEveTrackList*) fEveTrList->At(i); diff --git a/fles/mcbm2018/monitor/CbmMcbm2018MonitorSts.cxx b/fles/mcbm2018/monitor/CbmMcbm2018MonitorSts.cxx index 664d525463955afaae7e6208bbda2f8ac9f239cd..b9c348b8b8a07c329b60c375af7285e7f62b13b5 100644 --- a/fles/mcbm2018/monitor/CbmMcbm2018MonitorSts.cxx +++ b/fles/mcbm2018/monitor/CbmMcbm2018MonitorSts.cxx @@ -1514,9 +1514,9 @@ Bool_t CbmMcbm2018MonitorSts::DoUnpack(const fles::Timeslice& ts, size_t compone std::vector<Bool_t> vbCopyOnAnyAsicMs(fuNbFebs, kFALSE); std::vector<Bool_t> vbCopySameAdcOnAnyAsicMs(fuNbFebs, kFALSE); std::vector<Bool_t> vbFlagOnAnyAsicMs(fuNbFebs, kFALSE); - Bool_t bCopyOnAnyMs = kFALSE; - Bool_t bCopySameAdcOnAnyMs = kFALSE; - Bool_t bFlagOnAnyMs = kFALSE; + // Bool_t bCopyOnAnyMs = kFALSE; + // Bool_t bCopySameAdcOnAnyMs = kFALSE; + // Bool_t bFlagOnAnyMs = kFALSE; for (UInt_t uAsic = 0; uAsic < fuNbStsXyters; uAsic++) { UInt_t uFebIdx = uAsic / fUnpackParSts->GetNbAsicsPerFeb(); UInt_t uAsicInFeb = uAsic % fUnpackParSts->GetNbAsicsPerFeb(); @@ -1534,9 +1534,9 @@ Bool_t CbmMcbm2018MonitorSts::DoUnpack(const fles::Timeslice& ts, size_t compone vbCopySameAdcOnAnyAsicMs[uFebIdx] = vbCopySameAdcOnAnyAsicMs[uFebIdx] || bHitCopySameAdcInThisMs[uAsic]; vbFlagOnAnyAsicMs[uFebIdx] = vbFlagOnAnyAsicMs[uFebIdx] || bFlagOnInThisMs[uAsic]; - bCopyOnAnyMs |= bHitCopyInThisMs[uAsic]; - bCopySameAdcOnAnyMs |= bHitCopySameAdcInThisMs[uAsic]; - bFlagOnAnyMs |= bFlagOnInThisMs[uAsic]; + // bCopyOnAnyMs |= bHitCopyInThisMs[uAsic]; + // bCopySameAdcOnAnyMs |= bHitCopySameAdcInThisMs[uAsic]; + // bFlagOnAnyMs |= bFlagOnInThisMs[uAsic]; } // for( UInt_t uAsic = 0; uAsic < fuNbStsXyters; uAsic++) for (UInt_t uFebIdx = 0; uFebIdx < fuNbFebs; ++uFebIdx) { diff --git a/reco/detectors/tof/CbmTofCalibrator.cxx b/reco/detectors/tof/CbmTofCalibrator.cxx index 6ffed6831f2bfb060209af7235c70ab775336705..2656b9fe49b7c6a34f01fd49384cc0348d84a8ab 100644 --- a/reco/detectors/tof/CbmTofCalibrator.cxx +++ b/reco/detectors/tof/CbmTofCalibrator.cxx @@ -508,7 +508,7 @@ void CbmTofCalibrator::FillHitCalHist(CbmTofHit* pRef, const Int_t iOpt, CbmEven else { if (-1 < fTofClusterizer->GetBeamAddr()) { // look for beam counter if (NevtH == 1) LOG(warn) << Form("FillHitCalHist: look for beam counter 0x%08x", fTofClusterizer->GetBeamAddr()); - Int_t iHit = 0; + size_t iHit = 0; //for (; iHit < (int) fTofFindTracks->GetNbHits(); iHit++) { for (; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { //CbmTofHit* pHit = fTofFindTracks->GetHitPointer(iHit); @@ -531,7 +531,7 @@ void CbmTofCalibrator::FillHitCalHist(CbmTofHit* pRef, const Int_t iOpt, CbmEven } else { double dNAv = 0.; - for (Int_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { + for (size_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { Int_t iHitIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kTofHit, iHit)); CbmTofHit* pHit = (CbmTofHit*) tTofHitsColl->At(iHitIndex); if (NULL == pHit) continue; @@ -543,7 +543,7 @@ void CbmTofCalibrator::FillHitCalHist(CbmTofHit* pRef, const Int_t iOpt, CbmEven } } - for (Int_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { + for (size_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { Int_t iHitIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kTofHit, iHit)); CbmTofHit* pHit = (CbmTofHit*) tTofHitsColl->At(iHitIndex); if (NULL == pHit) continue; @@ -636,7 +636,7 @@ void CbmTofCalibrator::FillHitCalHist(CbmTofHit* pRef, const Int_t iOpt, CbmEven const CbmTofDigi* pDig0 = &(fTofCalDigiVec->at(iDigInd0)); const CbmTofDigi* pDig1 = &(fTofCalDigiVec->at(iDigInd1)); if ((Int_t) pDig0->GetType() != iSmType) { - LOG(error) << Form(" Wrong Digi SmType %d - %d for Tofhit %d in iDetIndx " + LOG(error) << Form(" Wrong Digi SmType %d - %d for Tofhit %lu in iDetIndx " "%d, Ch %d with %d strips at Indx %d, %d", iSmType, (Int_t) pDig0->GetType(), iHit, iDetIndx, iCh, fDigiBdfPar->GetNbChan(iSmType, iRpc), iDigInd0, iDigInd1); diff --git a/reco/detectors/tof/CbmTofCosmicClusterizer.cxx b/reco/detectors/tof/CbmTofCosmicClusterizer.cxx index 707e0fcd9280d3ba0c65c74c0f70f4a06b7dae18..b2e7144b894e3cb34a6c7c990b6b09fa53ca48b7 100644 --- a/reco/detectors/tof/CbmTofCosmicClusterizer.cxx +++ b/reco/detectors/tof/CbmTofCosmicClusterizer.cxx @@ -1777,6 +1777,7 @@ Bool_t CbmTofCosmicClusterizer::FillHistos() } } + /* Double_t TotSum = 0.; for (Int_t iLink = 0; iLink < digiMatch->GetNofLinks(); iLink++) { // loop over digis CbmLink L0 = digiMatch->GetLink(iLink); //vDigish.at(ivDigInd); @@ -1786,6 +1787,7 @@ Bool_t CbmTofCosmicClusterizer::FillHistos() TotSum += pDig0->GetTot(); } } + */ Double_t dMeanTimeSquared = 0.; Double_t dNstrips = 0.; diff --git a/reco/detectors/tof/CbmTofEventClusterizer.cxx b/reco/detectors/tof/CbmTofEventClusterizer.cxx index 95fb8734317c5a6d9793f2b4c4b9457783088742..196fbc63990c1e0dd64ce557f6916c11e5070686 100644 --- a/reco/detectors/tof/CbmTofEventClusterizer.cxx +++ b/reco/detectors/tof/CbmTofEventClusterizer.cxx @@ -2608,6 +2608,7 @@ Bool_t CbmTofEventClusterizer::FillHistos(CbmEvent* tEvent) } } + /* Double_t TotSum = 0.; for (Int_t iLink = 0; iLink < digiMatch->GetNofLinks(); iLink++) { // loop over digis CbmLink L0 = digiMatch->GetLink(iLink); //vDigish.at(ivDigInd); @@ -2619,6 +2620,7 @@ Bool_t CbmTofEventClusterizer::FillHistos(CbmEvent* tEvent) TotSum += pDig0->GetTot(); } } + */ Double_t dMeanTimeSquared = 0.; Double_t dNstrips = 0.; @@ -3050,7 +3052,7 @@ Bool_t CbmTofEventClusterizer::WriteHistos() fHist = new TFile(fOutHstFileName, "RECREATE"); fHist->cd(); Double_t dTBeamRefMean = 0.; // weighted mean of all BeamRef counter channels - Double_t dTBeamRefWidth = 0; + //Double_t dTBeamRefWidth = 0; Double_t dTBeamRefW = 0.; LOG(info) << "WriteHistos with CalSel " << fCalSel << ", Mode " << fCalMode << ", TRefMode " << fTRefMode; @@ -3212,7 +3214,7 @@ Bool_t CbmTofEventClusterizer::WriteHistos() if (0 < dWCh) { Double_t dW = dTBeamRefW; dTBeamRefMean *= dW; - dTBeamRefWidth *= dW; + //dTBeamRefWidth *= dW; dTBeamRefW += dWCh; if (dWCh > WalkNHmin) { TH1* hTy = (TH1*) htempTOff->ProjectionY(Form("%s_py%d", htempTOff->GetName(), iCh), iCh + 1, iCh + 1); @@ -3238,22 +3240,22 @@ Bool_t CbmTofEventClusterizer::WriteHistos() else { if (fRes->Parameter(2) < 2.) { dTBeamRefMean += fRes->Parameter(1) * dWCh; // consider for mean - dTBeamRefWidth += fRes->Parameter(2) * dWCh; //calculate width + //dTBeamRefWidth += fRes->Parameter(2) * dWCh; //calculate width } else { dTBeamRefMean += ((TProfile*) htempTOff_pfx)->GetBinContent(iCh + 1) * dWCh; - dTBeamRefWidth += ((TProfile*) htempTOff_pfx)->GetBinError(iCh + 1) * dWCh; + //dTBeamRefWidth += ((TProfile*) htempTOff_pfx)->GetBinError(iCh + 1) * dWCh; } } } else { dTBeamRefMean += ((TProfile*) htempTOff_pfx)->GetBinContent(iCh + 1) * dWCh; - dTBeamRefWidth += ((TProfile*) htempTOff_pfx)->GetBinError(iCh + 1) * dWCh; + //dTBeamRefWidth += ((TProfile*) htempTOff_pfx)->GetBinError(iCh + 1) * dWCh; } dTBeamRefMean += fvCPTOff[iSmType][iSm * iNbRpc + iRpc][iCh][0] * dWCh; // enforce <offset>=0 if (dTBeamRefW > 0) { dTBeamRefMean /= dTBeamRefW; - dTBeamRefWidth /= dTBeamRefW; + //dTBeamRefWidth /= dTBeamRefW; } } // dWCh > 0 if (htempTOff_px->GetBinContent(iCh + 1) > 0.) diff --git a/reco/detectors/tof/CbmTofExtendTracks.cxx b/reco/detectors/tof/CbmTofExtendTracks.cxx index 794ac2eb9539e194ba3f9915eecd3a7603bc505e..4c30d873a81fbc42f7b4e3fcd3292378beb0abc5 100644 --- a/reco/detectors/tof/CbmTofExtendTracks.cxx +++ b/reco/detectors/tof/CbmTofExtendTracks.cxx @@ -635,10 +635,10 @@ void CbmTofExtendTracks::ExecExtend(Option_t* /*opt*/, CbmEvent* tEvent) iNbTofStations = 1; fvTofStationZ.resize(iNbTofStations); fvTofHitIndex.resize(iNbTofStations); - for (Int_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { + for (size_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kTofHit); iHit++) { Int_t iHitIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kTofHit, iHit)); CbmTofHit* tHit = dynamic_cast<CbmTofHit*>(fTofHitArrayIn->At(iHitIndex)); - LOG(debug) << Form("Inspect Ev %d, TofHit %d, Ind %d at %6.1f in %lu (%u) stations", fiEvent, iHit, iHitIndex, + LOG(debug) << Form("Inspect Ev %d, TofHit %lu, Ind %d at %6.1f in %lu (%u) stations", fiEvent, iHit, iHitIndex, tHit->GetZ(), fvTofStationZ.size(), iNbAllStations); Int_t iStZ = (Int_t)(tHit->GetZ() / dStDZ); @@ -717,7 +717,7 @@ void CbmTofExtendTracks::ExecExtend(Option_t* /*opt*/, CbmEvent* tEvent) fvStsStationZ.resize(iNbStsStations); fvStsHitIndex.resize(iNbStsStations); - for (Int_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kStsHit); iHit++) { + for (size_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kStsHit); iHit++) { Int_t iHitIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kStsHit, iHit)); CbmPixelHit* tHit = dynamic_cast<CbmPixelHit*>(fStsHitArrayIn->At(iHitIndex)); @@ -791,7 +791,7 @@ void CbmTofExtendTracks::ExecExtend(Option_t* /*opt*/, CbmEvent* tEvent) iNbMuchStations = 1; fvMuchStationZ.resize(iNbMuchStations); fvMuchHitIndex.resize(iNbMuchStations); - for (Int_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kMuchPixelHit); iHit++) { + for (size_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kMuchPixelHit); iHit++) { Int_t iHitIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kMuchPixelHit, iHit)); CbmPixelHit* tHit = dynamic_cast<CbmPixelHit*>(fMuchHitArrayIn->At(iHitIndex)); @@ -883,7 +883,7 @@ void CbmTofExtendTracks::ExecExtend(Option_t* /*opt*/, CbmEvent* tEvent) iNbRichStations = 1; fvRichStationZ.resize(iNbRichStations); fvRichHitIndex.resize(iNbRichStations); - for (Int_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kRichHit); iHit++) { + for (size_t iHit = 0; iHit < tEvent->GetNofData(ECbmDataType::kRichHit); iHit++) { Int_t iHitIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kRichHit, iHit)); CbmPixelHit* tHit = dynamic_cast<CbmPixelHit*>(fRichHitArrayIn->At(iHitIndex)); @@ -973,12 +973,12 @@ void CbmTofExtendTracks::ExecExtend(Option_t* /*opt*/, CbmEvent* tEvent) */ // loop on tof tracklet - Int_t iNTrks = tEvent->GetNofData(ECbmDataType::kTofTrack); - if (iNTrks < 0) iNTrks = 0; + size_t iNTrks = tEvent->GetNofData(ECbmDataType::kTofTrack); + fvTrkCalHits.clear(); fvTrkCalHits.resize(iNTrks); fvTrkPar.clear(); - for (Int_t iTr = 0; iTr < iNTrks; iTr++) { + for (size_t iTr = 0; iTr < iNTrks; iTr++) { Int_t iTrkIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kTofTrack, iTr)); CbmTofTracklet* pTrk = dynamic_cast<CbmTofTracklet*>(fTofTrackArrayIn->At(iTrkIndex)); //CbmTofTrackletParam* pTrkPar=new CbmTofTrackletParam(*pTrk->GetTrackParameter()); @@ -1223,7 +1223,7 @@ void CbmTofExtendTracks::FillHistograms(CbmEvent* tEvent) } // limit track multiplicity - Int_t NTrkTof = tEvent->GetNofData(ECbmDataType::kTofTrack); + Int_t NTrkTof = (Int_t) tEvent->GetNofData(ECbmDataType::kTofTrack); if (NTrkTof > fiNTrkTofMax) return; Int_t iLev = 0; diff --git a/reco/detectors/tof/CbmTofHitMaker.cxx b/reco/detectors/tof/CbmTofHitMaker.cxx index c25016accf428555e2d51a6137ee54fec603019f..0cbfdcc2f125e01e9ef557d7dfa7e829a7b6deea 100644 --- a/reco/detectors/tof/CbmTofHitMaker.cxx +++ b/reco/detectors/tof/CbmTofHitMaker.cxx @@ -335,14 +335,14 @@ void CbmTofHitMaker::Exec(Option_t* option) LOG(debug) << "TS event " << iEvent << " with " << tEvent->GetNofData(ECbmDataType::kT0Digi) << " T0 and " << tEvent->GetNofData(ECbmDataType::kTofDigi) << " Tof digis "; - for (Int_t iDigi = 0; iDigi < tEvent->GetNofData(ECbmDataType::kT0Digi); iDigi++) { + for (size_t iDigi = 0; iDigi < tEvent->GetNofData(ECbmDataType::kT0Digi); iDigi++) { Int_t iDigiIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kT0Digi, iDigi)); CbmTofDigi tDigi(fDigiMan->Get<CbmBmonDigi>(iDigiIndex)); if (tDigi.GetType() != 5) LOG(fatal) << "Wrong T0 type " << tDigi.GetType() << ", Addr 0x" << std::hex << tDigi.GetAddress(); fTofDigiVec.push_back(tDigi); } - for (Int_t iDigi = 0; iDigi < tEvent->GetNofData(ECbmDataType::kTofDigi); iDigi++) { + for (size_t iDigi = 0; iDigi < tEvent->GetNofData(ECbmDataType::kTofDigi); iDigi++) { Int_t iDigiIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kTofDigi, iDigi)); const CbmTofDigi* tDigi = fDigiMan->Get<CbmTofDigi>(iDigiIndex); fTofDigiVec.push_back(CbmTofDigi(*tDigi));