Message: Re: thread merge problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: thread merge problem 

Forum: Multithreading
Re: Question thread merge problem (Huan Yao)
Re: None Re: thread merge problem (Ivana Hrivnacova)
Re: None Re: thread merge problem (Huan Yao)
Date: 23 Jan, 2017
From: Ivana Hrivnacova <Ivana Hrivnacova>

I think, that the problem is in creating the vector columns, here:
    analysisManager->CreateNtupleIColumn("vec_int", vector<int> vi);
    analysisManager->CreateNtupleDColumn("vec_double", vector<int> vd);

The function prototype is:
  // Create columns of vector in the ntuple with given id
  G4int CreateNtupleXColumn(G4int ntupleId, 
          const G4String& name, std::vector<Xtype>& vector);

so you have to pass a reference to a vector which instance will persist during event processing; the best way is to define it as a data member of a class, where you fill its values.

An example of using vector columns is now available in basic/B5 example. See B5EventAction and B4RunAction classes in this example.

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

1 None: Re: thread merge problem   (Huan Yao - 27 Jan, 2017)
(_ None: Re: thread merge problem   (Ivana Hrivnacova - 07 Feb, 2017)
(_ None: Re: thread merge problem   (Huan Yao - 12 Feb, 2017)
(_ None: Re: thread merge problem   (Ivana Hrivnacova - 23 Feb, 2017)
 Add Message Add Message
to: "Re: thread merge problem"

 Subscribe Subscribe

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