From 9923c935a02c51c1be9c8004a8ab69894db62287 Mon Sep 17 00:00:00 2001 From: Florian Uhlig <f.uhlig@gsi.de> Date: Fri, 16 Apr 2021 10:07:40 +0200 Subject: [PATCH] Fix compiler errors with newer FairSoft/FairRoot versions Add missing include statements. With FairSoft apr21 and/or FairRoot v18.6.2 some implicitly included header files aren't found any longer. Add include statements for these header files explicitly. --- .../papaframework/PairAnalysisMetaData.cxx | 1 + .../papaframework/PairAnalysisSpectrum.cxx | 1 + core/config/CbmConfigBase.h | 1 + fles/cosy2019/unpacker/CbmStsCoincHodo.cxx | 1 + .../cbm/qa/material/CbmLitCheckBrem.cxx | 26 ++++++++++++------- sim/response/base/CbmDigitization.cxx | 1 + 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/analysis/PWGDIL/dielectron/papaframework/PairAnalysisMetaData.cxx b/analysis/PWGDIL/dielectron/papaframework/PairAnalysisMetaData.cxx index 353f2944ec..93bf1a40fb 100644 --- a/analysis/PWGDIL/dielectron/papaframework/PairAnalysisMetaData.cxx +++ b/analysis/PWGDIL/dielectron/papaframework/PairAnalysisMetaData.cxx @@ -16,6 +16,7 @@ /////////////////////////////////////////////////////////////////////////// #include <TCollection.h> +#include <TDatime.h> #include <TList.h> #include <TPad.h> #include <TROOT.h> diff --git a/analysis/PWGDIL/dielectron/papaframework/PairAnalysisSpectrum.cxx b/analysis/PWGDIL/dielectron/papaframework/PairAnalysisSpectrum.cxx index c71335e94e..0641f23280 100644 --- a/analysis/PWGDIL/dielectron/papaframework/PairAnalysisSpectrum.cxx +++ b/analysis/PWGDIL/dielectron/papaframework/PairAnalysisSpectrum.cxx @@ -56,6 +56,7 @@ #include <TGraphErrors.h> #include <TH1.h> #include <TList.h> +#include <TObjString.h> #include <TPad.h> #include <TPaveText.h> #include <TProfile.h> diff --git a/core/config/CbmConfigBase.h b/core/config/CbmConfigBase.h index 7129c88e67..870816027a 100644 --- a/core/config/CbmConfigBase.h +++ b/core/config/CbmConfigBase.h @@ -12,6 +12,7 @@ #include <iostream> #include <map> #include <regex> +#include <set> namespace pt = boost::property_tree; diff --git a/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx b/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx index 4e67af6eb6..0ed438cff1 100644 --- a/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx +++ b/fles/cosy2019/unpacker/CbmStsCoincHodo.cxx @@ -16,6 +16,7 @@ #include "FairRunOnline.h" #include "TClonesArray.h" +#include "TFile.h" #include "TH1.h" #include "TH2.h" #include "TH3.h" diff --git a/reco/littrack/cbm/qa/material/CbmLitCheckBrem.cxx b/reco/littrack/cbm/qa/material/CbmLitCheckBrem.cxx index 088918db98..827f2c9537 100644 --- a/reco/littrack/cbm/qa/material/CbmLitCheckBrem.cxx +++ b/reco/littrack/cbm/qa/material/CbmLitCheckBrem.cxx @@ -12,10 +12,13 @@ #include "TPad.h" #include "TStyle.h" -#include <cmath> #include <cstdlib> +#include <iostream> + +#include <cmath> -CbmLitCheckBrem::CbmLitCheckBrem() : fMat("iron") { +CbmLitCheckBrem::CbmLitCheckBrem() : fMat("iron") +{ fNofMom = 10; fMom.resize(fNofMom); fMom[0] = 0.05; // GeV @@ -94,7 +97,8 @@ CbmLitCheckBrem::CbmLitCheckBrem() : fMat("iron") { CbmLitCheckBrem::~CbmLitCheckBrem() {} -void CbmLitCheckBrem::Check() { +void CbmLitCheckBrem::Check() +{ gStyle->SetCanvasColor(kWhite); gStyle->SetFrameFillColor(kWhite); gStyle->SetPadColor(kWhite); @@ -107,7 +111,8 @@ void CbmLitCheckBrem::Check() { DrawGraphs(); } -void CbmLitCheckBrem::DrawGraphs() { +void CbmLitCheckBrem::DrawGraphs() +{ TCanvas* c1 = new TCanvas("brem_loss", "c1", 800, 800); c1->SetGrid(); @@ -166,7 +171,8 @@ void CbmLitCheckBrem::DrawGraphs() { c1->SaveAs("brem_loss.svg"); } -void CbmLitCheckBrem::FillGraphs() { +void CbmLitCheckBrem::FillGraphs() +{ for (Int_t i = 0; i < fNofMom; i++) { Double_t p = fMom[i]; @@ -175,20 +181,20 @@ void CbmLitCheckBrem::FillGraphs() { // Double_t brem_calc = p / (m.fX0); // Double_t Z2 = (m.fZ*m.fZ); // Double_t X0 = 1./(m.fA * 716.408) * (Z2 * (std::log(184.15/std::pow(Z, 1./3.)) ) + Z*) - Double_t X0 = - (716.4 * m.fA) / (m.fZ * (m.fZ + 1) * std::log(287. / std::sqrt(m.fZ))); + Double_t X0 = (716.4 * m.fA) / (m.fZ * (m.fZ + 1) * std::log(287. / std::sqrt(m.fZ))); std::cout << "X0=" << m.fX0 * m.fRho << " X0calc=" << X0 << std::endl; Double_t brem_calc = p / X0; fCalc[j]->SetPoint(i, p, brem_calc); - Double_t brem_table = (6.022045e23 / m.fA) * 5.794661e-28 * (m.fZ * m.fZ) - * (p + 0.000511) * m.fPHIRAD[i]; // * m.fRho; + Double_t brem_table = + (6.022045e23 / m.fA) * 5.794661e-28 * (m.fZ * m.fZ) * (p + 0.000511) * m.fPHIRAD[i]; // * m.fRho; fTable[j]->SetPoint(i, p, brem_table); } } } -void CbmLitCheckBrem::CreateGraphs() { +void CbmLitCheckBrem::CreateGraphs() +{ for (int i = 0; i < fNofMaterials; i++) { fTable[i] = new TGraph(); fCalc[i] = new TGraph(); diff --git a/sim/response/base/CbmDigitization.cxx b/sim/response/base/CbmDigitization.cxx index 6dd7585f98..4b57c9a170 100644 --- a/sim/response/base/CbmDigitization.cxx +++ b/sim/response/base/CbmDigitization.cxx @@ -26,6 +26,7 @@ #include "TClonesArray.h" #include "TGeoManager.h" +#include "TObjString.h" #include "TROOT.h" #include <cassert> -- GitLab