Commit 27dd54925829eba17cc716cf01144cc350ff9b80

Authored by Michael Mayer
1 parent 731ae08b

GCTACubeSourceDiffuse now returns a const GNodeArray

inst/cta/include/GCTACubeSourceDiffuse.hpp
... ... @@ -83,7 +83,7 @@ public:
83 83 const GSkyDir& srcDir,
84 84 const GEnergy& srcEng,
85 85 const GTime& srcTime) const;
86   - GNodeArray nodes(void) const;
  86 + const GNodeArray& nodes(void) const;
87 87  
88 88 protected:
89 89 // Protected methods
... ... @@ -147,7 +147,7 @@ double GCTACubeSourceDiffuse::irf(const int& pixel, const int& iebin) const
147 147 * Returns node array of energy values
148 148 ***************************************************************************/
149 149 inline
150   -GNodeArray GCTACubeSourceDiffuse::nodes(void) const
  150 +const GNodeArray& GCTACubeSourceDiffuse::nodes(void) const
151 151 {
152 152 return (m_logE);
153 153 }
... ...
inst/cta/src/GCTAResponseCube.cpp
... ... @@ -1460,7 +1460,7 @@ double GCTAResponseCube::irf_diffuse(const GEvent& event,
1460 1460 if (use_edisp()) {
1461 1461  
1462 1462 // Get array of log10TeV energies of cached diffuse model
1463   - GNodeArray logE = cache->nodes();
  1463 + const GNodeArray& logE = cache->nodes();
1464 1464  
1465 1465 // Get true energy
1466 1466 GEnergy srcEng = source.energy();
... ...