Skip to content
Snippets Groups Projects
Commit b784f389 authored by Markus Frank's avatar Markus Frank Committed by MarkusFrankATcernch
Browse files

Fix boost and other compiler warnings

parent ec321000
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define JSON_DOCUMENTHANDLER_H #define JSON_DOCUMENTHANDLER_H
/// Framework include files /// Framework include files
#include "JSON/Elements.h" #include <JSON/Elements.h>
/// Namespace for the AIDA detector description toolkit /// Namespace for the AIDA detector description toolkit
namespace dd4hep { namespace dd4hep {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <stdexcept> #include <stdexcept>
// Framework include files // Framework include files
#include "JSON/config.h" #include <JSON/config.h>
#ifndef RAD_2_DEGREE #ifndef RAD_2_DEGREE
#define RAD_2_DEGREE 57.295779513082320876798154814105 #define RAD_2_DEGREE 57.295779513082320876798154814105
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
#define DD4HEP_USE_BOOST_JSON 1 #define DD4HEP_USE_BOOST_JSON 1
#include "boost/property_tree/ptree.hpp" #include <boost/bind/bind.hpp>
#include <boost/property_tree/ptree.hpp>
/// Namespace for the AIDA detector description toolkit /// Namespace for the AIDA detector description toolkit
namespace dd4hep { namespace dd4hep {
......
...@@ -12,10 +12,12 @@ ...@@ -12,10 +12,12 @@
//========================================================================== //==========================================================================
// Framework include files // Framework include files
#include "JSON/DocumentHandler.h" #define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include <JSON/Helper.h>
#include <JSON/DocumentHandler.h>
// C/C++ include files // C/C++ include files
#include "boost/property_tree/json_parser.hpp" #include <boost/property_tree/json_parser.hpp>
#include <memory> #include <memory>
#include <stdexcept> #include <stdexcept>
......
...@@ -26,19 +26,20 @@ ...@@ -26,19 +26,20 @@
*/ */
// Framework inlcude files // Framework inlcude files
#include "JSON/Helper.h" #define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include "JSON/DocumentHandler.h" #include <JSON/Helper.h>
#include "JSON/Conversions.h" #include <JSON/DocumentHandler.h>
#include "DD4hep/Plugins.h" #include <JSON/Conversions.h>
#include "DD4hep/Printout.h" #include <DD4hep/Plugins.h>
#include "DD4hep/IDDescriptor.h" #include <DD4hep/Printout.h>
#include "DD4hep/detail/SegmentationsInterna.h" #include <DD4hep/IDDescriptor.h>
#include "DD4hep/detail/DetectorInterna.h" #include <DD4hep/detail/SegmentationsInterna.h>
#include "DD4hep/detail/ObjectsInterna.h" #include <DD4hep/detail/DetectorInterna.h>
#include <DD4hep/detail/ObjectsInterna.h>
// C/C++ include files // C/C++ include files
#include <iostream> #include <iostream>
#include "boost/property_tree/json_parser.hpp" #include <boost/property_tree/json_parser.hpp>
namespace { namespace {
class Json; class Json;
......
...@@ -48,7 +48,7 @@ namespace dd4hep { ...@@ -48,7 +48,7 @@ namespace dd4hep {
Geant4FastSimHandler() = delete; Geant4FastSimHandler() = delete;
/// Initializing constructor /// Initializing constructor
Geant4FastSimHandler(const Geant4FastSimSpot* sp) Geant4FastSimHandler(const Geant4FastSimSpot* sp)
: Geant4HitHandler(sp->primary, sp->touchable), spot(sp) : Geant4HitHandler(sp->primary, sp->touchable), spot(sp)
{ {
} }
/// No copy constructor /// No copy constructor
...@@ -61,7 +61,7 @@ namespace dd4hep { ...@@ -61,7 +61,7 @@ namespace dd4hep {
Geant4FastSimHandler& operator=(Geant4FastSimHandler&& copy) = delete; Geant4FastSimHandler& operator=(Geant4FastSimHandler&& copy) = delete;
/// Returns total energy deposit /// Returns total energy deposit
double energy() const { double energy() const {
return spot->hit->GetEnergy(); return spot->hit->GetEnergy();
} }
/// Return track momentum in DD4hep notation /// Return track momentum in DD4hep notation
Momentum momentum() const { Momentum momentum() const {
...@@ -84,14 +84,14 @@ namespace dd4hep { ...@@ -84,14 +84,14 @@ namespace dd4hep {
} }
/// Returns the track momentum as a G4ThreeVector /// Returns the track momentum as a G4ThreeVector
G4ThreeVector momentumG4() const { G4ThreeVector momentumG4() const {
return track->GetMomentum(); return track->GetMomentum();
} }
/// Access the enery deposit of the energy spot /// Access the enery deposit of the energy spot
double deposit() const { double deposit() const {
return spot->hit->GetEnergy(); return spot->hit->GetEnergy();
} }
G4VPhysicalVolume* volume() const { G4VPhysicalVolume* volume() const {
return touchable()->GetVolume(); return touchable()->GetVolume();
} }
G4LogicalVolume* logvol() const { G4LogicalVolume* logvol() const {
return volume()->GetLogicalVolume(); return volume()->GetLogicalVolume();
...@@ -103,12 +103,12 @@ namespace dd4hep { ...@@ -103,12 +103,12 @@ namespace dd4hep {
G4LogicalVolume* lv = logvol(); G4LogicalVolume* lv = logvol();
return lv ? lv->GetSensitiveDetector() : 0; return lv ? lv->GetSensitiveDetector() : 0;
} }
const char* sdName(const char* undefined = "") const { std::string sdName(const std::string& undefined = "") const {
G4VSensitiveDetector* s = sd(); G4VSensitiveDetector* s = sd();
return s ? s->GetName().c_str() : undefined; return s ? s->GetName() : undefined;
} }
bool isSensitive() const { bool isSensitive() const {
G4LogicalVolume* lv = logvol(); G4LogicalVolume* lv = logvol();
return lv ? (0 != lv->GetSensitiveDetector()) : false; return lv ? (0 != lv->GetSensitiveDetector()) : false;
} }
}; };
......
...@@ -165,7 +165,7 @@ namespace dd4hep { ...@@ -165,7 +165,7 @@ namespace dd4hep {
G4LogicalVolume* lv = logvol(p); G4LogicalVolume* lv = logvol(p);
return lv ? lv->GetSensitiveDetector() : 0; return lv ? lv->GetSensitiveDetector() : 0;
} }
const char* sdName(const G4StepPoint* p, const char* undefined = "") const { std::string sdName(const G4StepPoint* p, const std::string& undefined = "") const {
G4VSensitiveDetector* s = sd(p); G4VSensitiveDetector* s = sd(p);
return s ? s->GetName().c_str() : undefined; return s ? s->GetName().c_str() : undefined;
} }
......
...@@ -112,9 +112,9 @@ int main() { ...@@ -112,9 +112,9 @@ int main() {
dd4hep::DDSegmentation::CellID cid = seg.cellID(locPos, globPos, volID); dd4hep::DDSegmentation::CellID cid = seg.cellID(locPos, globPos, volID);
const long long phiShifted(pB << phiBitOffset); const dd4hep::FieldID phiShifted(pB << phiBitOffset);
const long long rShifted (rB << rBitOffset); const dd4hep::FieldID rShifted (rB << rBitOffset);
const long long expectedID(rShifted + phiShifted); const dd4hep::CellID expectedID(rShifted + phiShifted);
test( expectedID , cid , " Test get ID From Position" ); test( expectedID , cid , " Test get ID From Position" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment