From 714348eb442cb4588aa75c238b44281e0515b11b Mon Sep 17 00:00:00 2001
From: James Beacham <j.beacham@cern.ch>
Date: Thu, 15 Nov 2018 13:41:57 +0000
Subject: [PATCH] Fix conflict in RecoUtils.py such that we can mergre this
 into master.

Merge branch 'mhodgkin_ATLASRECTS_3601' into '21.0'

Increase of MaxFileSize

See merge request atlas/athena!15098


Former-commit-id: f75433b7ba461975e0a723bd1c7fb7e168745c15
---
 .../AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx          | 10 +++++-----
 .../share/skeleton.combinedinput.py                    |  7 -------
 .../RecExample/RecExCommon/share/RecoUtils.py          |  2 +-
 .../SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py |  6 ------
 .../share/skeleton.EVGENtoHIT_MC12.py                  |  6 ------
 .../SimuJobTransforms/share/skeleton.FilterHit.py      |  2 --
 .../SimuJobTransforms/share/skeleton.HITtoRDO.py       |  7 +------
 .../SimuJobTransforms/share/skeleton.TestBeam.py       |  7 -------
 .../share/FastChainSkeleton.EVGENtoRDO.py              |  7 +------
 Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py |  6 +-----
 10 files changed, 9 insertions(+), 51 deletions(-)

diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index a6d2834afad..c9aeb56175e 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -90,8 +90,8 @@ StatusCode AthenaPoolCnvSvc::initialize() {
 	   last = m_maxFileSizes.value().end(); iter != last; iter++) {
       if (iter->find('=') != std::string::npos) {
          long long maxFileSize = atoll(iter->substr(iter->find('=') + 1).c_str());
-         if (maxFileSize > 10000000000LL) {
-            ATH_MSG_WARNING("Files larger than 10GB are disallowed by ATLAS policy.");
+         if (maxFileSize > 15000000000LL) {
+            ATH_MSG_WARNING("Files larger than 15GB are disallowed by ATLAS policy.");
             ATH_MSG_WARNING("They should only be produced for private use or in special cases.");
          }
          std::string databaseName = iter->substr(0, iter->find_first_of(" 	="));
@@ -99,8 +99,8 @@ StatusCode AthenaPoolCnvSvc::initialize() {
          m_databaseMaxFileSize.insert(entry);
       } else {
          m_domainMaxFileSize = atoll(iter->c_str());
-         if (m_domainMaxFileSize > 10000000000LL) {
-            ATH_MSG_WARNING("Files larger than 10GB are disallowed by ATLAS policy.");
+         if (m_domainMaxFileSize > 15000000000LL) {
+            ATH_MSG_WARNING("Files larger than 15GB are disallowed by ATLAS policy.");
             ATH_MSG_WARNING("They should only be produced for private use or in special cases.");
          }
       }
@@ -1132,7 +1132,7 @@ AthenaPoolCnvSvc::AthenaPoolCnvSvc(const std::string& name, ISvcLocator* pSvcLoc
 	m_containerPrefix(),
 	m_containerNameHint(),
 	m_branchNameHint(),
-	m_domainMaxFileSize(10000000000LL),
+	m_domainMaxFileSize(15000000000LL),
 	m_doChronoStat(true) {
    declareProperty("UseDetailChronoStat", m_useDetailChronoStat = false);
    declareProperty("PoolContainerPrefix", m_containerPrefixProp = "ROOTTREE:CollectionTree");
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
index fd4bca4e826..6d9d752f45b 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
@@ -204,13 +204,6 @@ if jobproperties.Beam.beamType.get_Value() == 'cosmics':
     else:
         svcMgr.EventSelector.FirstEvent = 0
 
-
-## Increase max RDO output file size to 10 GB
-## NB. We use 10GB since Athena complains that 15GB files are not supported
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ]
-
-
 ## Post-include
 if hasattr(runArgs, "postInclude"):
     for fragment in runArgs.postInclude:
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
index f431f191563..2aa325ad5f5 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecoUtils.py
@@ -150,7 +150,7 @@ if rec.doTimeLimit():
 # Output file options
 # rather use default athenapool value
 if rec.doPersistencyOptimization() and hasattr(svcMgr, 'AthenaPoolCnvSvc'):
-    svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "12000000000" ]
+    svcMgr.AthenaPoolCnvSvc.CommitInterval = 1000000000
 
     svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "TREE_BRANCH_OFFSETTAB_LEN ='100'" ]
     
diff --git a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
index bb5445379fe..c3c868aa953 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
@@ -268,12 +268,6 @@ if jobproperties.Beam.beamType.get_Value() == 'cosmics':
     else:
         svcMgr.EventSelector.FirstEvent = 0
 
-## Increase max RDO output file size to 10 GB
-## NB. We use 10GB since Athena complains that 15GB files are not supported
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ]
-
-
 ## Post-include
 if hasattr(runArgs, "postInclude"):
     for fragment in runArgs.postInclude:
diff --git a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
index af14d358ac2..5e87c34ed19 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
@@ -253,12 +253,6 @@ if jobproperties.Beam.beamType.get_Value() == 'cosmics':
     else:
         svcMgr.EventSelector.FirstEvent = 0
 
-## Increase max RDO output file size to 10 GB
-## NB. We use 10GB since Athena complains that 15GB files are not supported
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ]
-
-
 ## Post-include
 if hasattr(runArgs, "postInclude"):
     for fragment in runArgs.postInclude:
diff --git a/Simulation/SimuJobTransforms/share/skeleton.FilterHit.py b/Simulation/SimuJobTransforms/share/skeleton.FilterHit.py
index 234d718e3cd..6ffb33f281b 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.FilterHit.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.FilterHit.py
@@ -269,8 +269,6 @@ if not hasattr(ServiceMgr.IOVDbSvc, 'GlobalTag') or not ServiceMgr.IOVDbSvc.Glob
 
 #Stream1.ExtendProvenanceRecord = False
 
-ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ] #[ "15000000000" ]
-
 #--------------------------------------------------------------
 
 ## Post-include
