|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Iterates over the entries of a directory whose names contain a pattern; next() returns dirname + "/" + name. More...
#include <DirFileIterator.hh>
Inherited by detector::EventIteratorSimulator.
Public Member Functions | |
| DirFileIterator (const char *dirname="/reg/neh/home/dubrovin/LCLS/con-detector/work/", const char *pattern=0) | |
| Open dirname with opendir() (a WARNING is logged if that fails) and keep pattern (null means every entry). | |
| ~DirFileIterator () | |
| Close the directory with closedir(), without checking that it was opened. | |
| const std::string & | next () |
| Return the next entry ("." and ".." included) whose name contains the pattern, as dirname + "/" + name, or an empty string when none is left. | |
Iterates over the entries of a directory whose names contain a pattern; next() returns dirname + "/" + name.
| psalg::DirFileIterator::DirFileIterator | ( | const char * | dirname = "/reg/neh/home/dubrovin/LCLS/con-detector/work/", |
| const char * | pattern = 0 |
||
| ) |
Open dirname with opendir() (a WARNING is logged if that fails) and keep pattern (null means every entry).
Only the pointers are kept, and the default dirname is a hard-coded /reg/neh/home/dubrovin path.
| psalg::DirFileIterator::~DirFileIterator | ( | ) |
Close the directory with closedir(), without checking that it was opened.
| const std::string & psalg::DirFileIterator::next | ( | ) |
Return the next entry ("." and ".." included) whose name contains the pattern, as dirname + "/" + name, or an empty string when none is left.
The returned reference refers to a member string overwritten by the next call; a directory that failed to open is not checked.