#include </builds/gaudi/Gaudi/GaudiSvc/src/FileMgr/RootFileHandler.h>
Definition at line 26 of file RootFileHandler.h.
◆ RootFileHandler()
RootFileHandler::RootFileHandler |
( |
IMessageSvc * | msg, |
|
|
const std::string & | userProxy, |
|
|
const std::string & | certDir ) |
◆ closeRootFile()
Io::close_t RootFileHandler::closeRootFile |
( |
void * | ptr | ) |
|
Definition at line 92 of file RootFileHandler.cpp.
92 {
93
95
96 if ( !ptr ) {
98 return -1;
99 }
100
101 TFile* tf = static_cast<TFile*>( ptr );
102
103 try {
104 tf->Close();
105 } catch ( const std::exception& Exception ) {
108 return -1;
109 } catch ( ... ) {
111 return -1;
112 }
113
114 return 0;
115}
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
◆ openRootFile()
Io::open_t RootFileHandler::openRootFile |
( |
const std::string & | n, |
|
|
const Io::IoFlags & | f, |
|
|
const std::string & | desc, |
|
|
Io::Fd & | fd, |
|
|
void *& | ptr ) |
Definition at line 34 of file RootFileHandler.cpp.
35 {
36
38
41
42 ptr = nullptr;
44
45 std::string opt;
46
48 opt = "READ";
50 opt = "NEW";
52 opt = "RECREATE";
54 opt = "UPDATE";
55 } else {
57 return 1;
58 }
59
60 std::unique_ptr<TFile> tf;
61
62 try {
63 tf.reset( TFile::Open(
n.c_str(), opt.c_str() ) );
64 } catch ( const std::exception& Exception ) {
66 <<
" file for reading: " <<
Exception.what() << std::endl
67 <<
" -> file probably corrupt." <<
endmsg;
68 return 1;
69 } catch ( ... ) {
71 return 1;
72 }
73
74 if ( !tf || !tf->IsOpen() ) {
75 m_log <<
MSG::ERROR <<
"Unable to open ROOT file \"" <<
n <<
"\" with options \"" << opt <<
"\"" <<
endmsg;
76
77 tf.reset();
78 return 1;
79 }
80
82
83 ptr = tf.release();
84
86
87 return 0;
88}
◆ reopenRootFile()
◆ setupSSL()
bool RootFileHandler::setupSSL |
( |
| ) |
|
Definition at line 127 of file RootFileHandler.cpp.
127 {
128
130
131
134 return true;
135 }
136
137
141 return false;
142 }
143 }
144
148 return false;
149 }
150 }
151
154
156
158
159 return true;
160}
GAUDI_API std::vector< std::string > getEnv()
get all environment variables
◆ m_certDir
std::string RootFileHandler::m_certDir |
|
private |
◆ m_level
int RootFileHandler::m_level |
|
private |
◆ m_log
◆ m_ssl_setup
bool RootFileHandler::m_ssl_setup = false |
|
private |
◆ m_userProxy
std::string RootFileHandler::m_userProxy |
|
private |
The documentation for this class was generated from the following files: