Message: Re: Save vectors into Ntuples Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Save vectors into Ntuples 

Forum: Analysis
Re: Question Save vectors into Ntuples
Re: None Re: Save vectors into Ntuples (Ivana Hrivnacova)
Re: None Re: Save vectors into Ntuples
Date: Jan 14, 02:59
From: Ivana Hrivnacova <Ivana Hrivnacova>

The problem is in your <DetectorHit.hh>, where you pass the reference to the vector defined in RunAction instead of the address.

Could you try to change it as follows:


class DetectorHit: public G4VHit
  virtual ~DetectorHit();
  DetectorHit(const DetectorHit& right);
  const DetectorHit& operator=(const DetectorHit& right);
  int operator==(const DetectorHit& right) const;
  inline void* operator new(size_t);
  inline void  operator delete(void* hit);
  void SetEdepAddr(std::vector<G4double>* EdepAddr) {fEdep = EdepAddr;} // changed
  void AppendEdep(G4double Edep) {fEdep->push_back(Edep);}  // changed
  std::vector<G4double>* GetEdep() const {return fEdep;}  // changed
  std::vector<G4double>* fEdep;  // changed

Best regards,

 Add Message Add Message
to: "Re: Save vectors into Ntuples"

 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 ]