Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
Framework
Art
find_config.cc
Go to the documentation of this file.
1
// ======================================================================
2
//
3
// find_config
4
//
5
// ======================================================================
6
7
#include "
art/Framework/Art/find_config.h
"
8
9
#include "
cetlib/search_path.h
"
10
#include "cetlib_except/exception.h"
11
12
bool
13
art::find_config
(
std::string
const
&
filename
,
14
std::string
const
& search_path_spec,
15
std::string
& full_path)
16
{
17
try
{
18
cet::search_path
sp(search_path_spec);
19
if
(!sp.
find_file
(filename, full_path)) {
20
return
false
;
21
}
22
}
23
catch
(
cet::exception
const
&
e
) {
24
if
(e.root_cause() ==
"getenv"
) {
25
// Assume file is findable as specified.
26
full_path =
filename
;
27
}
else
{
28
throw
;
29
}
30
}
31
return
true
;
32
}
string
std::string string
Definition:
nybbler.cc:12
train.filename
string filename
Definition:
train.py:213
e
const double e
Definition:
gUpMuFluxGen.cxx:165
art::find_config
bool find_config(std::string const &filename, std::string const &search_path_spec, std::string &full_path)
Definition:
find_config.cc:13
cet::search_path::find_file
std::string find_file(std::string const &filename) const
Definition:
search_path.cc:96
search_path.h
find_config.h
cet::search_path
Definition:
search_path.h:36
fhicl::exception
cet::coded_exception< error, detail::translate > exception
Definition:
exception.h:33
Generated by
1.8.11