67 bool isReserved = plist->getIsReserved();
69 plist->setEditable(
true);
71 const unsigned int origSize = plist->getListSize();
72 std::vector<Particle*> copies(origSize);
74 for (
unsigned i = 0; i < origSize; i++) {
75 const Particle* origP = plist->getParticle(i);
84 for (
unsigned i = 0; i < origSize; i++)
85 plist->addParticle(copies[i]);
87 unsigned int copySize = plist->getListSize();
90 if (copySize != origSize)
91 B2FATAL(
"Size of the ParticleList " << inputListName
92 <<
" has changed while copying the Particles! original size = "
93 << origSize <<
" vs. new size = " << copySize);
96 plist->setEditable(
false);
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
std::vector< std::string > m_inputListNames
input ParticleList names
Class to store reconstructed particles.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Particle * copyParticle(const Particle *original)
Function takes argument Particle and creates a copy of it and copies of all its (grand-)^n-daughters.