Move root cause signature into service data object

This allows the analysis code to access the signature from the service
data object instead of passing around two variables in all of those
functions.

Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: Ib85386759068aee26dc1e8b9e8d609daf7e63c1b
diff --git a/analyzer/service_data.hpp b/analyzer/service_data.hpp
index 560fc72..ffd0804 100644
--- a/analyzer/service_data.hpp
+++ b/analyzer/service_data.hpp
@@ -1,5 +1,6 @@
 #pragma once
 
+#include <hei_main.hpp>
 #include <nlohmann/json.hpp>
 
 namespace analyzer
@@ -203,8 +204,13 @@
 class ServiceData
 {
   public:
-    /** @brief Default constructor. */
-    ServiceData() = default;
+    /**
+     * @brief Constructor from components.
+     * @param The signature of the root cause attention.
+     */
+    explicit ServiceData(const libhei::Signature& i_rootCause) :
+        iv_rootCause(i_rootCause)
+    {}
 
     /** @brief Destructor. */
     ~ServiceData() = default;
@@ -216,6 +222,9 @@
     ServiceData& operator=(const ServiceData&) = default;
 
   private:
+    /** The signature of the root cause attention. */
+    const libhei::Signature iv_rootCause;
+
     /** The list of callouts that will be added to a PEL. */
     std::vector<std::shared_ptr<Callout>> iv_calloutList;
 
@@ -225,6 +234,12 @@
     std::vector<std::shared_ptr<Guard>> iv_guardList;
 
   public:
+    /** @return The signature of the root cause attention. */
+    const libhei::Signature& getRootCause() const
+    {
+        return iv_rootCause;
+    }
+
     /** Add a callout to the list. */
     void addCallout(const std::shared_ptr<Callout>& i_callout)
     {