Message: Add EventAction to examples/extended/medical/dna/microdosimetry in eclipse Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Add EventAction to examples/extended/medical/dna/microdosimetry in eclipse 

Forum: Documentation and Examples
Date: 27 Sep, 2016
From: Huagang Yan <Huagang Yan>

I added class EventAction to the project of Microdosimetry.

When I build it, the following error information follows: undefined reference to 'EventAction::EventAction(RunAction*)', which refers to the command of "EventAction* eventAction = new EventAction(runAction);" in ActionInitialization.cc

EventAction.hh is shown below. Could anyone help me find the cause? I guess the reason might be that I added the header .hh and source .cc file manually, so that the builder might not be smart enough to know my adding the codes. But I don't know how to fix the problem if this is the cause.

Any help on my problem is greatly appreciated.

EventAction.hh:

#ifndef SOURCE_DIRECTORY__INCLUDE_EVENTACTION_HH_
#define SOURCE_DIRECTORY__INCLUDE_EVENTACTION_HH_

#include "G4UserEventAction.hh"
#include "globals.hh"

class RunAction;
...
class EventAction: public G4UserEventAction
{
  public:
    EventAction(RunAction* runAction);
    virtual ~EventAction();

    virtual void BeginOfEventAction(const G4Event* event);
    virtual void EndOfEventAction(const G4Event* event);

    void AddEdep(G4double edep) { eventEnergyDeposit += edep;}

  private:
    RunAction* fRunAction;
    G4double   eventEnergyDeposit;
};

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Add EventAction to examples/extended/medical/dna/microdosimetry in eclipse   (Michael H. Kelsey - 27 Sep, 2016)
(_ Feedback: Re: Add EventAction to examples/extended/medical/dna/microdosimetry in eclipse   (Huagang Yan - 28 Sep, 2016)
 Add Message Add Message
to: "Add EventAction to examples/extended/medical/dna/microdosimetry in eclipse"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]