12 #include "art/Framework/Services/Registry/ServiceHandle.h"
13 #include "art/Framework/Services/Registry/ServiceDefinitionMacros.h"
14 #include "art/Framework/Services/System/FileCatalogMetadata.h"
23 std::cout <<
"FileCatalogMetadataICARUS::parameterset begin" << std::endl;
24 fFCLName = pset.get<std::string>(
"FCLName");
32 fMerge = pset.get<
int>(
"Merge", 0);
33 fParameters = pset.get<std::vector<std::string> >(
"Parameters", std::vector<std::string>());
35 if(fParameters.size() % 2 != 0) {
36 throw cet::exception(
"FileCatalogMetadataICARUS")
37 <<
"Parameter vector has odd number of elements.\n";
44 std::cout <<
"FileCatalogMetadataICARUS::parameterset ends" << std::endl;
55 std::cout <<
"FileCatalogMetadataICARUS::postBeginJob() begin" << std::endl;
56 art::ServiceHandle<art::FileCatalogMetadata> mds;
59 mds->addMetadata(
"fcl.name", fFCLName);
60 mds->addMetadata(
"icarus_project.name", fProjectName);
61 mds->addMetadata(
"icarus_project.stage", fProjectStage);
62 mds->addMetadata(
"icarus_project.version", fProjectVersion);
63 mds->addMetadata(
"icarus_project.software", fProjectSoftware);
64 mds->addMetadata(
"production.name", fProductionName);
65 mds->addMetadata(
"production.type", fProductionType);
66 std::ostringstream ostr;
68 mds->addMetadata(
"merge.merge", ostr.str());
69 mds->addMetadata(
"merge.merged",
"0");
70 for(
unsigned int i=0; i<fParameters.size(); i += 2)
71 mds->addMetadata(fParameters[i], fParameters[i+1]);
72 std::cout <<
"FileCatalogMetadataICARUS::postBeginJob() end" << std::endl;
BEGIN_PROLOG could also be cout