5 #include <boost/filesystem.hpp> 21 namespace bf =
boost::filesystem;
57 bf::path dir = outputPath.parent_path();
58 string stem = outputPath.stem().string();
59 string extension = outputPath.extension().string();
62 if ( !bf::exists( dir ) ) {
64 stream <<
"Directory " << dir <<
" does not exist.";
74 string msg =
"Filename " + filename
75 +
" is not a number, which was needed.";
80 unsigned int length = 0;
87 if ( !dir.empty() ) name << dir <<
"/";
88 for (
unsigned int i = 0; i < length; ++i ) {
91 name << iFile << extension;
95 size_t pos = stem.
rfind(
"_" );
96 stem = stem.
substr( 0, pos );
101 unsigned int length = 0;
107 name << dir <<
"/" << stem;
108 for (
unsigned int i = 0; i < length; ++i ) {
109 if ( i == 0 ) name <<
"_";
112 name << iFile << extension;
bool isEventAccepted() const
Test whether this event should be output.
virtual const std::string & message() const
error message to be printed
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Define general base for Gaudi exception.
const std::string & name() const override
The identifying name of the algorithm object.
The namespace threadpool contains a thread pool and related utility classes.
StatusCode writeObjects() override
OutputStream override: Select the different objects and write them to file.
Gaudi::Property< std::string > m_outputName
Gaudi::Property< bool > m_numericFilename
#define DECLARE_COMPONENT(type)
virtual StatusCode writeObjects()
Select the different objects and write them to file.
StatusCode execute() override
This class is used for returning status codes from appropriate routines.
void clearSelection()
Clear list of selected objects.
Gaudi::Property< unsigned int > m_eventsPerFile
Extension of OutputStream to write run records after last event.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Gaudi::Property< unsigned int > m_nNumbersAdded