From a432317717010998e86368cfe41940f1c3b8f3c6 Mon Sep 17 00:00:00 2001
From: Jan Strube <jan.strube@pnnl.gov>
Date: Mon, 14 Aug 2017 07:44:35 +0900
Subject: [PATCH] Adding a helper to set the name of the MCParticle collection

---
 DDSim/Helper/MCParticles.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 DDSim/Helper/MCParticles.py

diff --git a/DDSim/Helper/MCParticles.py b/DDSim/Helper/MCParticles.py
new file mode 100644
index 000000000..f8ac686f1
--- /dev/null
+++ b/DDSim/Helper/MCParticles.py
@@ -0,0 +1,20 @@
+"""Helper object for files containing one or more MCParticle collections"""
+
+from DDSim.Helper.Input import Input
+
+class MCParticles( Input ):
+  """Configuration for the generator-level InputFiles"""
+  def __init__( self ):
+    super(MCParticles, self).__init__()
+    self._parameters["MCParticleCollectionName"] = "MCParticle"
+
+  @property
+  def mcParticleCollectionName( self ):
+    """Set the name of the collection containing the MCParticle input.
+    Default is "MCParticle".
+    """
+    return self._parameters["MCParticleCollectionName"]
+  @particlesPerEvent.setter
+  def particlesPerEvent( self, val ):
+    self._parameters["MCParticleCollectionName"] = val
+
-- 
GitLab