diff --git a/DataQuality/dqm_algorithms/cmt/requirements b/DataQuality/dqm_algorithms/cmt/requirements index 5cfe75e4e99f8ed252a740ac306e9831f2d1c783..8d721075aae9a0c10764696df95595fe21b17436 100644 --- a/DataQuality/dqm_algorithms/cmt/requirements +++ b/DataQuality/dqm_algorithms/cmt/requirements @@ -12,6 +12,10 @@ use AtlasROOT AtlasROOT-* External use AtlasBoost AtlasBoost-* External use DQM_Core DQM_Core-* External +# Specify the required Boost and ROOT components for cmake (transparent to CMT) +apply_pattern cmake_add_command command="find_package(Boost COMPONENTS program_options)" +apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS MathCore Hist)" + # online options (only when building against AtlasHLT) macro online_use "" AtlasHLT_scripts "HLTtdaq HLTtdaq-* HLT/HLTExternal" use $(online_use) diff --git a/DataQuality/dqm_algorithms/dqm_algorithms/tools/DumpConfig.h b/DataQuality/dqm_algorithms/dqm_algorithms/tools/DumpConfig.h index 28913085800541cf3360a93464e446cffbdb63f8..50515821b783f5060623389c434ace76a71cf397 100644 --- a/DataQuality/dqm_algorithms/dqm_algorithms/tools/DumpConfig.h +++ b/DataQuality/dqm_algorithms/dqm_algorithms/tools/DumpConfig.h @@ -17,7 +17,7 @@ namespace dqm_algorithms { namespace tools { - class DumpConfig{ + class DumpConfig { public: DumpConfig(std::string ParameterName,dqm_core::test::DummyAlgorithmConfig & config, std::string algorithmname, std::string histogramname, std::string reffilename="", std::string refhistogramname="", float weight=1.,std::string regionname="" ); ~DumpConfig(); @@ -32,7 +32,7 @@ namespace dqm_algorithms void DumpRegion(); void DumpAgent(); - ofstream _myfile; + std::ofstream _myfile; std::map<std::string,double> params; std::map<std::string,double> gthresh; std::map<std::string,double> rthresh; diff --git a/DataQuality/dqm_algorithms/src/MDTCluster.cxx b/DataQuality/dqm_algorithms/src/MDTCluster.cxx index f2cc423e9597cc2287f59a15bc53795e2e429a58..c77f46bf389c6d6e30f8e315b8ca0192a7368b92 100644 --- a/DataQuality/dqm_algorithms/src/MDTCluster.cxx +++ b/DataQuality/dqm_algorithms/src/MDTCluster.cxx @@ -231,7 +231,7 @@ MDTCluster::execute( const std::string& name, const TObject& object, const dqm_c result->tags_["00-N_clusters"] = clusters.size(); std::string Cluster="Cluster_"; - char num[2]; + char num[3]; std::string Size="_info_1_size"; std::string start_at_bin="_info_2_start_at_bin"; std::string finish_at_bin="_info_3_finish_at_bin"; diff --git a/DataQuality/dqm_algorithms/tools/AlgorithmHelper.cxx b/DataQuality/dqm_algorithms/tools/AlgorithmHelper.cxx index 78c1844c5e174dba04cd1cc6d3c118c6bcca1400..f58c699d833af051cc3d51196aeae53fee49f18b 100644 --- a/DataQuality/dqm_algorithms/tools/AlgorithmHelper.cxx +++ b/DataQuality/dqm_algorithms/tools/AlgorithmHelper.cxx @@ -26,6 +26,14 @@ #include <dqm_core/AlgorithmManager.h> #include <dqm_core/LibraryManager.h> +// MN: ROOT6 is more const-correct +#if ROOT_VERSION_CODE > ROOT_VERSION(6,0,0) +# define ROOT6_CONST const +#else +# define ROOT6_CONST +#endif + + std::map<std::string, double > dqm_algorithms::tools::GetFitParams(const TF1 * func ) { @@ -359,8 +367,8 @@ double dqm_algorithms::tools::GetFirstFromMap(const std::string ¶mName, cons std::vector<int> dqm_algorithms::tools::GetBinRange(const TH1 *h, const std::map<std::string, double > ¶ms) { std::vector<int> range; - TAxis *xAxis = h->GetXaxis(); - TAxis *yAxis = h->GetYaxis(); + ROOT6_CONST TAxis *xAxis = h->GetXaxis(); + ROOT6_CONST TAxis *yAxis = h->GetYaxis(); if (h->GetDimension() > 2) { throw dqm_core::BadConfig(ERS_HERE, h->GetName(), "histogram has more than 2 dimensions"); @@ -451,11 +459,11 @@ dqm_algorithms::tools::DivideByHistogram(const TH1* hNumerator, const TH1* hDeno //Handle division for case where denominator has lower dimension than numerator: //There are only a few possibilities, hNdimension = 2 or 3, hDdimension = 1 or 2. - TAxis* xax = hNumerator->GetXaxis(); + ROOT6_CONST TAxis* xax = hNumerator->GetXaxis(); int nbinsx = xax->GetNbins(); - TAxis* yax = hNumerator->GetYaxis(); + ROOT6_CONST TAxis* yax = hNumerator->GetYaxis(); int nbinsy = yax->GetNbins(); - TAxis* zax = hNumerator->GetZaxis(); + ROOT6_CONST TAxis* zax = hNumerator->GetZaxis(); int nbinsz = zax->GetNbins(); if( nbinsx != hDenominator->GetNbinsX() ) { @@ -517,11 +525,11 @@ dqm_algorithms::tools::DivideByHistogram(const TH1* hNumerator, const TH1* hDeno //Handle division for case where the numerator has lower dimension than the denominator //There are only a few possibilities, hNdimension = 1 or 2, hDdimension = 2 or 3. - TAxis* xax = hDenominator->GetXaxis(); + ROOT6_CONST TAxis* xax = hDenominator->GetXaxis(); int nbinsx = xax->GetNbins(); - TAxis* yax = hDenominator->GetYaxis(); + ROOT6_CONST TAxis* yax = hDenominator->GetYaxis(); int nbinsy = yax->GetNbins(); - TAxis* zax = hDenominator->GetZaxis(); + ROOT6_CONST TAxis* zax = hDenominator->GetZaxis(); int nbinsz = zax->GetNbins(); if( nbinsx != hNumerator->GetNbinsX() ) {