Go to the documentation of this file.
   16 #include <TSSLSocket.h> 
   21 #  include <ext/stdio_filebuf.h>  
   22 #endif                           // not __APPLE__ 
   38   m_f1 = 
"/etc/redhat-release";
 
   44   m_fr2 = 
"http://annwm.lbl.gov/~leggett/tuple2.rt";
 
   45   m_fr3 = 
"https://t-dpm.grid.sinica.edu.tw/dpm/grid.sinica.edu.tw/home/atlas/atlasppsscratchdisk/mc10_7TeV/AOD/" 
   46           "e574_s1110_s1100_r1655_r1700/" 
   47           "mc10_7TeV.105805.filtered_minbias6.merge.AOD.e574_s1110_s1100_r1655_r1700_tid261524_00/" 
   48           "AOD.261524._032551.pool.root.1";
 
   51     error() << 
"unable to get the FileMgr" << 
endmsg;
 
   54     debug() << 
"got the FileMgr" << 
endmsg;
 
   60     error() << 
"unable to register POSIX file open action with FileMgr" << 
endmsg;
 
   64     error() << 
"unable to register POSIX file open ERR action with FileMgr" << 
endmsg;
 
   70     error() << 
"unable to register all Close action with FileMgr" << 
endmsg;
 
   77     error() << 
"unable to open " << 
m_f1 << 
" for reading" << 
endmsg;
 
   81     info() << 
"opened " << 
m_f1 << 
" for reading with FD: " << 
fd_1 << 
"  FILE* " << 
fp_1 << 
endmsg;
 
   86     error() << 
"unable to open " << 
m_f2 << 
" for writing" << 
endmsg;
 
   90     info() << 
"opened " << 
m_f2 << 
" for writing with FD: " << 
fd_2 << 
"  FILE* " << 
fp_2 << 
endmsg;
 
  100     error() << 
"unable to open " << 
m_f3 << 
" for write|append" << 
endmsg;
 
  104     info() << 
"opened " << 
m_f3 << 
" for reading with FD: " << 
fd_3 << 
"  FILE* " << 
fp_3 << 
endmsg;
 
  109   error() << 
"the following error is expected" << 
endmsg;
 
  112     info() << 
"unable to open " << 
m_f2 << 
" for WRITE|CREATE|EXCL - expected as file already exists" << 
endmsg;
 
  114     error() << 
"opened " << 
m_f2 << 
" for reading with FD: " << 
fd << 
"  This should not occur!" << 
endmsg;
 
  119     error() << 
"unable to open " << 
m_f1 << 
" again for reading" << 
endmsg;
 
  122     info() << 
"opened " << 
m_f1 << 
" again for reading with FD: " << 
fd_4 << 
" FILE* " << 
fp_4 << 
endmsg;
 
  128     error() << 
"unable to open " << 
m_fr1 << 
" again for reading" << 
endmsg;
 
  131     info() << 
"opened " << 
m_fr1 << 
" for reading with ptr: " << 
fp_r1 << 
endmsg;
 
  136     error() << 
"unable to open " << 
m_fr2 << 
" for reading" << 
endmsg;
 
  139     info() << 
"opened " << 
m_fr2 << 
" for reading with ptr: " << 
fp_r2 << 
" size: " << 
fp_r2->GetSize() << 
endmsg;
 
  151     error() << 
"unable to open " << 
m_fr3 << 
" for reading" << 
endmsg;
 
  154     info() << 
"opened " << 
m_fr3 << 
" for reading with ptr: " << 
fp_r3 << 
" size: " << 
fp_r3->GetSize() << 
endmsg;
 
  157   for ( 
int j = 0; 
j < 2; ++
j ) {
 
  160       error() << 
"unable to open t6.txt for writing" << 
endmsg;
 
  162       info() << 
"opened t6.txt for writing, fd: " << 
fd << 
" will now close" << 
endmsg;
 
  165         error() << 
"unable to close " << 
m_f1 << 
" with FD " << 
fd_1 << 
endmsg;
 
  185   ofs.std::ios::rdbuf( &fb );
 
  193   ofs2.std::ios::rdbuf( &fb2 );
 
  195 #endif // not __APPLE__ 
  209   log << 
"listing all open files [" << i << 
"]" << 
std::endl;
 
  210   for ( itr = 
v.begin(); itr != 
v.end(); ++itr ) { 
log << 
"    " << *itr << 
std::endl; }
 
  215   for ( itr = 
v.begin(); itr != 
v.end(); ++itr ) { 
log << 
"    " << *itr << 
std::endl; }
 
  221   log << 
"listing all POSIX files ever opened [" << i << 
"]" << 
std::endl;
 
  222   for ( it2 = 
v2.begin(); it2 != 
v2.end(); ++it2 ) { 
log << 
"    " << ( *it2 )->name() << 
std::endl; }
 
  229     error() << 
"unable to close " << 
m_f1 << 
" with FD " << 
fd_1 << 
endmsg;
 
  236     error() << 
"unable to close " << 
m_f2 << 
" with FD " << 
fd_2 << 
endmsg;
 
  243     error() << 
"unable to close " << 
m_f3 << 
" with FD " << 
fd_3 << 
endmsg;
 
  250     error() << 
"unable to close " << 
m_f1 << 
" with FD " << 
fd_4 << 
endmsg;
 
  284   info() << 
"PosixOpenAction called by " << 
c << 
"  for tech " << fa->
tech() << 
" on " << fa << 
endmsg;
 
  305   info() << 
"AllCloseAction called by " << 
c << 
"  for tech " << fa->
tech() << 
" on " << fa << 
endmsg;
 
  
 
ServiceHandle< IFileMgr > p_fileMgr
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.
StatusCode retrieve(T *&service) const override
Do the real retrieval of the Service.
virtual const std::string & fname(const Io::Fd &) const =0
constexpr static const auto SUCCESS
StatusCode PosixOpenAction(FILEMGR_CALLBACK_ARGS)
#define DECLARE_COMPONENT(type)
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