12 throwIfFileNotExist(
char const* fname)
14 std::ifstream
f(fname);
18 <<
"Input file not found: " << fname <<
".\n";
31 nextFile = fileList.begin();
32 endOfFiles = fileList.end();
39 if (nextFile == endOfFiles) {
43 auto pos = nextFile->find(
"://");
44 if (pos == std::string::npos) {
45 throwIfFileNotExist(nextFile->c_str());
46 uri = prependFileDesignation(*nextFile);
47 }
else if (nextFile->substr(0, pos) ==
"file") {
48 throwIfFileNotExist(nextFile->c_str() + pos + 3);
89 nextFile = fileList.begin();
93 std::vector<std::string>
97 return p.
get<std::vector<std::string>>(
"fileNames");
105 std::string
const s{
"file://"};
void doConfigure(std::vector< std::string > const &items) override
void doOutputFileOpened(std::string const &module_label) override
std::vector< std::string > extractFileListFromPset(fhicl::ParameterSet const &pset)
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)
std::string prependFileDesignation(std::string const &name) const
void doOutputModuleInitiated(std::string const &module_label, fhicl::ParameterSet const &pset) override
TrivialFileDelivery(Parameters const &config)
T get(std::string const &key) const
bool doIsSearchable() override
void doOutputFileClosed(std::string const &module_label, std::string const &file) override
void doEventSelected(std::string const &module_label, EventID const &event_id, HLTGlobalStatus const &acceptance_info) override
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
int doGetNextFileURI(std::string &uri, double &waitTime) override
void doUpdateStatus(std::string const &uri, FileDisposition status) override