#include <MetadataSBN.h>
|
| MetadataSBN (fhicl::ParameterSet const &pset, art::ActivityRegistry ®) |
|
void | GetMetadataMaps (std::map< std::string, std::string > &strs, std::map< std::string, int > &ints, std::map< std::string, double > &doubles, std::map< std::string, std::string > &objs) |
|
Definition at line 32 of file MetadataSBN.h.
util::MetadataSBN::MetadataSBN |
( |
fhicl::ParameterSet const & |
pset, |
|
|
art::ActivityRegistry & |
reg |
|
) |
| |
void util::MetadataSBN::GetMetadataMaps |
( |
std::map< std::string, std::string > & |
strs, |
|
|
std::map< std::string, int > & |
ints, |
|
|
std::map< std::string, double > & |
doubles, |
|
|
std::map< std::string, std::string > & |
objs |
|
) |
| |
Definition at line 310 of file MetadataSBN_service.cc.
315 strs.clear(); ints.clear(); doubles.clear(); objs.clear();
323 char endbuf[80], startbuf[80];
326 strftime(endbuf,
sizeof(endbuf),
"%Y-%m-%dT%H:%M:%S",&tstruct);
328 strftime(startbuf,
sizeof(startbuf),
"%Y-%m-%dT%H:%M:%S",&tstruct);
330 strs[
"start_time"] = startbuf;
331 strs[
"end_time"] = endbuf;
352 ints[
"merge.merge"] = (
md.
merge==0 ? 0 : 1);
353 ints[
"merge.merged"] = 0;
std::string util::MetadataSBN::GetParentsString |
( |
| ) |
const |
|
private |
Definition at line 272 of file MetadataSBN_service.cc.
278 std::string ret =
"[\n";
280 std::cout<<
"Parent " << c <<
": " << parent << std::endl;
282 size_t n = parent.find_last_of(
'/');
283 size_t f1 = (n == std::string::npos ? 0 : n+1);
284 ret +=
" {\n \"file_name\": \"" + parent.substr(f1) +
"\"\n }";
BEGIN_PROLOG could also be cout
std::string util::MetadataSBN::GetRunsString |
( |
| ) |
const |
|
private |
Definition at line 294 of file MetadataSBN_service.cc.
298 std::string ret =
"[\n";
std::string to_string(WindowPattern const &pattern)
void util::MetadataSBN::postBeginJob |
( |
| ) |
|
|
private |
Definition at line 174 of file MetadataSBN_service.cc.
180 art::ServiceHandle<art::FileCatalogMetadata> artmds;
182 art::FileCatalogMetadata::collection_type artmd;
183 artmds->getMetadata(artmd);
185 std::map<std::string, std::string> mdmap;
186 for(
const auto& d: artmd)
void util::MetadataSBN::postBeginSubRun |
( |
art::SubRun const & |
subrun | ) |
|
|
private |
Definition at line 234 of file MetadataSBN_service.cc.
236 art::RunNumber_t run = sr.run();
237 art::SubRunNumber_t subrun = sr.subRun();
238 art::SubRunID srid = sr.id();
void util::MetadataSBN::postCloseInputFile |
( |
| ) |
|
|
private |
Definition at line 360 of file MetadataSBN_service.cc.
379 std::map<std::string, std::string> strs;
380 std::map<std::string, int> ints;
381 std::map<std::string, double> doubles;
382 std::map<std::string, std::string> objs;
391 std::ofstream jsonfile;
397 if(!once) jsonfile <<
",\n";
399 jsonfile <<
" \"" << it.first <<
"\": " << it.second;
403 jsonfile <<
",\n \"" << it.first <<
"\": \"" << it.second <<
"\"";
406 jsonfile <<
",\n \"" << it.first <<
"\": " << it.second;
408 for(
auto& it: doubles){
409 jsonfile <<
",\n \"" << it.first <<
"\": " << it.second;
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
void util::MetadataSBN::postEndSubRun |
( |
art::SubRun const & |
subrun | ) |
|
|
private |
Definition at line 249 of file MetadataSBN_service.cc.
251 art::Handle< sumdata::POTSummary > potListHandle;
254 fTotPOT+=potListHandle->totpot;
void util::MetadataSBN::postEvent |
( |
art::Event const & |
ev, |
|
|
art::ScheduleContext |
|
|
) |
| |
|
private |
void util::MetadataSBN::postOpenInputFile |
( |
std::string const & |
fn | ) |
|
|
private |
std::vector<std::string> util::MetadataSBN::fDataTier |
|
private |
std::string util::MetadataSBN::fExperiment |
|
private |
std::vector<std::string> util::MetadataSBN::fFileFormat |
|
private |
art::FileStatsCollector util::MetadataSBN::fFileStats |
|
private |
std::vector<std::string> util::MetadataSBN::fJSONFileName |
|
private |
std::vector<int> util::MetadataSBN::fMerge |
|
private |
std::string util::MetadataSBN::fPOTModuleLabel |
|
private |
art::PostCloseFileRenamer util::MetadataSBN::fRenamer {fFileStats} |
|
private |
std::string util::MetadataSBN::frunType |
|
private |
std::set<art::SubRunID> util::MetadataSBN::fSubRunNumbers |
std::map<std::string, double> util::MetadataSBN::mdmapDouble |
|
private |
std::map<std::string, int> util::MetadataSBN::mdmapInt |
|
private |
std::map<std::string, std::string> util::MetadataSBN::mdmapObj |
|
private |
std::map<std::string,std::string> util::MetadataSBN::mdmapStr |
|
private |
The documentation for this class was generated from the following files: