lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
detector::EventIteratorSimulator Class Reference

DirFileIterator whose next() wraps the next matching file in an EventSimulator. More...

#include <DataSourceSimulator.hh>

Inherits psalg::DirFileIterator.

Public Member Functions

 EventIteratorSimulator (const char *dirname, const char *pattern)
 Iterate over the files of dirname whose names contain pattern (all files if pattern is null).
 
virtual ~EventIteratorSimulator ()
 Delete the current EventSimulator, if any.
 
EventSimulator & next ()
 Delete the previous EventSimulator and return a new one for the next matching file name.
 
- Public Member Functions inherited from 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).
 
 ~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.
 

Detailed Description

DirFileIterator whose next() wraps the next matching file in an EventSimulator.

Constructor & Destructor Documentation

◆ EventIteratorSimulator()

detector::EventIteratorSimulator::EventIteratorSimulator ( const char *  dirname,
const char *  pattern 
)
inline

Iterate over the files of dirname whose names contain pattern (all files if pattern is null).

◆ ~EventIteratorSimulator()

virtual detector::EventIteratorSimulator::~EventIteratorSimulator ( )
inlinevirtual

Delete the current EventSimulator, if any.

Member Function Documentation

◆ next()

EventSimulator & detector::EventIteratorSimulator::next ( )
inline

Delete the previous EventSimulator and return a new one for the next matching file name.

When no file is left the name is empty, so the returned event's file cannot be opened.


The documentation for this class was generated from the following file: