5 #include "TSSLSocket.h"
14 const std::string&
c):
15 m_log(msg,
"RootFileHandler"), m_userProxy(p), m_certDir(c),
20 static TROOT
root(
"root",
"ROOT I/O");
31 const std::string& desc,
Io::Fd& fd,
void*& ptr) {
37 << f <<
"," << desc <<
")"
62 if (n.find(
"https://") != std::string::npos ||
63 n.find(
"HTTPS://") != std::string::npos ||
64 n.find(
"http://") != std::string::npos ||
65 n.find(
"HTTP://") != std::string::npos ) {
70 <<
"requested mode is: " << f
75 if (!
m_ssl_setup && (n.find(
"https://") != std::string::npos ||
76 n.find(
"HTTPS://") != std::string::npos )) {
80 <<
"Unable to setup TSSLSocket for ROOT TWebFile access over https"
87 tf =
new TWebFile(n.c_str());
88 }
catch (
const std::exception& Exception) {
90 <<
" file for reading: " << Exception.what() << std::endl
91 <<
" -> file probably corrupt." <<
endmsg;
95 <<
"\": probably corrupt" <<
endmsg;
99 if (tf != 0 && tf->IsZombie()) {
101 <<
"\": file does not exist or in not accessible" <<
endmsg;
111 tf = TFile::Open(n.c_str(),opt.c_str());
112 }
catch (
const std::exception& Exception) {
114 <<
" file for reading: " << Exception.what() << std::endl
115 <<
" -> file probably corrupt." <<
endmsg;
119 <<
"\": probably corrupt" <<
endmsg;
125 if (tf == 0 || !tf->IsOpen()) {
127 <<
"\" with options \"" << opt <<
"\"" <<
endmsg;
162 TFile* tf = (TFile*) ptr;
166 }
catch (
const std::exception& Exception) {
168 <<
" file" << Exception.what()
172 m_log <<
MSG::ERROR <<
"Problems closing ROOT file \"" << tf->GetName()
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
MSG::Level level()
Retrieve output level.
Io::open_t openRootFile(const std::string &n, const Io::IoFlags &f, const std::string &desc, Io::Fd &fd, void *&ptr)
Io::close_t closeRootFile(void *ptr)
Io::reopen_t reopenRootFile(void *, const Io::IoFlags &)
virtual int outputLevel() const =0
Retrieve the current output level threshold.
The IMessage is the interface implemented by the message service.
string opt
print 'Summary: %32s [s] d d steps'%(summary.protocol,summary.type,summary.nevt,len(summary.data),)
void setLevel(int level)
Update outputlevel.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
RootFileHandler(IMessageSvc *, const std::string &userProxy, const std::string &certDir)