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 +
" is not a number, which was needed.";
79 unsigned int length = 0;
86 if ( !dir.empty() ) name << dir <<
"/";
87 for (
unsigned int i = 0; i < length; ++i ) {
90 name << iFile << extension;
94 size_t pos = stem.
rfind(
"_" );
95 stem = stem.
substr( 0, pos );
100 unsigned int length = 0;
106 name << dir <<
"/" << stem;
107 for (
unsigned int i = 0; i < length; ++i ) {
108 if ( i == 0 ) name <<
"_";
111 name << iFile << extension;
bool isEventAccepted() const
Test whether this event should be output.
virtual const std::string & message() const
error message to be printed
constexpr static const auto FAILURE
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.
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.
constexpr static const auto SUCCESS
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