Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions calibrations/calorimeter/calo_tower_slope/LiteCaloEval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <phool/getClass.h>
#include <phool/phool.h>

#include <RtypesCore.h> // for Double_t
#include <Rtypes.h> // for Double_t
#include <TCanvas.h>
#include <TF1.h>
#include <TFile.h>
Expand Down Expand Up @@ -548,7 +548,7 @@ void LiteCaloEval::Get_Histos(const std::string &infile, const std::string &outf

if (!heta_tempp && i == 0)
{
std::cout << " warning hist " << hist_name_p.c_str() << " not found" << std::endl;
std::cout << " warning hist " << hist_name_p << " not found" << std::endl;
}

/// assign heta_tempp to array of tower histos
Expand Down
12 changes: 6 additions & 6 deletions calibrations/framework/fun4cal/Fun4CalServer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <pdbcalbase/RunToTime.h>

#include <RtypesCore.h> // for Stat_t
#include <Rtypes.h> // for Stat_t
#include <TDirectory.h> // for TDirectoryAtomicAdapter
#include <TFile.h>
#include <TH1.h>
Expand Down Expand Up @@ -660,7 +660,7 @@ bool Fun4CalServer::connectDB()
}
catch (odbc::SQLException &e)
{
std::cout << "Cannot connect to " << database.c_str() << std::endl;
std::cout << "Cannot connect to " << database << std::endl;
std::cout << e.getMessage() << std::endl;
std::cout << "countdown: " << countdown << std::endl;
countdown--;
Expand All @@ -673,7 +673,7 @@ bool Fun4CalServer::connectDB()
std::cout << "could not connect to DB after 10 tries in 1000 secs, giving up" << std::endl;
exit(-1);
}
std::cout << "connected to " << database.c_str() << " database." << std::endl;
std::cout << "connected to " << database << " database." << std::endl;
return true;
}
//---------------------------------------------------------------------
Expand Down Expand Up @@ -1349,7 +1349,7 @@ int Fun4CalServer::SyncCalibTimeStampsToOnCal(const CalReco *calibrator, const s
}
catch (odbc::SQLException &e)
{
std::cout << "Cannot connect to " << database.c_str() << std::endl;
std::cout << "Cannot connect to " << database << std::endl;
std::cout << e.getMessage() << std::endl;
return -1;
}
Expand Down Expand Up @@ -1511,7 +1511,7 @@ int Fun4CalServer::SyncOncalTimeStampsToRunDB(const int commit)
}
catch (odbc::SQLException &e)
{
std::cout << "Cannot connect to " << database.c_str() << std::endl;
std::cout << "Cannot connect to " << database << std::endl;
std::cout << e.getMessage() << std::endl;
return -1;
}
Expand Down Expand Up @@ -2322,7 +2322,7 @@ int Fun4CalServer::AdjustRichTimeStampForMultipleRuns()
}
catch (odbc::SQLException& e)
{
std::cout << "Cannot connect to " << database.c_str() << std::endl;
std::cout << "Cannot connect to " << database << std::endl;
std::cout << e.getMessage() << std::endl;
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion offline/QA/SimulationModules/QAG4SimulationKFParticle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ int QAG4SimulationKFParticle::load_nodes(PHCompositeNode *topNode)
m_kfpContainer = findNode::getClass<KFParticle_Container>(topNode, m_mother_name + "_KFParticle_Container");
if (!m_kfpContainer)
{
std::cout << m_mother_name.c_str() << "_KFParticle_Container - Fatal Error - "
std::cout << m_mother_name << "_KFParticle_Container - Fatal Error - "
<< "unable to find DST node "
<< "G4_QA" << std::endl;
assert(m_kfpContainer);
Expand Down
2 changes: 1 addition & 1 deletion offline/framework/fun4all/Fun4AllHistoManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int Fun4AllHistoManager::dumpHistos(const std::string &filename, const std::stri
TFile hfile(theoutfile.c_str(), openmode.c_str(), creator.c_str());
if (!hfile.IsOpen())
{
std::cout << PHWHERE << " Could not open output file" << theoutfile.c_str() << std::endl;
std::cout << PHWHERE << " Could not open output file" << theoutfile << std::endl;
return -1;
}
hfile.SetCompressionSettings(compress);
Expand Down
2 changes: 1 addition & 1 deletion offline/framework/fun4allraw/mvtx_decoder/GBTLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ inline GBTLink::CollectedDataStatus GBTLink::collectROFCableData(/*const Mapping
((gbtWord.activeLanes >> 6) & 0x7) == 0x7) )
{
log_error << "Expected all active lanes for links, but " << gbtWord.activeLanes << "found in HBF " << hbfEntry << ", " \
<< gbtWord.asString().data() << std::endl;
<< gbtWord.asString() << std::endl;
}
}
else if (gbtWord.isTDH()) // TRIGGER DATA HEADER (TDH)
Expand Down
3 changes: 1 addition & 2 deletions offline/framework/fun4allraw/mvtx_decoder/GBTWord.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ struct GBTWord {
}; // DIAGNOSTIC IB LANE


uint8_t data8[GBTWordLength]; // 80 bits GBT word
uint8_t data8[GBTWordLength]{}; // 80 bits GBT word
};
#pragma GCC diagnostic pop

GBTWord() = default;

/// check if the GBT Header corresponds to GBT payload header
Expand Down
2 changes: 1 addition & 1 deletion offline/framework/fun4allraw/mvtx_decoder/PixelData.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ChipPixelData
~ChipPixelData() = default;
uint16_t getChipID() const { return mChipID; }
const std::vector<PixelData>& getData() const { return mPixels; }
std::vector<PixelData>& getData() { return (std::vector<PixelData>&)mPixels; }
std::vector<PixelData>& getData() { return mPixels; }

// void setROFlags(uint8_t f = 0) { mROFlags = f; }
void setChipID(uint16_t id) { mChipID = id; }
Expand Down
2 changes: 1 addition & 1 deletion offline/packages/CaloReco/CaloTowerStatus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void CaloTowerStatus::CreateNodeTree(PHCompositeNode *topNode)
m_raw_towers = findNode::getClass<TowerInfoContainer>(topNode, RawTowerNodeName);
if (!m_raw_towers)
{
std::cout << Name() << "::" << m_detector.c_str() << "::" << __PRETTY_FUNCTION__
std::cout << Name() << "::" << m_detector << "::" << __PRETTY_FUNCTION__
<< " " << RawTowerNodeName << " Node missing, exiting!"
<< std::endl;
gSystem->Exit(1);
Expand Down
63 changes: 31 additions & 32 deletions offline/packages/CaloReco/ClusterCDFCalculator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
#include <TMatrixD.h>
#include <TVectorD.h>

#include <boost/format.hpp>

#include <iostream>
#include <format>
Comment thread
coderabbitai[bot] marked this conversation as resolved.

ClusterCDFCalculator::~ClusterCDFCalculator()
{
Expand Down Expand Up @@ -94,9 +93,9 @@ void ClusterCDFCalculator::LoadHistogramsAndMatrices()
for (int binidx = 0; binidx < nBins; ++binidx)
{
// photon hist
std::string hD2_3x3_name_photon = (boost::format("h_photon_hD2_3x3_en%d") % binidx).str();
std::string hD2_5x5_name_photon = (boost::format("h_photon_hD2_5x5_en%d") % binidx).str();
std::string hD2_7x7_name_photon = (boost::format("h_photon_hD2_7x7_en%d") % binidx).str();
std::string hD2_3x3_name_photon = std::format("h_photon_hD2_3x3_en{}", binidx);
std::string hD2_5x5_name_photon = std::format("h_photon_hD2_5x5_en{}", binidx);
std::string hD2_7x7_name_photon = std::format("h_photon_hD2_7x7_en{}", binidx);

file->GetObject(hD2_3x3_name_photon.c_str(), hD2_3x3_photon[binidx]);
file->GetObject(hD2_5x5_name_photon.c_str(), hD2_5x5_photon[binidx]);
Expand All @@ -109,11 +108,11 @@ void ClusterCDFCalculator::LoadHistogramsAndMatrices()
}

TH1 *hD2mean3_photon{nullptr};
file->GetObject((boost::format("h_photon_hD2mean3_en%d") % binidx).str().c_str(), hD2mean3_photon);
file->GetObject(std::format("h_photon_hD2mean3_en{}", binidx).c_str(), hD2mean3_photon);
TH1 *hD2mean5_photon{nullptr};
file->GetObject((boost::format("h_photon_hD2mean5_en%d") % binidx).str().c_str(), hD2mean5_photon);
file->GetObject(std::format("h_photon_hD2mean5_en{}", binidx).c_str(), hD2mean5_photon);
TH1 *hD2mean7_photon{nullptr};
file->GetObject((boost::format("h_photon_hD2mean7_en%d") % binidx).str().c_str(), hD2mean7_photon);
file->GetObject(std::format("h_photon_hD2mean7_en{}", binidx).c_str(), hD2mean7_photon);

if (!hD2mean3_photon || !hD2mean5_photon || !hD2mean7_photon)
{
Expand All @@ -126,40 +125,40 @@ void ClusterCDFCalculator::LoadHistogramsAndMatrices()

for (int i = 0; i < NMATRIX_3x3; ++i)
{
std::string histName = (boost::format("h_photon_heratio_3x3_en%d_%d") % binidx % i).str();
std::string histName = std::format("h_photon_heratio_3x3_en{}_{}", binidx, i);
file->GetObject(histName.c_str(), ratioHistograms_3x3_photon[binidx][i]);
if (!ratioHistograms_3x3_photon[binidx][i])
{
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: photon hist " << histName.c_str() << " is missing." << std::endl;
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: photon hist " << histName << " is missing." << std::endl;
return;
}
}
for (int i = 0; i < NMATRIX_5x5; ++i)
{
std::string histName = (boost::format("h_photon_heratio_5x5_en%d_%d") % binidx % i).str();
std::string histName = std::format("h_photon_heratio_5x5_en{}_{}", binidx, i);
file->GetObject(histName.c_str(), ratioHistograms_5x5_photon[binidx][i]);
if (!ratioHistograms_5x5_photon[binidx][i])
{
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: photon hist " << histName.c_str() << " is missing." << std::endl;
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: photon hist " << histName << " is missing." << std::endl;
return;
}
}
for (int i = 0; i < NMATRIX_7x7; ++i)
{
std::string histName = (boost::format("h_photon_heratio_7x7_en%d_%d") % binidx % i).str();
std::string histName = std::format("h_photon_heratio_7x7_en{}_{}", binidx, i);
file->GetObject(histName.c_str(), ratioHistograms_7x7_photon[binidx][i]);
if (!ratioHistograms_7x7_photon[binidx][i])
{
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: photon hist " << histName.c_str() << " is missing." << std::endl;
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: photon hist " << histName << " is missing." << std::endl;
return;
}
}
TH2 *hCovMatrix3x3_photon{nullptr};
file->GetObject((boost::format("h_photon_hCovMatrix3_en%d") % binidx).str().c_str(), hCovMatrix3x3_photon);
file->GetObject(std::format("h_photon_hCovMatrix3_en{}", binidx).c_str(), hCovMatrix3x3_photon);
TH2 *hCovMatrix5x5_photon{nullptr};
file->GetObject((boost::format("h_photon_hCovMatrix5_en%d") % binidx).str().c_str(), hCovMatrix5x5_photon);
file->GetObject(std::format("h_photon_hCovMatrix5_en{}", binidx).c_str(), hCovMatrix5x5_photon);
TH2 *hCovMatrix7x7_photon{nullptr};
file->GetObject((boost::format("h_photon_hCovMatrix7_en%d") % binidx).str().c_str(), hCovMatrix7x7_photon);
file->GetObject(std::format("h_photon_hCovMatrix7_en{}", binidx).c_str(), hCovMatrix7x7_photon);

if (!hCovMatrix3x3_photon || !hCovMatrix5x5_photon || !hCovMatrix7x7_photon)
{
Expand Down Expand Up @@ -200,9 +199,9 @@ void ClusterCDFCalculator::LoadHistogramsAndMatrices()
}

// pi0 hist
std::string hD2_3x3_name_pi0 = (boost::format("h_pi0_hD2_3x3_en%d") % binidx).str();
std::string hD2_5x5_name_pi0 = (boost::format("h_pi0_hD2_5x5_en%d") % binidx).str();
std::string hD2_7x7_name_pi0 = (boost::format("h_pi0_hD2_7x7_en%d") % binidx).str();
std::string hD2_3x3_name_pi0 = std::format("h_pi0_hD2_3x3_en{}", binidx);
std::string hD2_5x5_name_pi0 = std::format("h_pi0_hD2_5x5_en{}", binidx);
std::string hD2_7x7_name_pi0 = std::format("h_pi0_hD2_7x7_en{}", binidx);

file->GetObject(hD2_3x3_name_pi0.c_str(), hD2_3x3_pi0[binidx]);
file->GetObject(hD2_5x5_name_pi0.c_str(), hD2_5x5_pi0[binidx]);
Expand All @@ -215,11 +214,11 @@ void ClusterCDFCalculator::LoadHistogramsAndMatrices()
}

TH1 *hD2mean3_pi0{nullptr};
file->GetObject((boost::format("h_pi0_hD2mean3_en%d") % binidx).str().c_str(), hD2mean3_pi0);
file->GetObject(std::format("h_pi0_hD2mean3_en{}", binidx).c_str(), hD2mean3_pi0);
TH1 *hD2mean5_pi0{nullptr};
file->GetObject((boost::format("h_pi0_hD2mean5_en%d") % binidx).str().c_str(), hD2mean5_pi0);
file->GetObject(std::format("h_pi0_hD2mean5_en{}", binidx).c_str(), hD2mean5_pi0);
TH1 *hD2mean7_pi0{nullptr};
file->GetObject((boost::format("h_pi0_hD2mean7_en%d") % binidx).str().c_str(), hD2mean7_pi0);
file->GetObject(std::format("h_pi0_hD2mean7_en{}", binidx).c_str(), hD2mean7_pi0);

if (!hD2mean3_pi0 || !hD2mean5_pi0 || !hD2mean7_pi0)
{
Expand All @@ -232,40 +231,40 @@ void ClusterCDFCalculator::LoadHistogramsAndMatrices()

for (int i = 0; i < NMATRIX_3x3; ++i)
{
std::string histName = (boost::format("h_pi0_heratio_3x3_en%d_%d") % binidx % i).str();
std::string histName = std::format("h_pi0_heratio_3x3_en{}_{}", binidx, i);
file->GetObject(histName.c_str(), ratioHistograms_3x3_pi0[binidx][i]);
if (!ratioHistograms_3x3_pi0[binidx][i])
{
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: pi0 hist " << histName.c_str() << " is missing." << std::endl;
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: pi0 hist " << histName << " is missing." << std::endl;
return;
}
}
for (int i = 0; i < NMATRIX_5x5; ++i)
{
std::string histName = (boost::format("h_pi0_heratio_5x5_en%d_%d") % binidx % i).str();
std::string histName = std::format("h_pi0_heratio_5x5_en{}_{}", binidx, i);
file->GetObject(histName.c_str(), ratioHistograms_5x5_pi0[binidx][i]);
if (!ratioHistograms_5x5_pi0[binidx][i])
{
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: pi0 hist " << histName.c_str() << " is missing." << std::endl;
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: pi0 hist " << histName << " is missing." << std::endl;
return;
}
}
for (int i = 0; i < NMATRIX_7x7; ++i)
{
std::string histName = (boost::format("h_pi0_heratio_7x7_en%d_%d") % binidx % i).str();
std::string histName = std::format("h_pi0_heratio_7x7_en{}_{}", binidx, i);
file->GetObject(histName.c_str(), ratioHistograms_7x7_pi0[binidx][i]);
if (!ratioHistograms_7x7_pi0[binidx][i])
{
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: pi0 hist " << histName.c_str() << " is missing." << std::endl;
std::cout << "ClusterCDFCalculator::LoadHistogramsAndMatrices() error: pi0 hist " << histName << " is missing." << std::endl;
return;
}
}
TH2 *hCovMatrix3x3_pi0{nullptr};
file->GetObject((boost::format("h_pi0_hCovMatrix3_en%d") % binidx).str().c_str(), hCovMatrix3x3_pi0);
file->GetObject(std::format("h_pi0_hCovMatrix3_en{}", binidx).c_str(), hCovMatrix3x3_pi0);
TH2 *hCovMatrix5x5_pi0{nullptr};
file->GetObject((boost::format("h_pi0_hCovMatrix5_en%d") % binidx).str().c_str(), hCovMatrix5x5_pi0);
file->GetObject(std::format("h_pi0_hCovMatrix5_en{}", binidx).c_str(), hCovMatrix5x5_pi0);
TH2 *hCovMatrix7x7_pi0{nullptr};
file->GetObject((boost::format("h_pi0_hCovMatrix7_en%d") % binidx).str().c_str(), hCovMatrix7x7_pi0);
file->GetObject(std::format("h_pi0_hCovMatrix7_en{}", binidx).c_str(), hCovMatrix7x7_pi0);

if (!hCovMatrix3x3_pi0 || !hCovMatrix5x5_pi0 || !hCovMatrix7x7_pi0)
{
Expand Down
4 changes: 3 additions & 1 deletion offline/packages/jetbase/JetProbeMaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Jetv2.h"

#include <fun4all/Fun4AllReturnCodes.h>

#include <phool/PHCompositeNode.h>
#include <phool/PHIODataNode.h>
#include <phool/PHNode.h> // for PHNode
Expand All @@ -15,6 +16,7 @@
#include <phool/phool.h> // for PHWHERE

#include <TRandom3.h>

#include <fastjet/PseudoJet.hh>

int JetProbeMaker::process_event(PHCompositeNode * /*topNode*/)
Expand All @@ -29,7 +31,7 @@ int JetProbeMaker::process_event(PHCompositeNode * /*topNode*/)
fastjet::PseudoJet fjet{};
fjet.reset_PtYPhiM(pt, eta, phi);

Jetv2 *jet = (Jetv2 *) _jets->add_jet();
Jetv2 *jet = static_cast<Jetv2 *> (_jets->add_jet());
jet->set_px(fjet.px());
jet->set_py(fjet.py());
jet->set_pz(fjet.pz());
Expand Down
2 changes: 1 addition & 1 deletion offline/packages/jetbase/JetProbeMaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class JetProbeMaker : public SubsysReco
{
public:
JetProbeMaker(const std::string &name = "JetProbeMaker");
~JetProbeMaker() override{};
~JetProbeMaker() override = default;

int process_event(PHCompositeNode * /*topNode*/) override;
int InitRun(PHCompositeNode *topNode) override;
Expand Down
6 changes: 0 additions & 6 deletions offline/packages/trackbase/MvtxEventInfov2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ unsigned int MvtxEventInfov2::get_number_L1s() const
return mySet.size();
}

std::set<uint64_t> MvtxEventInfov2::get_strobe_BCOs() const
{
std::set<uint64_t> mySet = m_strobe_BCOs;
return mySet;
}

std::set<uint64_t> MvtxEventInfov2::get_L1_BCOs() const
{
std::set<uint64_t> mySet;
Expand Down
2 changes: 1 addition & 1 deletion offline/packages/trackbase/MvtxEventInfov2.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MvtxEventInfov2 : public MvtxEventInfo
unsigned int get_number_L1s() const override;

// std::set<uint64_t> get_strobe_BCOs() const;
std::set<uint64_t> get_strobe_BCOs() const override;
std::set<uint64_t> get_strobe_BCOs() const override {return m_strobe_BCOs;}
std::set<uint64_t> get_L1_BCOs() const override;

std::set<uint64_t> get_strobe_BCO_from_L1_BCO(const uint64_t ival) const override;
Expand Down
Loading