Commit f1ef0262 authored by Mateusz Dyndal's avatar Mateusz Dyndal
Browse files

fixing memory leak and compiler warning

parent f1937cc1
......@@ -43,11 +43,11 @@ public:
virtual StatusCode fillEvt (HepMC::GenEvent* evt);
protected:
bool m_lheOutput;
int m_maxevents;
// event counter
int m_events;
int m_events;
bool m_lheOutput;
unsigned int m_maxevents;
starlight* m_starlight; // pointer to starlight instance
inputParameters m_inputParameters; // pointer to parameter instance
......
......@@ -46,8 +46,8 @@ namespace{
#include "starlightparticlecodes.h"
Starlight_i::Starlight_i(const std::string& name, ISvcLocator* pSvcLocator):
GenModule(name,pSvcLocator), m_lheOutput(false),
m_events(0),
GenModule(name,pSvcLocator), m_events(0),
m_lheOutput(false),
m_maxevents(5500),
m_starlight(),
m_inputParameters(),
......@@ -309,8 +309,9 @@ Starlight_i::starlight2lhef()
lheStream << " 11 -11 2.510000e+03 2.510000e+03 0 0 0 0 3 1\n";
lheStream << " 1.000000e+00 0.000000e+00 1.000000e+00 9999\n";
lheStream << "</init>\n";
m_event = new upcEvent;
std::unique_ptr<upcEvent> m_event(new upcEvent);
for(unsigned int i=0; i<m_maxevents; i++) {
lheStream << "<event>\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment