5#ifndef OUTPUTSTREAMSEQUENCERSVC_H
6#define OUTPUTSTREAMSEQUENCERSVC_H
13#include "GaudiKernel/ServiceHandle.h"
14#include "Gaudi/Property.h"
15#include "GaudiKernel/IIncidentListener.h"
33 using IService::interfaceID;
46 virtual StatusCode
initialize() override final;
48 virtual StatusCode
finalize() override final;
51 virtual
void handle(
const Incident& ) override final;
65 std::string
setRangeID(
const std::string & rangeID);
97 "Name of the incident that signals the next Event Range start" };
100 "If True, keep info about Ranges for getRangeReport() calls"};
105 this,
"ReplaceRangeMode",
false,
106 "If True, everything between [ and ] in the output filename is treated "
107 "as a comma-separated list, and the range_idth element of the list is "
std::pair< std::string, std::string > RangeReport_t
void publishRangeReport(const std::string &outputFile)
bool inUse() const
Is the service in active use? (true after the first range incident is handled)
OutputStreamSequencerSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual void handle(const Incident &) override final
Incident service handle.
std::string currentRangeID() const
The current Event Range ID (only one range is returned)
RangeReport_ptr getRangeReport()
std::string m_lastFileName
Recently constructed full file name (useful in single threaded processing)
StringProperty m_incidentName
SequenceIncidentName, incident name for triggering file sequencing.
std::string setRangeID(const std::string &rangeID)
set the RangeID (possibly temporarily) so the right Range Filename may be generated
ServiceHandle< MetaDataSvc > m_metaDataSvc
int m_fileSequenceNumber
The event sequence number.
BooleanProperty m_replaceRangeMode
Flag to put in ReplaceRangeMode (i.e.
virtual StatusCode finalize() override final
Required of all Gaudi services:
std::string incidentName() const
The name of the incident that starts a new event sequence.
std::string buildSequenceFileName(const std::string &)
Returns sequenced file name for output stream.
std::string m_currentRangeID
Current EventRange ID constructed on the last NextRange incident.
const std::string & lastIncident()
Last incident type that was handled.
virtual ~OutputStreamSequencerSvc()
Destructor.
std::vector< std::string > m_rangeIDinSlot
EventRange ID for all slots.
BooleanProperty m_reportingOn
Flag to switch on storage of reporting info in fnToRangeId.
static bool inConcurrentEventsMode()
Are there concurrent events? (threads>1)
std::string m_lastIncident
Last incident type that was handled.
std::unique_ptr< RangeReport_t > RangeReport_ptr
std::map< std::string, std::string >::iterator m_finishedRange
virtual StatusCode initialize() override final
Required of all Gaudi services:
std::map< std::string, std::string > m_fnToRangeId