12 #include "art/Framework/Services/Registry/ServiceHandle.h"
13 #include "art/Framework/Services/Registry/ServiceDefinitionMacros.h"
14 #include "art/Framework/Services/System/FileCatalogMetadata.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "art/Framework/Principal/Handle.h"
17 #include "cetlib_except/exception.h"
29 const char* expt = getenv(
"EXPERIMENT");
30 if(expt)
fExperiment = pset.get<std::string>(
"Experiment", expt);
else fExperiment = pset.get<std::string>(
"Experiment");
31 std::transform(fExperiment.begin(), fExperiment.end(), fExperiment.begin(), [](
unsigned char c){
return std::tolower(c);});
35 fFCLName = pset.get<std::string>(
"FCLName");
42 fMerge = pset.get<
int>(
"Merge", -1);
43 fParameters = pset.get<std::vector<std::pair<std::string, std::string>>>(
"Parameters", std::vector<std::pair<std::string, std::string>>());
60 art::ServiceHandle<art::FileCatalogMetadata> mds;
64 mds->addMetadata(
"fcl.name", fFCLName);
65 mds->addMetadata(fExperiment +
"_project.name", fProjectName);
66 mds->addMetadata(fExperiment +
"_project.stage", fProjectStage);
67 mds->addMetadata(fExperiment +
"_project.version", fProjectVersion);
68 mds->addMetadata(fExperiment +
"_project.software", fProjectSoftware);
69 mds->addMetadata(
"production.name", fProductionName);
70 mds->addMetadata(
"production.type", fProductionType);
71 std::ostringstream ostr;
74 mds->addMetadata(
"merge.merge",
"1");
76 mds->addMetadata(
"merge.merge",
"0");
77 mds->addMetadata(
"merge.merged",
"0");
79 for(
auto const& param : fParameters)
80 mds->addMetadata(param.first, param.second);
88 art::ServiceHandle<art::FileCatalogMetadata> mds;
90 art::Handle< sumdata::POTSummary > potListHandle;
91 if(sr.getByLabel(fPOTModuleLabel,potListHandle)){
92 fTotPOT+=potListHandle->totpot;}
99 art::ServiceHandle<art::FileCatalogMetadata> mds;
102 std::ostringstream streamObj;
103 streamObj << fTotPOT;
104 std::string strPOT = streamObj.str();
105 mds->addMetadata(
"mc.pot", strPOT);