#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 89 of file RootFileHandler.cpp.
89 {
90
92
93 if ( !ptr ) {
95 return -1;
96 }
97
98 TFile* tf = static_cast<TFile*>( ptr );
99
100 try {
101 tf->Close();
102 } catch ( const std::exception& Exception ) {
105 return -1;
106 } catch ( ... ) {
108 return -1;
109 }
110
111 return 0;
112}
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 31 of file RootFileHandler.cpp.
32 {
33
35
38
39 ptr = nullptr;
41
42 std::string opt;
43
45 opt = "READ";
47 opt = "NEW";
49 opt = "RECREATE";
51 opt = "UPDATE";
52 } else {
54 return 1;
55 }
56
57 std::unique_ptr<TFile> tf;
58
59 try {
60 tf.reset( TFile::Open(
n.c_str(), opt.c_str() ) );
61 } catch ( const std::exception& Exception ) {
63 <<
" file for reading: " <<
Exception.what() << std::endl
64 <<
" -> file probably corrupt." <<
endmsg;
65 return 1;
66 } catch ( ... ) {
68 return 1;
69 }
70
71 if ( !tf || !tf->IsOpen() ) {
72 m_log <<
MSG::ERROR <<
"Unable to open ROOT file \"" <<
n <<
"\" with options \"" << opt <<
"\"" <<
endmsg;
73
74 tf.reset();
75 return 1;
76 }
77
79
80 ptr = tf.release();
81
83
84 return 0;
85}
◆ reopenRootFile()
◆ setupSSL()
| bool RootFileHandler::setupSSL |
( |
| ) |
|
Definition at line 124 of file RootFileHandler.cpp.
124 {
125
127
128
131 return true;
132 }
133
134
138 return false;
139 }
140 }
141
145 return false;
146 }
147 }
148
151
153
155
156 return true;
157}
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: