13#include "GaudiKernel/ServiceHandle.h"
14#include "GaudiKernel/IEvtSelector.h"
15#include "GaudiKernel/IIncidentSvc.h"
16#include "GaudiKernel/ToolHandle.h"
53 StatusCode
result = StatusCode::SUCCESS;
56 SmartIF<IIncidentSvc> incsvc{service(
"IncidentSvc")};
61 incsvc->addListener(
this,
"BeginEvent", 0);
65 ATH_MSG_ERROR(
"Could not locate the online event displays service");
66 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
91 std::ostringstream ostri;
94 std::string inputFileName = ostri.str();
95 ATH_MSG_DEBUG(
"copying the input file: '"<< inputFileName <<
"'...");
109 catch(std::runtime_error& err) {
111 ATH_MSG_WARNING(
"In finalize() -- Unable to produce new VP1 event file");
115 return StatusCode::SUCCESS;
132 unsigned int nLastFile =
m_nEvent - 1;
135 std::ostringstream ostri;
136 ostri <<
m_inputPoolFile <<
"._" << std::setw(4) << std::setfill(
'0') << nLastFile;
138 std::string inputFileName = ostri.str();
139 ATH_MSG_DEBUG(
"copying the input file: '"<< inputFileName <<
"'...");
154 catch(std::runtime_error& err) {
156 ATH_MSG_WARNING(
"In handle() -- Unable to produce new VP1 event file");
174 const EventContext& context = getContext();
185 localtime_r(&t_timestamp, <m);
189 <<
" - " <<
"Month: "<< 1 + ltm.tm_mon<<
" - "
190 <<
"Day: "<< ltm.tm_mday
191 <<
" - " "Time: "<< ltm.tm_hour <<
":" << ltm.tm_min <<
":" << ltm.tm_sec <<
"CEST"
194 std::ostringstream ostri;
195 ostri << 1900 + ltm.tm_year
196 <<
"-" << 1 + ltm.tm_mon
197 <<
"-" << ltm.tm_mday
198 <<
"T" << ltm.tm_hour <<
"-" << ltm.tm_min <<
"-" << ltm.tm_sec <<
"CEST";
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
unsigned long long m_eventNumber
ServiceHandle< IOnlineEventDisplaysSvc > m_onlineEDsvc
std::string m_destinationDir
std::string m_outputFileType
std::string m_humanTimestamp
VP1EventProd(const std::string &name, ISvcLocator *pSvcLocator)
std::string m_inputPoolFile
unsigned long m_runNumber
Gaudi::Property< bool > m_isOnline
bool m_createDestinationDir
void handle(const Incident &inc)
bool m_removeTempInputFiles
unsigned long m_timeStamp
void produceNewFile(const std::string &sourceFile, unsigned int runNumber, unsigned long long eventNumber, unsigned int timeStamp, const std::string &textLabel="")