ATLAS Offline Software
Control
AthenaExamples
AthExFortranAlgorithm
src
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
7
extern
"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
15
namespace
{
16
17
18
void
fortran_flush()
19
{
20
#ifdef __GNUC__
21
_gfortran_flush_i4
(
nullptr
);
22
#endif
23
}
24
25
26
}
27
28
30
31
FortranAlgorithm::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
40
StatusCode
FortranAlgorithm::initialize
(){
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
49
StatusCode
FortranAlgorithm::execute
() {
50
ATH_MSG_INFO
(
"calling execute_()"
);
51
execute_
(
m_lun
);
52
fortran_flush();
53
return
StatusCode::SUCCESS;
54
}
55
56
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
57
58
StatusCode
FortranAlgorithm::finalize
() {
59
ATH_MSG_INFO
(
"calling finalize_()"
);
60
finalize_
(
m_lun
);
61
fortran_flush();
62
return
StatusCode::SUCCESS;
63
}
64
65
66
67
68
69
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition:
AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition:
AthCommonDataStore.h:145
FortranAlgorithm::m_lun
int m_lun
Definition:
FortranAlgorithm.h:22
initialize_
void initialize_(const int &lun, const char *, long int)
finalize_
void finalize_(const int &lun)
FortranAlgorithm::initialize
StatusCode initialize()
Definition:
FortranAlgorithm.cxx:40
FortranAlgorithm::m_fileName
std::string m_fileName
Definition:
FortranAlgorithm.h:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgorithm
Definition:
AthAlgorithm.h:47
FortranAlgorithm.h
FortranAlgorithm::execute
StatusCode execute()
Definition:
FortranAlgorithm.cxx:49
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
FortranAlgorithm::FortranAlgorithm
FortranAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition:
FortranAlgorithm.cxx:31
_gfortran_flush_i4
void _gfortran_flush_i4(int *)
FortranAlgorithm::finalize
StatusCode finalize()
Definition:
FortranAlgorithm.cxx:58
execute_
void execute_(const int &lun)
Generated on Wed Jan 8 2025 21:10:04 for ATLAS Offline Software by
1.8.18