56 #include "art_root_io/RootDB/SQLite3Wrapper.h" 57 #include "art_root_io/RootDB/SQLErrMsg.h" 58 #include "cetlib_except/exception.h" 62 #include "TTimeStamp.h" 75 fGenerateTFileMetadata(false)
126 for(
auto const &
d : artmd) {
135 if ((it=
mdmap.find(
"application.family"))!=
mdmap.end()) {
136 std::cout <<
"Setting applicationFamily: " << it->second <<
std::endl;
140 std::cout <<
"Setting applicationFamily: empty" <<
std::endl;
144 if ((it=
mdmap.find(
"art.process_name"))!=
mdmap.end()) {
145 std::cout <<
"Setting process_name: " << it->second <<
std::endl;
149 std::cout <<
"Setting process_name: empty" <<
std::endl;
288 char endbuf[80], startbuf[80];
291 strftime(endbuf,
sizeof(endbuf),
"%Y-%m-%dT%H:%M:%S",&tstruct);
293 strftime(startbuf,
sizeof(startbuf),
"%Y-%m-%dT%H:%M:%S",&tstruct);
300 std::ofstream jsonfile;
302 jsonfile<<
"{\n \"application\": {\n \"family\": "<<std::get<0>(
md.
fapplication)<<
",\n \"name\": ";
311 jsonfile<<
"\"group\": "<<
md.
fgroup<<
",\n ";
315 jsonfile<<
"\"parents\": [\n";
318 size_t n =
parent.find_last_of(
'/');
319 size_t f1 = (n == std::string::npos ? 0 : n+1);
320 jsonfile<<
" {\n \"file_name\": \""<<
parent.substr(f1)<<
"\"\n }";
322 else jsonfile<<
",\n";
327 jsonfile<<
"\"runs\": [\n";
330 jsonfile<<
" [\n "<<std::get<0>(
t)<<
",\n "<<std::get<1>(
t)<<
",\n "<<std::get<2>(
t)<<
"\n ]";
332 else jsonfile<<
",\n";
355 jsonfile<<
"\"start_time\": \""<<startbuf<<
"\",\n";
356 jsonfile<<
"\"end_time\": \""<<endbuf<<
"\"\n";
SubRunID const & subRunID() const
Namespace for general, non-LArSoft-specific utilities.
EventNumber_t event() const
GlobalSignal< detail::SignalResponseType::FIFO, void()> sPostBeginJob
GlobalSignal< detail::SignalResponseType::LIFO, void()> sPostEndJob
GlobalSignal< detail::SignalResponseType::LIFO, void(SubRun const &)> sPostBeginSubRun
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
std::string const & fileName() const
T get(std::string const &key) const
IDNumber_t< Level::SubRun > SubRunNumber_t
SubRunNumber_t subRun() const
GlobalSignal< detail::SignalResponseType::LIFO, void(Event const &, ScheduleContext)> sPostProcessEvent
#define DEFINE_ART_SERVICE(svc)
GlobalSignal< detail::SignalResponseType::LIFO, void(std::string const &)> sPostOpenFile
IDNumber_t< Level::Event > EventNumber_t
GlobalSignal< detail::SignalResponseType::LIFO, void(OutputFileInfo const &)> sPostCloseOutputFile
static constexpr double sr
def parent(G, child, parent_type)
QTextStream & endl(QTextStream &s)
IDNumber_t< Level::Run > RunNumber_t