From 2f58bc4f56c0f8b6a1de057f7a40c1209883e8cc Mon Sep 17 00:00:00 2001 From: Susumu Oda <Susumu.Oda@cern.ch> Date: Tue, 25 Apr 2017 22:52:42 +0200 Subject: [PATCH] EventInfo was replaced by xAOD::EventInfo. --- .../SCT_Monitoring/SCTHitEffMonTool.h | 4 +-- .../SCT_Monitoring/SCTHitsNoiseMonTool.h | 4 +-- .../SCT_Monitoring/SCTRatioNoiseMonTool.h | 2 ++ .../SCT_Monitoring/src/SCTErrMonTool.cxx | 2 +- .../SCT_Monitoring/src/SCTHitEffMonTool.cxx | 30 +++++++++---------- .../src/SCTHitsNoiseMonTool.cxx | 15 ++++------ .../src/SCTRatioNoiseMonTool.cxx | 8 ++--- 7 files changed, 31 insertions(+), 34 deletions(-) diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h index d9b09fc9882..bf6fc76070b 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h @@ -44,7 +44,7 @@ #include "StoreGate/ReadHandleKey.h" #include "CommissionEvent/ComTime.h" -#include "EventInfo/EventInfo.h" +#include "xAODEventInfo/EventInfo.h" class Identifier; class PixelID; @@ -293,7 +293,7 @@ private: const TRT_ID * m_trtId; SG::ReadHandleKey<ComTime> m_comTimeName; - SG::ReadHandleKey<EventInfo> m_eventInfoKey; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey; /**Convert a layer/disk number (0-21) to a bec index (0,1,2) according to position of that layer * Numbering is counter-intuitive, would expect C then B then A; in fact the original ordering was A, C, B diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitsNoiseMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitsNoiseMonTool.h index 3073a6e8927..9deba4fc02f 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitsNoiseMonTool.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitsNoiseMonTool.h @@ -31,7 +31,7 @@ #include "StoreGate/ReadHandleKey.h" #include "TrkSpacePoint/SpacePointContainer.h" #include "InDetRawData/SCT_RDO_Container.h" -#include "EventInfo/EventInfo.h" +#include "xAODEventInfo/EventInfo.h" #include "InDetPrepRawData/SCT_ClusterContainer.h" // for CondDB @@ -514,7 +514,7 @@ class SCTHitsNoiseMonTool : public SCTMotherTrigMonTool{ positionString(const Identifier & plane) const; //@} - SG::ReadHandleKey<EventInfo> m_eventInfoKey; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey; SG::ReadHandleKey<InDet::SCT_ClusterContainer> m_clusContainerKey; }; diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h index 56ec071c6aa..0979ba1a041 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h @@ -34,6 +34,7 @@ #include "StoreGate/ReadHandleKey.h" #include "InDetRawData/SCT_RDO_Container.h" +#include "xAODEventInfo/EventInfo.h" // Forward declarations class IInterface; @@ -239,6 +240,7 @@ private: //@{ /// Data object name: for the SCT this is "SCT_RDOs" SG::ReadHandleKey<SCT_RDO_Container> m_dataObjectName; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey; ///SCT Helper class const SCT_ID* m_pSCTHelper; //SCT Detector Manager diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx index 433d86bb336..f4241c2dc0b 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx @@ -227,7 +227,7 @@ SCTErrMonTool::SCTErrMonTool(const std::string &type, const std::string &name, c //m_DisabledDetectorCoverageVsLB{}, //m_ErrorDetectorCoverageVsLB{}, m_TotalDetectorCoverageVsLB{}, - m_eventInfoKey(std::string("")) { + m_eventInfoKey(std::string("EventInfo")) { /** * sroe 3 Sept 2015: * histoPathBase is declared as a property in the base class, assigned to m_path diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx index 710789083a2..9b07a2513c6 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx @@ -29,7 +29,6 @@ #include "AthenaKernel/errorcheck.h" #include "Identifier/IdentifierHash.h" #include "AthenaMonitoring/AthenaMonManager.h" -#include "EventInfo/EventID.h" #include "StoreGate/ReadHandle.h" #include "SCT_ConditionsServices/ISCT_ConfigurationConditionsSvc.h" @@ -201,7 +200,8 @@ SCTHitEffMonTool::SCTHitEffMonTool(const string &type, const string &name, const m_pixelId(nullptr), m_sctId(nullptr), m_trtId(nullptr), - m_comTimeName(std::string("TRT_Phase")) { + m_comTimeName(std::string("TRT_Phase")), + m_eventInfoKey(std::string("EventInfo")){ declareProperty("TrackName", m_TrackName); declareProperty("IsCosmic", m_isCosmic); declareProperty("IsSim", m_isSim); @@ -1123,13 +1123,11 @@ SCTHitEffMonTool::fillHistograms() { } } // If we are going to use TRT phase in anger, need run-dependent corrections. - EventID *eventID; - SG::ReadHandle<EventInfo> pEvent(m_eventInfoKey); + SG::ReadHandle<xAOD::EventInfo> pEvent(m_eventInfoKey); if (not pEvent.isValid()) { return ERROR("Could not find EventInfo"), StatusCode::FAILURE; } - eventID = pEvent->event_ID(); - unsigned BCID = eventID->bunch_crossing_id(); + unsigned BCID = pEvent->bcid(); int BCIDpos = m_bunchCrossingTool->distanceFromFront(BCID); bool InTrain = m_bunchCrossingTool->isInTrain(BCID); @@ -1463,17 +1461,17 @@ SCTHitEffMonTool::fillHistograms() { } Double_t tmin(1.); Double_t tmax(40.); - if (eventID->run_number() > 96000) { + if (pEvent->runNumber() > 96000) { /// Guess that all this set are the same timing. tmin = -5; tmax = 20; } - if (eventID->run_number() > 110000) { + if (pEvent->runNumber() > 110000) { /// Guess that all this set are the same timing. tmin = -15; tmax = 10; } - switch (eventID->run_number()) { + switch (pEvent->runNumber()) { case 91885: tmin = 1; tmax = 40; break; @@ -1714,16 +1712,16 @@ SCTHitEffMonTool::fillHistograms() { m_Eff_summaryHisto_old[isub]->Fill(layerPlusHalfSide, m_eff); // in order to calculate m_EffsummaryIncBadMod m_Eff_summaryHisto[isub]->Fill(dedicated_layerPlusHalfSide, m_eff); // adjustment for dedicated_title() m_Eff_hashCodeHisto->Fill(Double_t(sideHash), m_eff);// 15.12.2014 - m_Eff_LumiBlockHisto[isub]->Fill(eventID->lumi_block(), m_eff);// 20.01.2015 - m_Eff_LumiBlockHisto_Total->Fill(eventID->lumi_block(), m_eff);// 02.09.2016 + m_Eff_LumiBlockHisto[isub]->Fill(pEvent->lumiBlock(), m_eff);// 20.01.2015 + m_Eff_LumiBlockHisto_Total->Fill(pEvent->lumiBlock(), m_eff);// 02.09.2016 if (BCIDpos == 0 && InTrain) { m_Eff_summaryHistoFirstBCID[isub]->Fill(dedicated_layerPlusHalfSide, m_eff); // adjustment for dedicated_title() } if (m_detailed) { m_SelectionHisto[isub]->Fill(9.); // Past bad chip m_Eff_SelectionHisto[isub]->Fill(9., m_eff); // Past bad chip - m_EventHisto[isub]->Fill(eventID->event_number()); - m_Eff_EventHisto[isub]->Fill(eventID->event_number(), m_eff); + m_EventHisto[isub]->Fill(pEvent->eventNumber()); + m_Eff_EventHisto[isub]->Fill(pEvent->eventNumber(), m_eff); m_hashCodeHisto->Fill(Double_t(sideHash)); m_Unas_summaryHisto[isub]->Fill(layerPlusHalfSide, m_unas); m_Eff_etaHisto[isub]->Fill(eta, m_eff); @@ -1743,7 +1741,7 @@ SCTHitEffMonTool::fillHistograms() { m_Eff_nGoodTrk[isub]->Fill(nTrkGood, m_eff); } if (m_superDetailed) { - // m_Eff_LumiBlockHisto[isub]->Fill(eventID->lumi_block(), m_eff);//20.01.2015 + // m_Eff_LumiBlockHisto[isub]->Fill(pEvent->lumiBlock(), m_eff);//20.01.2015 chipPos = (side == 1) ? 11 - chipPos : chipPos; m_inEffChip[isub]->Fill(sideHash, chipPos, int(m_eff == 0)); m_inEffStrip[isub]->Fill(sideHash, xl / 79.95e-3 + 768. / 2., int(m_eff == 0)); @@ -1776,7 +1774,7 @@ SCTHitEffMonTool::fillHistograms() { const int ieta(m_sctId->eta_module(surfaceID)); const int iphi(m_sctId->phi_module(surfaceID)); m_effMap[histnumber][side]->Fill(ieta, iphi, m_eff); - m_effLumiBlock[histnumber][side]->Fill(eventID->lumi_block(), m_eff);// 23.01.2015 + m_effLumiBlock[histnumber][side]->Fill(pEvent->lumiBlock(), m_eff);// 23.01.2015 if (testOffline) { m_ineffMap[histnumber][side]->Fill(ieta, iphi, 1); // dummyfill for testing @@ -1830,7 +1828,7 @@ SCTHitEffMonTool::fillHistograms() { m_nTrkGoodHisto->Fill(nTrkGood); } if (m_superDetailed) { - m_LumiBlock->Fill(eventID->lumi_block()); + m_LumiBlock->Fill(pEvent->lumiBlock()); } m_countEvent++; if (m_chronotime) { diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx index 61940ca5bfc..c714afa6443 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitsNoiseMonTool.cxx @@ -51,9 +51,6 @@ #include "TrkSpacePoint/SpacePointCollection.h" #include "TrkSpacePoint/SpacePointOverlapCollection.h" #include "TrkSpacePoint/SpacePointCLASS_DEF.h" -// for TriggerType -#include "EventInfo/EventInfo.h" -#include "EventInfo/EventID.h" #include "TrkTrack/TrackCollection.h" #include "TrkRIO_OnTrack/RIO_OnTrack.h" @@ -303,7 +300,7 @@ SCTHitsNoiseMonTool::SCTHitsNoiseMonTool(const std::string &type, m_dataObjectName(std::string("SCT_RDOs")), m_pSCTHelper(nullptr), m_ConfigurationSvc("InDetSCT_ConfigurationConditionsSvc", name), - m_eventInfoKey(std::string("")), + m_eventInfoKey(std::string("EventInfo")), m_clusContainerKey("SCT_Clusters") { /** sroe 3 Sept 2015: histoPathBase is declared as a property in the base class, assigned to m_path @@ -549,14 +546,14 @@ StatusCode SCTHitsNoiseMonTool::fillHistograms() { ++m_numberOfEvents; ++m_numberOfEventsRecent; - SG::ReadHandle<EventInfo> pEvent; + SG::ReadHandle<xAOD::EventInfo> pEvent(m_eventInfoKey); if (not pEvent.isValid()) { if (msgLvl(MSG::ERROR)) { msg(MSG::ERROR) << "Could not retrieve event info!" << endmsg; } return StatusCode::RECOVERABLE; } - int tmp_lb = pEvent->event_ID()->lumi_block(); + int tmp_lb = pEvent->lumiBlock(); if ((tmp_lb > m_current_lb) and (m_current_lb<=SCT_Monitoring::NBINS_LBs)) { m_noisyM100[m_current_lb] = 0; m_noisyM1000[m_current_lb] = 0; @@ -716,7 +713,7 @@ SCTHitsNoiseMonTool::fillHistograms() { m_events_lb = 0; m_eventsTrigger_lb = 0; } - m_current_lb = pEvent->event_ID()->lumi_block(); + m_current_lb = pEvent->lumiBlock(); // If track hits are selected, make the vector of track rdo identifiers if (m_doTrackHits) { if (makeVectorOfTrackRDOIdentifiers().isFailure() and msgLvl(MSG::WARNING)) { @@ -807,14 +804,14 @@ StatusCode SCTHitsNoiseMonTool::generalHistsandNoise() { typedef SCT_RDORawData SCTRawDataType; SG::ReadHandle<SCT_RDO_Container> p_rdocontainer(m_dataObjectName); - SG::ReadHandle<EventInfo> pEvent; + SG::ReadHandle<xAOD::EventInfo> pEvent(m_eventInfoKey); if (not pEvent.isValid()) { if (msgLvl(MSG::ERROR)) { msg(MSG::ERROR) << "Could not retrieve event info!" << endmsg; } return StatusCode::FAILURE; } - unsigned int current_lb = pEvent->event_ID()->lumi_block(); + unsigned int current_lb = pEvent->lumiBlock(); if (not p_rdocontainer.isValid()) { return StatusCode::FAILURE; } diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx index d136161f29d..4e88ca0a965 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx @@ -45,8 +45,6 @@ #include "InDetIdentifier/SCT_ID.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetConditionsSummaryService/IInDetConditionsSvc.h" -#include "EventInfo/EventID.h" -#include "EventInfo/EventInfo.h" #include "StoreGate/ReadHandle.h" // @@ -233,6 +231,7 @@ SCTRatioNoiseMonTool::SCTRatioNoiseMonTool(const string &type, m_tracksName(""), // never used? m_NOTrigger("L1_RD0_EMPTY"), m_dataObjectName(std::string("SCT_RDOs")), + m_eventInfoKey(std::string("EventInfo")), m_pSCTHelper(nullptr), m_sctmgr(nullptr), m_pSummarySvc("SCT_ConditionsSummarySvc", name), @@ -267,6 +266,7 @@ SCTRatioNoiseMonTool::~SCTRatioNoiseMonTool() { // ==================================================================================================== StatusCode SCTRatioNoiseMonTool::initialize() { ATH_CHECK( m_dataObjectName.initialize() ); + ATH_CHECK( m_eventInfoKey.initialize() ); return StatusCode::SUCCESS; } @@ -371,13 +371,13 @@ SCTRatioNoiseMonTool::fillHistograms() { goodModules[i] = true; } - SG::ReadHandle<EventInfo> pEvent; + SG::ReadHandle<xAOD::EventInfo> pEvent(m_eventInfoKey); if (not pEvent.isValid()) { return ERROR("Could not find event pointer"), StatusCode::FAILURE; } const bool isSelectedTrigger = true; - int tmplb = pEvent->event_ID()->lumi_block(); + int tmplb = pEvent->lumiBlock(); if (tmplb > m_current_lb) { for (int i = 0; i < n_mod[GENERAL_INDEX]; i++) { nNoSides_lb[i] = 0; -- GitLab