Skip to content

Commit

Permalink
Merge pull request #7 from DUNE/6-avoid-warining-during-compilation
Browse files Browse the repository at this point in the history
6 avoid warining during compilation
  • Loading branch information
mt82 authored Oct 18, 2023
2 parents 64e8c65 + bf257d4 commit 87d8d84
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 31 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ target_include_directories(Struct PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_link_libraries(Struct PUBLIC)
ROOT_GENERATE_DICTIONARY(StructDict struct.h MODULE Struct LINKDEF include/Linkdef.h)
ROOT_GENERATE_DICTIONARY(StructDict struct.h MODULE Struct LINKDEF include/StructLinkDef.h)

# Create SANDGeoManager lib
add_library(SANDGeoManager SHARED src/SANDGeoManager.cpp src/SANDSTTTubeInfo.cpp src/SANDECALCellInfo.cpp)
target_link_libraries(SANDGeoManager PUBLIC EDepSim::edepsim_io)
ROOT_GENERATE_DICTIONARY(SANDGeoManagerDict SANDGeoManager.h SANDSTTTubeInfo.h SANDECALCellInfo.h MODULE SANDGeoManager LINKDEF include/Linkdef.h)
ROOT_GENERATE_DICTIONARY(SANDGeoManagerDict SANDGeoManager.h SANDSTTTubeInfo.h SANDECALCellInfo.h MODULE SANDGeoManager LINKDEF include/SANDGeoManagerLinkDef.h)

# Creates a libUtils shared library
add_library(Utils SHARED src/utils.cpp src/transf.cpp)
Expand Down
23 changes: 0 additions & 23 deletions include/Linkdef.h

This file was deleted.

4 changes: 4 additions & 0 deletions include/SANDGeoManagerLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifdef __CINT__

#pragma link C++ class SANDGeoManager + ;
#endif
23 changes: 23 additions & 0 deletions include/StructLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifdef __CINT__
//#include "struct.h"

//#pragma link C++ class std::map < int, std::vector < double>> + ;
//#pragma link C++ class std::map < int, std::vector < int>> + ;
//#pragma link C++ class std::map < int, double> + ;
//#pragma link C++ class std::vector < pe> + ;
//#pragma link C++ class std::vector < dg_ps> + ;
//#pragma link C++ class std::vector < dg_cell> + ;
//#pragma link C++ class std::map < std::string, std::vector < hit>> + ;
//#pragma link C++ class std::vector < dg_tube> + ;
//#pragma link C++ class std::vector < track> + ;
//#pragma link C++ class std::vector < cluster> + ;
//#pragma link C++ class std::vector < particle> + ;
//#pragma link C++ class pe + ;
//#pragma link C++ class dg_ps + ;
//#pragma link C++ class dg_tube + ;
//#pragma link C++ class dg_cell + ;
//#pragma link C++ class cluster + ;
//#pragma link C++ class track + ;
//#pragma link C++ class particle + ;
#pragma link C++ class event + ;
#endif
8 changes: 8 additions & 0 deletions src/SANDEventDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,10 @@ void SANDEventDisplay::SetSimData(TString fileName)
return;
}

if (!geo) {
cout << "<INFO> Geometry name: " << geo->GetName() << endl;
}

if (!fGeomInitialized) {
// sand_reco::init(geo);
fGeomInitialized = true;
Expand Down Expand Up @@ -1212,6 +1216,10 @@ void SANDEventDisplay::SetDigitData(TString fileName)
return;
}

if (!geo) {
cout << "<INFO> Geometry name: " << geo->GetName() << endl;
}

if (!fGeomInitialized) {
// sand_reco::init(geo);
fGeomInitialized = true;
Expand Down
7 changes: 7 additions & 0 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ void show(int index, bool showtrj, bool showede, bool showdig, bool showrec)
case 22:
tr_zy->SetLineStyle(7);
tr_zx->SetLineStyle(7);
[[fallthrough]];
// e+/e-
case 11:
case -11:
Expand Down Expand Up @@ -922,6 +923,7 @@ void showPri(int index)
// photons
case 22:
par->SetLineStyle(7);
[[fallthrough]];
// e+/e-
case 11:
case -11:
Expand Down Expand Up @@ -983,6 +985,7 @@ void showPri(int index)
// photons
case 22:
par->SetLineStyle(7);
[[fallthrough]];
// e+/e-
case 11:
case -11:
Expand Down Expand Up @@ -1044,6 +1047,7 @@ void showPri(int index)
// photons
case 22:
par->SetLineStyle(7);
[[fallthrough]];
// e+/e-
case 11:
case -11:
Expand Down Expand Up @@ -1238,6 +1242,7 @@ void showPri(int index)
// photons
case 22:
par->SetLineStyle(7);
[[fallthrough]];
// e+/e-
case 11:
case -11:
Expand Down Expand Up @@ -1303,6 +1308,7 @@ void showPri(int index)
// photons
case 22:
par->SetLineStyle(7);
[[fallthrough]];
// e+/e-
case 11:
case -11:
Expand Down Expand Up @@ -1368,6 +1374,7 @@ void showPri(int index)
// photons
case 22:
par->SetLineStyle(7);
[[fallthrough]];
// e+/e-
case 11:
case -11:
Expand Down
11 changes: 5 additions & 6 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,12 @@ void sand_reco::fluka::ecal::CellPosition(TGeoManager* geo, int det, int mod,
int lay, int cel, double& x,
double& y, double& z)
{
x = 0;
y = 0;
z = 0;

double dummyLoc[3];
double dummyMas[3];
double dummyMas[3] = {0., 0., 0.};

if (mod < 24) {

double dummyLoc[3];

// Local coordinates calculation
dummyLoc[0] = cellCoordBarrel[mod][lay][cel][0];
dummyLoc[1] = cellCoordBarrel[mod][lay][cel][1];
Expand All @@ -642,6 +639,8 @@ void sand_reco::fluka::ecal::CellPosition(TGeoManager* geo, int det, int mod,
// left x < 0 : c->mod = 40
{

double dummyLoc[3];

// Local coordinates calculation
dummyLoc[0] = cellCoordEndcap[int(mod / 10)][lay][cel][0];
dummyLoc[1] = cellCoordEndcap[int(mod / 10)][lay][cel][1];
Expand Down

0 comments on commit 87d8d84

Please sign in to comment.