Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
16 #include "TSSLSocket.h"
21 # include <ext/stdio_filebuf.h>
22 #endif // not __APPLE__
39 m_f1 =
"/etc/redhat-release";
45 m_fr2 =
"http://annwm.lbl.gov/~leggett/tuple2.rt";
46 m_fr3 =
"https://t-dpm.grid.sinica.edu.tw/dpm/grid.sinica.edu.tw/home/atlas/atlasppsscratchdisk/mc10_7TeV/AOD/"
47 "e574_s1110_s1100_r1655_r1700/"
48 "mc10_7TeV.105805.filtered_minbias6.merge.AOD.e574_s1110_s1100_r1655_r1700_tid261524_00/"
49 "AOD.261524._032551.pool.root.1";
52 error() <<
"unable to get the FileMgr" <<
endmsg;
55 debug() <<
"got the FileMgr" <<
endmsg;
61 error() <<
"unable to register POSIX file open action with FileMgr" <<
endmsg;
65 error() <<
"unable to register POSIX file open ERR action with FileMgr" <<
endmsg;
71 error() <<
"unable to register all Close action with FileMgr" <<
endmsg;
78 error() <<
"unable to open " <<
m_f1 <<
" for reading" <<
endmsg;
82 info() <<
"opened " <<
m_f1 <<
" for reading with FD: " <<
fd_1 <<
" FILE* " <<
fp_1 <<
endmsg;
87 error() <<
"unable to open " <<
m_f2 <<
" for writing" <<
endmsg;
91 info() <<
"opened " <<
m_f2 <<
" for writing with FD: " <<
fd_2 <<
" FILE* " <<
fp_2 <<
endmsg;
101 error() <<
"unable to open " <<
m_f3 <<
" for write|append" <<
endmsg;
105 info() <<
"opened " <<
m_f3 <<
" for reading with FD: " <<
fd_3 <<
" FILE* " <<
fp_3 <<
endmsg;
110 error() <<
"the following error is expected" <<
endmsg;
113 info() <<
"unable to open " <<
m_f2 <<
" for WRITE|CREATE|EXCL - expected as file already exists" <<
endmsg;
115 error() <<
"opened " <<
m_f2 <<
" for reading with FD: " <<
fd <<
" This should not occur!" <<
endmsg;
120 error() <<
"unable to open " <<
m_f1 <<
" again for reading" <<
endmsg;
123 info() <<
"opened " <<
m_f1 <<
" again for reading with FD: " <<
fd_4 <<
" FILE* " <<
fp_4 <<
endmsg;
129 error() <<
"unable to open " <<
m_fr1 <<
" again for reading" <<
endmsg;
132 info() <<
"opened " <<
m_fr1 <<
" for reading with ptr: " <<
fp_r1 <<
endmsg;
137 error() <<
"unable to open " <<
m_fr2 <<
" for reading" <<
endmsg;
140 info() <<
"opened " <<
m_fr2 <<
" for reading with ptr: " <<
fp_r2 <<
" size: " <<
fp_r2->GetSize() <<
endmsg;
152 error() <<
"unable to open " <<
m_fr3 <<
" for reading" <<
endmsg;
155 info() <<
"opened " <<
m_fr3 <<
" for reading with ptr: " <<
fp_r3 <<
" size: " <<
fp_r3->GetSize() <<
endmsg;
158 for (
int j = 0;
j < 2; ++
j ) {
161 error() <<
"unable to open t6.txt for writing" <<
endmsg;
163 info() <<
"opened t6.txt for writing, fd: " <<
fd <<
" will now close" <<
endmsg;
166 error() <<
"unable to close " <<
m_f1 <<
" with FD " <<
fd_1 <<
endmsg;
186 ofs.std::ios::rdbuf( &fb );
194 ofs2.std::ios::rdbuf( &fb2 );
196 #endif // not __APPLE__
210 log <<
"listing all open files [" << i <<
"]" <<
std::endl;
211 for ( itr =
v.begin(); itr !=
v.end(); ++itr ) {
log <<
" " << *itr <<
std::endl; }
216 for ( itr =
v.begin(); itr !=
v.end(); ++itr ) {
log <<
" " << *itr <<
std::endl; }
222 log <<
"listing all POSIX files ever opened [" << i <<
"]" <<
std::endl;
223 for ( it2 =
v2.begin(); it2 !=
v2.end(); ++it2 ) {
log <<
" " << ( *it2 )->name() <<
std::endl; }
230 error() <<
"unable to close " <<
m_f1 <<
" with FD " <<
fd_1 <<
endmsg;
237 error() <<
"unable to close " <<
m_f2 <<
" with FD " <<
fd_2 <<
endmsg;
244 error() <<
"unable to close " <<
m_f3 <<
" with FD " <<
fd_3 <<
endmsg;
251 error() <<
"unable to close " <<
m_f1 <<
" with FD " <<
fd_4 <<
endmsg;
285 info() <<
"PosixOpenAction called by " <<
c <<
" for tech " << fa->
tech() <<
" on " << fa <<
endmsg;
306 info() <<
"AllCloseAction called by " <<
c <<
" for tech " << fa->
tech() <<
" on " << fa <<
endmsg;
virtual int getFiles(std::vector< std::string > &FILES, bool onlyOpen=true) const =0
StatusCode finalize() override
const std::string & name() const override
The identifying name of the algorithm object.
an algorithm to test the FileMgr
Alias for backward compatibility.
StatusCode execute() override
virtual StatusCode regAction(Io::bfcn_action_t, const Io::Action &, const std::string &d="")=0
StatusCode initialize() override
StatusCode allCloseAction(FILEMGR_CALLBACK_ARGS)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual const std::string & fname(const Io::Fd &) const =0
constexpr static const auto SUCCESS
StatusCode PosixOpenAction(FILEMGR_CALLBACK_ARGS)
#define DECLARE_COMPONENT(type)
StatusCode service(std::string_view name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
virtual Io::close_t close(const Io::Fd, const std::string &caller)=0
constexpr static const auto FAILURE
virtual Io::open_t open(const Io::IoTech &, const std::string &caller, const std::string &fname, const Io::IoFlags &, Io::Fd &, void *&, const std::string &desc, const bool shared=false)=0
virtual void * fptr(const std::string &) const =0