ATLAS Offline Software
PhysValSecVtx.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "src/PhysValSecVtx.h"
6 
7 PhysValSecVtx::PhysValSecVtx(const std::string& type,
8  const std::string& name,
9  const IInterface* parent)
11 {}
12 
14 {
15  ATH_MSG_INFO ("Initializing " << name() << "...");
18  ATH_CHECK(m_vertexContainerKey.initialize());
19 
20  std::string folder = "SquirrelPlots/SecVtx";
21 
23  std::make_unique< SecVtxValidationPlots >(nullptr,
24  Form("%s/%s/",
25  folder.c_str(),
26  m_vertexContainerKey.key().c_str())
27  );
28 
29  return StatusCode::SUCCESS;
30 }
31 
33 {
34  ATH_MSG_INFO ("Booking hists " << name() << "...");
36  return StatusCode::SUCCESS;
37 }
38 
40 {
41  ATH_MSG_INFO ("Filling hists " << name() << "...");
42 
43  const EventContext& ctx = Gaudi::Hive::currentContext();
44 
46  if (not inputVertexContainer.isValid()) {
47  ATH_MSG_FATAL("xAOD::VertexContainer with key " << m_vertexContainerKey.key() << " is not available...");
48  return StatusCode::FAILURE;
49  }
50  const xAOD::VertexContainer *vertexContainer = inputVertexContainer.cptr();
51 
52  // Fill histograms
53  for (const xAOD::Vertex* vertex : *vertexContainer) {
55  }
56 
57  return StatusCode::SUCCESS;
58 }
59 
61 {
62  ATH_MSG_INFO ("Finalising hists " << name() << "...");
63  m_secVtxValidationPlots->finalize();
64  return StatusCode::SUCCESS;
65 }
PhysValSecVtx::bookHistograms
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
Definition: PhysValSecVtx.cxx:32
PhysValSecVtx::initialize
virtual StatusCode initialize() override
Definition: PhysValSecVtx.cxx:13
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
PhysValSecVtx::fillHistograms
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
Definition: PhysValSecVtx.cxx:39
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
PhysValSecVtx::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: PhysValSecVtx.h:35
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
PhysValSecVtx::bookCollection
StatusCode bookCollection(external_collection_t *)
Definition: PhysValSecVtx.h:50
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:669
PhysValSecVtx.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PhysValSecVtx::m_secVtxValidationPlots
std::unique_ptr< SecVtxValidationPlots > m_secVtxValidationPlots
Definition: PhysValSecVtx.h:42
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
PhysValSecVtx::PhysValSecVtx
PhysValSecVtx(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PhysValSecVtx.cxx:7
PhysValSecVtx::m_vertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Definition: PhysValSecVtx.h:38
PhysValSecVtx::procHistograms
virtual StatusCode procHistograms() override
An inheriting class should either override this function or finalHists().
Definition: PhysValSecVtx.cxx:60