From 071dc24f2694e0a52c86683cd319a66427e74673 Mon Sep 17 00:00:00 2001
From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch>
Date: Sun, 20 Jan 2019 06:23:56 +0100
Subject: [PATCH] LArG4Validation: removed references to EventInfo and moved
 all headers to src

Also cleaned up old comments from LArCafJobs/src/LArNoiseBursts.cxx
---
 LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx   |  8 --------
 .../LArG4/LArG4Validation/CMakeLists.txt           |  7 ++-----
 .../LArG4/LArG4Validation/src/AODReader.cxx        |  4 ++--
 .../{LArG4Validation => src}/AODReader.h           |  6 +++---
 .../LArG4/LArG4Validation/src/AtlasBComponent.cxx  |  2 +-
 .../LArG4/LArG4Validation/src/AtlasBComponent.h    |  2 +-
 .../LArG4/LArG4Validation/src/GeoXPEngine.cxx      |  2 +-
 .../LArG4/LArG4Validation/src/GeoXPEngine.h        |  2 +-
 .../LArG4Validation/src/SingleTrackValidation.cxx  | 14 +++++---------
 .../SingleTrackValidation.h                        |  6 +++---
 .../src/components/LArG4Validation_entries.cxx     |  4 ++--
 11 files changed, 21 insertions(+), 36 deletions(-)
 rename LArCalorimeter/LArG4/LArG4Validation/{LArG4Validation => src}/AODReader.h (88%)
 rename LArCalorimeter/LArG4/LArG4Validation/{LArG4Validation => src}/SingleTrackValidation.h (77%)

diff --git a/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx b/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx
index a4344ed6148..b76e131e4f2 100644
--- a/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx
+++ b/LArCalorimeter/LArCafJobs/src/LArNoiseBursts.cxx
@@ -77,14 +77,6 @@
 #include "TTree.h"
 #include "CLHEP/Vector/LorentzVector.h"
 
-/*
-#include "EventInfo/EventIncident.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-#include "EventInfo/EventType.h"
-#include "EventInfo/TriggerInfo.h"
-*/
-
 #include "xAODEventInfo/EventInfo.h"
 
 #include "CaloEvent/CaloCellContainer.h"
diff --git a/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt
index 7195106ef90..65709689123 100644
--- a/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt
@@ -6,16 +6,14 @@
 atlas_subdir( LArG4Validation )
 
 # Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
+atlas_depends_on_subdirs( PRIVATE
                           GaudiKernel
-                          PRIVATE
                           Calorimeter/CaloDetDescr
                           Calorimeter/CaloIdentifier
                           Control/AthenaBaseComps
                           Control/AthenaKernel
                           Control/StoreGate
                           DetectorDescription/GeoModel/GeoAdaptors
-                          Event/EventInfo
                           Generators/GeneratorObjects
                           LArCalorimeter/LArSimEvent
                           MagneticField/MagFieldInterfaces
@@ -32,10 +30,9 @@ atlas_add_component( LArG4Validation
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel CaloDetDescrLib CaloIdentifier AthenaBaseComps StoreGateLib SGtests GeoAdaptors EventInfo GeneratorObjects LArSimEvent MagFieldInterfaces egammaEvent )
+                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel CaloDetDescrLib CaloIdentifier AthenaBaseComps StoreGateLib SGtests GeoAdaptors GeneratorObjects LArSimEvent MagFieldInterfaces egammaEvent )
 
 # Install files from the package:
