ATLAS Offline Software
Loading...
Searching...
No Matches
FortranAlgorithm.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "FortranAlgorithm.h"
6
7extern "C" {
8 void initialize_(const int& lun, const char*, long int);
9 void execute_(const int& lun);
10 void finalize_(const int& lun);
11 void _gfortran_flush_i4 (int*);
12}
13
14
15namespace {
16
17
18void fortran_flush()
19{
20#ifdef __GNUC__
21 _gfortran_flush_i4 (nullptr);
22#endif
23}
24
25
26}
27
28
30
31FortranAlgorithm::FortranAlgorithm(const std::string& name, ISvcLocator* pSvcLocator) :
32 AthAlgorithm(name, pSvcLocator), m_lun(16), m_fileName("FortranAlgorithmInput.data")
33{
34 declareProperty("LUN", m_lun);
35 declareProperty("fileName", m_fileName);
36}
37
38// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
39
41 ATH_MSG_INFO ("calling initialize_()");
42 initialize_(m_lun, m_fileName.c_str(), m_fileName.size());
43 fortran_flush();
44 return StatusCode::SUCCESS;
45}
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
48
50 ATH_MSG_INFO ("calling execute_()");
52 fortran_flush();
53 return StatusCode::SUCCESS;
54}
55
56// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
57
59 ATH_MSG_INFO ("calling finalize_()");
61 fortran_flush();
62 return StatusCode::SUCCESS;
63}
64
65
66
67
68
69
#define ATH_MSG_INFO(x)
void _gfortran_flush_i4(int *)
void initialize_(const int &lun, const char *, long int)
void finalize_(const int &lun)
void execute_(const int &lun)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StatusCode initialize()
std::string m_fileName
FortranAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)