From 095a9ffa255e089c84d6d298bd2dd0c9af35f884 Mon Sep 17 00:00:00 2001
From: "Stephen A. Wood" <saw@jlab.org>
Date: Thu, 14 Sep 2017 15:57:24 -0400
Subject: [PATCH] Strip comments from scaler config DB file lines

---
 src/THcScalerEvtHandler.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/THcScalerEvtHandler.cxx b/src/THcScalerEvtHandler.cxx
index 9a002c4..12dc28d 100644
--- a/src/THcScalerEvtHandler.cxx
+++ b/src/THcScalerEvtHandler.cxx
@@ -353,7 +353,8 @@ THaAnalysisObject::EStatus THcScalerEvtHandler::Init(const TDatime& date)
   vector<string> dbline;
 
   while( fgets(cbuf, LEN, fi) != NULL) {
-    std::string sinput(cbuf);
+    std::string sin(cbuf);
+    std::string sinput(sin.substr(0,sin.find_first_of("#")));
     if (fDebugFile) *fDebugFile << "string input "<<sinput<<endl;
     dbline = vsplit(sinput);
     if (dbline.size() > 0) {
-- 
GitLab