From 8f8b06ba82db7c8794fff6a44196d12c220ea752 Mon Sep 17 00:00:00 2001
From: Charles Burton <cdb97@cornell.edu>
Date: Tue, 15 Jan 2019 08:33:40 -0600
Subject: [PATCH] make AthMonitorAlgorithm's lumi functions const

---
 .../AthenaMonitoring/AthMonitorAlgorithm.h         | 14 +++++++-------
 .../AthenaMonitoring/src/AthMonitorAlgorithm.cxx   | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h b/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h
index 82a808ab6b6..96f3959ffd3 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h
@@ -201,37 +201,37 @@ public:
     /**
      * Calculate instantaneous number of interactions, i.e. mu.
      */
-    virtual float lbInteractionsPerCrossing();
+    virtual float lbInteractionsPerCrossing() const;
 
     /**
      * Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
      */
-    virtual float lbAverageLuminosity();
+    virtual float lbAverageLuminosity() const;
 
     /**
      * Calculate the instantaneous luminosity per bunch crossing.
      */
-    virtual float lbLuminosityPerBCID();
+    virtual float lbLuminosityPerBCID() const;
 
     /**
      *  Calculate the duration of the luminosity block (in seconds)
      */
-    virtual double lbDuration();
+    virtual double lbDuration() const;
 
     /**
      * Calculate the average luminosity livefraction
      */
-    virtual float lbAverageLivefraction();
+    virtual float lbAverageLivefraction() const;
 
     /**
      * Calculate the live fraction per bunch crossing ID.
      */
-    virtual float livefractionPerBCID();
+    virtual float livefractionPerBCID() const;
 
     /**
      * Calculate the average integrated luminosity multiplied by the live fraction.
      */
-    virtual double lbLumiWeight();
+    virtual double lbLumiWeight() const;
 
     /** @} */ // end of lumi group
 
diff --git a/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx b/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx
index 3fd5b2ce51c..487923e1436 100644
--- a/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx
+++ b/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx
@@ -238,7 +238,7 @@ float AthMonitorAlgorithm::lbAverageInteractionsPerCrossing() const {
 }
 
 
-float AthMonitorAlgorithm::lbInteractionsPerCrossing() {
+float AthMonitorAlgorithm::lbInteractionsPerCrossing() const {
     if ( m_hasRetrievedLumiTool ) {
         float instmu = 0.;
         if (m_lumiTool->muToLumi() > 0.) {
@@ -252,7 +252,7 @@ float AthMonitorAlgorithm::lbInteractionsPerCrossing() {
 }
 
 
-float AthMonitorAlgorithm::lbAverageLuminosity() {
+float AthMonitorAlgorithm::lbAverageLuminosity() const {
     if ( m_hasRetrievedLumiTool ) {
         return m_lumiTool->lbAverageLuminosity();
     } else {
@@ -262,7 +262,7 @@ float AthMonitorAlgorithm::lbAverageLuminosity() {
 }
 
 
-float AthMonitorAlgorithm::lbLuminosityPerBCID() {
+float AthMonitorAlgorithm::lbLuminosityPerBCID() const {
     if ( m_hasRetrievedLumiTool ) {
         return m_lumiTool->lbLuminosityPerBCID();
     } else {
@@ -272,7 +272,7 @@ float AthMonitorAlgorithm::lbLuminosityPerBCID() {
 }
 
 
-float AthMonitorAlgorithm::lbAverageLivefraction() {
+float AthMonitorAlgorithm::lbAverageLivefraction() const {
     if (m_environment == Environment_t::online) {
         return 1.0;
     }
@@ -286,7 +286,7 @@ float AthMonitorAlgorithm::lbAverageLivefraction() {
 }
 
 
-float AthMonitorAlgorithm::livefractionPerBCID() {
+float AthMonitorAlgorithm::livefractionPerBCID() const {
     if (m_environment == Environment_t::online) {
         return 1.0;
     }
@@ -300,7 +300,7 @@ float AthMonitorAlgorithm::livefractionPerBCID() {
 }
 
 
-double AthMonitorAlgorithm::lbLumiWeight() {
+double AthMonitorAlgorithm::lbLumiWeight() const {
     if ( m_hasRetrievedLumiTool ) {
         return (lbAverageLuminosity()*lbDuration())*lbAverageLivefraction();
     } else {
@@ -310,7 +310,7 @@ double AthMonitorAlgorithm::lbLumiWeight() {
 }
 
 
-double AthMonitorAlgorithm::lbDuration() {
+double AthMonitorAlgorithm::lbDuration() const {
     if ( m_environment == Environment_t::online ) {
         return m_defaultLBDuration;
     }
-- 
GitLab