The Gaudi Framework  master (da3d77e1)
FileMgrTest.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIEXAMPLES_FILEMGRTEST_H
12 #define GAUDIEXAMPLES_FILEMGRTEST_H
13 
14 //<<<<<< INCLUDES >>>>>>
15 #include <GaudiKernel/Algorithm.h>
16 //<<<<<< CLASS DECLARATIONS >>>>>>
21 #include <GaudiKernel/IFileMgr.h>
23 #include <stdio.h>
24 #include <string>
25 
26 class IFileMgr;
27 class TFile;
28 
29 class FileMgrTest : public Algorithm {
30 
31 public:
32  FileMgrTest( const std::string& name, ISvcLocator* pSvcLocator );
33  StatusCode initialize() override;
34  StatusCode execute() override;
35  StatusCode finalize() override;
36 
37 private:
38  Io::Fd fd_1{ -1 }, fd_2{ -1 }, fd_3{ -1 }, fd_4{ -1 };
39  FILE * fp_1{ nullptr }, *fp_2{ nullptr }, *fp_3{ nullptr }, *fp_4{ nullptr };
40  TFile * fp_r1{ nullptr }, *fp_r2{ nullptr }, *fp_r3{ nullptr };
42 
43  ServiceHandle<IFileMgr> p_fileMgr{ this, "FileMgr", "FileMGr" };
44 
47 };
48 
49 #endif // GAUDIEXAMPLES_FILEMGRTEST_H
FileMgrTest::p_fileMgr
ServiceHandle< IFileMgr > p_fileMgr
Definition: FileMgrTest.h:43
FileMgrTest::fp_2
FILE * fp_2
Definition: FileMgrTest.h:39
FileMgrTest::fp_4
FILE * fp_4
Definition: FileMgrTest.h:39
FileMgrTest::finalize
StatusCode finalize() override
Definition: FileMgrTest.cpp:202
FileMgrTest::fd_4
Io::Fd fd_4
Definition: FileMgrTest.h:38
std::string
STL class.
FileMgrTest::fp_r1
TFile * fp_r1
Definition: FileMgrTest.h:40
FileMgrTest::fd_1
Io::Fd fd_1
Definition: FileMgrTest.h:38
FileMgrTest::m_f3
std::string m_f3
Definition: FileMgrTest.h:41
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:526
FileMgrTest
an algorithm to test the FileMgr
Definition: FileMgrTest.h:29
ServiceHandle< IFileMgr >
ISvcLocator
Definition: ISvcLocator.h:46
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
Algorithm.h
IFileMgr
Definition: IFileMgr.h:294
IFileMgr.h
ServiceHandle.h
FileMgrTest::fp_3
FILE * fp_3
Definition: FileMgrTest.h:39
FileMgrTest::execute
StatusCode execute() override
Definition: FileMgrTest.cpp:177
FileMgrTest::m_fr1
std::string m_fr1
Definition: FileMgrTest.h:41
StatusCode
Definition: StatusCode.h:65
FileMgrTest::fp_r2
TFile * fp_r2
Definition: FileMgrTest.h:40
FileMgrTest::initialize
StatusCode initialize() override
Definition: FileMgrTest.cpp:34
FileMgrTest::fp_1
FILE * fp_1
Definition: FileMgrTest.h:39
FileMgrTest::allCloseAction
StatusCode allCloseAction(FILEMGR_CALLBACK_ARGS)
Definition: FileMgrTest.cpp:303
FileMgrTest::FileMgrTest
FileMgrTest(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FileMgrTest.cpp:30
Io::Fd
int Fd
Definition: IFileMgr.h:169
FileMgrTest::fd_2
Io::Fd fd_2
Definition: FileMgrTest.h:38
FileMgrTest::m_fr3
std::string m_fr3
Definition: FileMgrTest.h:41
FileMgrTest::m_f1
std::string m_f1
Definition: FileMgrTest.h:41
FileMgrTest::PosixOpenAction
StatusCode PosixOpenAction(FILEMGR_CALLBACK_ARGS)
Definition: FileMgrTest.cpp:282
FILEMGR_CALLBACK_ARGS
#define FILEMGR_CALLBACK_ARGS
Definition: IFileMgr.h:287
FileMgrTest::m_f4
std::string m_f4
Definition: FileMgrTest.h:41
FileMgrTest::fd_3
Io::Fd fd_3
Definition: FileMgrTest.h:38
FileMgrTest::m_fr2
std::string m_fr2
Definition: FileMgrTest.h:41
FileMgrTest::fp_r3
TFile * fp_r3
Definition: FileMgrTest.h:40
FileMgrTest::m_f2
std::string m_f2
Definition: FileMgrTest.h:41