-atlas_install_headers( LArG4Validation )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( test/*.xml )
diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/AODReader.cxx b/LArCalorimeter/LArG4/LArG4Validation/src/AODReader.cxx
index 4d1663a3b29..6de274e23b6 100644
--- a/LArCalorimeter/LArG4/LArG4Validation/src/AODReader.cxx
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/AODReader.cxx
@@ -1,9 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
-#include "LArG4Validation/AODReader.h"
+#include "AODReader.h"
 
 #include "GaudiKernel/IToolSvc.h"
 #include "egammaEvent/Electron.h"
diff --git a/LArCalorimeter/LArG4/LArG4Validation/LArG4Validation/AODReader.h b/LArCalorimeter/LArG4/LArG4Validation/src/AODReader.h
similarity index 88%
rename from LArCalorimeter/LArG4/LArG4Validation/LArG4Validation/AODReader.h
rename to LArCalorimeter/LArG4/LArG4Validation/src/AODReader.h
index 760b9e004c8..c2a2119ab57 100644
--- a/LArCalorimeter/LArG4/LArG4Validation/LArG4Validation/AODReader.h
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/AODReader.h
@@ -1,9 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef _AODReader_h_
-#define _AODReader_h_
+#ifndef LARG4VALIDATION_AODREADER_H
+#define LARG4VALIDATION_AODREADER_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 
diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.cxx b/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.cxx
index ced631c5c82..eefd8027ea0 100755
--- a/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.cxx
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "CLHEP/Units/SystemOfUnits.h"
diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.h b/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.h
index e7df285fb65..6fa224368cd 100755
--- a/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.h
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/AtlasBComponent.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "CLHEP/GenericFunctions/AbsFunction.hh"
diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.cxx b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.cxx
index 7b4080386e9..9e1a2e211ac 100755
--- a/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.cxx
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GeoXPEngine.h"
diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.h b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.h
index 37b0468d4d3..7096ba24862 100755
--- a/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.h
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 //---------------------------------------------------------------------------//
diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx b/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx
index ca57b57ffb1..f138da8a0cf 100755
--- a/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx
@@ -1,8 +1,8 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "LArG4Validation/SingleTrackValidation.h"
+#include "SingleTrackValidation.h"
 #include "StoreGate/StoreGateSvc.h"
 
 // For MC Truth information:
@@ -31,8 +31,6 @@
 #include "LArSimEvent/LArHitContainer.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "CaloIdentifier/LArID_Exception.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
 // To make it easier for us to access hit info
 #include "GeoAdaptors/GeoLArHit.h"
 
@@ -303,11 +301,9 @@ StatusCode SingleTrackValidation::execute() {
   StoreGateSvc *stg;
   sc=service("StoreGateSvc", stg);
     
-  const DataHandle<EventInfo> evt;
-  sc=stg->retrieve(evt);
-  if (sc.isFailure()) return StatusCode::SUCCESS;
-  int RunNum=evt->event_ID()->run_number();
-  int EvtNum=evt->event_ID()->event_number();
+  const EventContext& context = getContext();
+  int RunNum=context.eventID().run_number();
+  int EvtNum=context.eventID().event_number();
   double RunStr=double(RunNum);
   double EvtStr=double(EvtNum);
   m_c->EventNo=EvtStr;
diff --git a/LArCalorimeter/LArG4/LArG4Validation/LArG4Validation/SingleTrackValidation.h b/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.h
similarity index 77%
rename from LArCalorimeter/LArG4/LArG4Validation/LArG4Validation/SingleTrackValidation.h
rename to LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.h
index b763016cc3a..70d2d924acf 100755
--- a/LArCalorimeter/LArG4/LArG4Validation/LArG4Validation/SingleTrackValidation.h
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.h
@@ -1,9 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef _SingleTrackValidation_h_
-#define _SingleTrackValidation_h_
+#ifndef LARG4VALIDATION_SINGLETRACKVALIDATION_H
+#define LARG4VALIDATION_SINGLETRACKVALIDATION_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "TH1F.h"
diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/components/LArG4Validation_entries.cxx b/LArCalorimeter/LArG4/LArG4Validation/src/components/LArG4Validation_entries.cxx
index c253d6abc0c..4fb45c6c33f 100644
--- a/LArCalorimeter/LArG4/LArG4Validation/src/components/LArG4Validation_entries.cxx
+++ b/LArCalorimeter/LArG4/LArG4Validation/src/components/LArG4Validation_entries.cxx
@@ -1,5 +1,5 @@
-#include "LArG4Validation/SingleTrackValidation.h"
-#include "LArG4Validation/AODReader.h"
+#include "../SingleTrackValidation.h"
+#include "../AODReader.h"
 
 
 DECLARE_COMPONENT( SingleTrackValidation )
-- 
GitLab