ATLAS Offline Software
Loading...
Searching...
No Matches
PrintHijingPars.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
9PrintHijingPars::PrintHijingPars(const std::string& name, ISvcLocator* pSvcLocator) :
10 GenBase(name, pSvcLocator)
11{
12 // Set users' request
13 declareProperty("HijingParamsKey", m_key="Hijing_event_params");
14 declareProperty("VerboseOutput", m_VerboseOutput=true);
15 declareProperty("FirstEvent", m_firstEvt=1);
16 declareProperty("LastEvent", m_lastEvt=100000000);
17}
18
20
22
23 ATH_MSG_INFO(">>> PrintHijingPars from Initialize");
24 std::cout << "----- PrintHijingPars From initialize" << std::endl;
25
27
28 // Initialization terminated
29 return StatusCode::SUCCESS;
30}
31
33{
34
35 const HijingEventParams *hijing_pars = nullptr;
36 const StatusCode sc = evtStore()->retrieve(hijing_pars, m_key);
37 if (!sc.isSuccess()) {
38 ATH_MSG_ERROR("Could not retrieve Hijing_event_params");
39 return StatusCode::FAILURE;
40 }
41
42 // printout hijing event params
43 // ----------------------------
44 std::cout << "----- PrintHijingPars -----" << std::endl;
45 std::cout << "np: " << hijing_pars->get_np() << std::endl;
46 std::cout << "nt: " << hijing_pars->get_nt() << std::endl;
47 std::cout << "n0: " << hijing_pars->get_n0() << std::endl;
48 std::cout << "n01: " << hijing_pars->get_n01() << std::endl;
49 std::cout << "n10: " << hijing_pars->get_n10() << std::endl;
50 std::cout << "n11: " << hijing_pars->get_n11() << std::endl;
51 std::cout << "natt: " << hijing_pars->get_natt() << std::endl;
52 std::cout << "jatt: " << hijing_pars->get_jatt() << std::endl;
53 std::cout << "b: " << hijing_pars->get_b() << std::endl;
54 std::cout << "bphi: " << hijing_pars->get_bphi() << std::endl;
55 std::cout << "---------------------------" << std::endl;
56
57 // End of execution for each event
58 return StatusCode::SUCCESS;
59}
60
62
63 ATH_MSG_INFO(">>> PrintHijingPars from finalize");
64 std::cout << "----- PrintHijingPars From finalize" << std::endl;
65
66 // End of finalization step
67 return StatusCode::SUCCESS;
68}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
static Double_t sc
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode initialize() override
Definition GenBase.cxx:17
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenBase.cxx:11
float get_bphi() const
StatusCode initialize()
std::string m_key
StatusCode execute()
PrintHijingPars(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode finalize()