ATLAS Offline Software
Loading...
Searching...
No Matches
PhysValSecVtx.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef INDETSECVERTEXVALIDATION_PHYSVALSECVTX_H
6#define INDETSECVERTEXVALIDATION_PHYSVALSECVTX_H
7
8// STL includes
9#include <memory>
10#include <string>
11#include <vector>
12
18
21{
22
23 public:
24 PhysValSecVtx(const std::string& type,
25 const std::string& name,
26 const IInterface* parent);
27 virtual ~PhysValSecVtx() = default;
28
29 virtual StatusCode initialize() override;
30 virtual StatusCode bookHistograms() override;
31 virtual StatusCode fillHistograms() override;
32 virtual StatusCode procHistograms() override;
33
34 private:
35 SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey {this, "EventInfo", "EventInfo",
36 "Event info key"};
37
39 "VrtSecInclusive_SecondaryVertices", "Key of input vertices"};
40
41 //Histograms
42 std::unique_ptr<SecVtxValidationPlots> m_secVtxValidationPlots;
43
44 template<typename external_collection_t>
45 StatusCode bookCollection(external_collection_t*);
46
47};
48
49template<typename external_collection_t>
50 StatusCode PhysValSecVtx::bookCollection(external_collection_t* plot_collection)
51 {
52 std::vector<HistData> hists = plot_collection->retrieveBookedHistograms();
53 for (auto& [histo, directory] : hists) {
54 ATH_MSG_DEBUG ("Initializing " << histo << " " << histo->GetName() << " " << directory << "...");
55 ATH_CHECK(regHist(histo, directory, all));
56 }
57 plot_collection->initialize();
58 return StatusCode::SUCCESS;
59 }
60
61#endif //> !INDETSECVERTEXVALIDATION_PHYSVALSECVTX_H
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
ManagedMonitorToolBase(const std::string &type, const std::string &name, const IInterface *parent)
PhysValSecVtx(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
std::unique_ptr< SecVtxValidationPlots > m_secVtxValidationPlots
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
StatusCode bookCollection(external_collection_t *)
virtual StatusCode initialize() override
virtual StatusCode procHistograms() override
An inheriting class should either override this function or finalHists().
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
virtual ~PhysValSecVtx()=default
Property holding a SG store/key/clid from which a ReadHandle is made.