diff --git a/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py b/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
index 99c927fbe18..9587e1aa50e 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
@@ -465,15 +465,10 @@ if hasattr(runArgs,"AMITag"):
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
     svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag ]
 
-# Increase max RDO output file size to 10 GB
-
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr; import AthenaPoolCnvSvc.AthenaPool 
-svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ] #[ "15000000000" ] #Athena complains that 15GB files are not supported
-
-
 #==========================================================
 # Use LZIB for compression of temporary outputs of AthenaMP
 #==========================================================
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr; import AthenaPoolCnvSvc.AthenaPool 
 if hasattr(runArgs, "outputRDOFile") and '_000' in runArgs.outputRDOFile:
     svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" +  athenaCommonFlags.PoolRDOOutput()+ "'; COMPRESSION_ALGORITHM = '1'" ]
     svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" +  athenaCommonFlags.PoolRDOOutput()+ "'; COMPRESSION_LEVEL = '1'" ]
diff --git a/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py b/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
index b31eb4228c5..f8b5416e4b6 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
@@ -233,13 +233,6 @@ if hasattr(runArgs, 'AMITag'):
         from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag]
 
-
-## Increase max RDO output file size to 10 GB
-## NB. We use 10GB since Athena complains that 15GB files are not supported
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ]
-
-
 ## Post-include
 if hasattr(runArgs, "postInclude"):
     for fragment in runArgs.postInclude:
diff --git a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
index fde12ad917f..2380b4b1fab 100644
--- a/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
+++ b/Tools/FullChainTransforms/share/FastChainSkeleton.EVGENtoRDO.py
@@ -979,11 +979,6 @@ if hasattr(runArgs, 'AMITag'):
         from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag]
 
-## Increase max RDO output file size to 10 GB
-## NB. We use 10GB since Athena complains that 15GB files are not supported
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ]
-
 ### Changing to post-sim include/exec
 ## Post-include
 if hasattr(runArgs, "postSimInclude"):
@@ -1381,7 +1376,7 @@ ServiceMgr.EventSelector.SkipEvents = athenaCommonFlags.SkipEvents()
 
 
 
-
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 if hasattr(runArgs,"AMITag"):
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
     svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag ]
diff --git a/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
index 422b4986599..4016b406fde 100644
--- a/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
+++ b/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
@@ -226,11 +226,6 @@ if hasattr(runArgs, 'AMITag'):
         from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag]
 
-## Increase max RDO output file size to 10 GB
-## NB. We use 10GB since Athena complains that 15GB files are not supported
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "10000000000" ]
-
 ### Changing to post-sim include/exec
 ## Post-include
 if hasattr(runArgs, "postSimInclude"):
@@ -415,6 +410,7 @@ except:
 
 include ("Digitization/Digitization.py")
 
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 if hasattr(runArgs,"AMITag"):
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
     svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag ]
-- 
GitLab