Public Member Functions | Private Member Functions | Private Attributes | List of all members
util::FileCatalogMetadataMPD Class Reference

#include <FileCatalogMetadataMPD.h>

Public Member Functions

 FileCatalogMetadataMPD (fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
 
 ~FileCatalogMetadataMPD ()=default
 
const std::stringGenerators () const
 
const std::stringTriggerListVersion () const
 
const std::stringBeamFluxID () const
 
const std::stringMCName () const
 
const std::stringNeutrinoFlavors () const
 
const std::stringMiscellaneous () const
 
const std::stringGeometryVersion () const
 
const std::stringOverlay () const
 
const std::stringRun_Type () const
 
const std::stringData_Tier () const
 
const std::stringApplName () const
 
const std::stringEnvVarVer () const
 
const std::stringSystematic () const
 
const std::stringHornPolarity () const
 

Private Member Functions

void postBeginJob ()
 

Private Attributes

std::string fGenerators
 
std::string fTriggerListVersion
 
std::string fBeamFluxID
 
std::string fMCName
 
std::string fNeutrinoFlavors
 
std::string fMiscellaneous
 
std::string fGeometryVersion
 
std::string fOverlay
 
std::string fRunType
 
std::string fDataTier
 
std::string fApplName
 
std::string fEnvVarVer
 
std::string fSystematic
 
std::string fHornPolarity
 

Detailed Description

Definition at line 32 of file FileCatalogMetadataMPD.h.

Constructor & Destructor Documentation

util::FileCatalogMetadataMPD::FileCatalogMetadataMPD ( fhicl::ParameterSet const &  pset,
art::ActivityRegistry reg 
)

Definition at line 23 of file FileCatalogMetadataMPD_service.cc.

24  {
25  // Get parameters.
26 
27  fGenerators = pset.get<std::string>("Generators","");
28  fTriggerListVersion = pset.get<std::string>("TriggerListVersion","");
29  fBeamFluxID = pset.get<std::string>("BeamFluxID","");
30  fMCName = pset.get<std::string>("MCName","");
31  fNeutrinoFlavors = pset.get<std::string>("NeutrinoFlavors","");
32  fMiscellaneous = pset.get<std::string>("Miscellaneous","");
33  fGeometryVersion = pset.get<std::string>("GeometryVersion","");
34  fOverlay = pset.get<std::string>("Overlay","");
35  fRunType = pset.get<std::string>("run_type","");
36  fDataTier = pset.get<std::string>("data_tier","");
37  fApplName = pset.get<std::string>("ApplName","garsoft");
38  fEnvVarVer = pset.get<std::string>("EnvVarVer","GARSOFT_VERSION");
39  fHornPolarity = pset.get<std::string>("HornPolarity","");
40 
41  // Register for callbacks.
42 
44  }
GlobalSignal< detail::SignalResponseType::FIFO, void()> sPostBeginJob
std::string string
Definition: nybbler.cc:12
util::FileCatalogMetadataMPD::~FileCatalogMetadataMPD ( )
default

Member Function Documentation

const std::string& util::FileCatalogMetadataMPD::ApplName ( ) const
inline

Definition at line 49 of file FileCatalogMetadataMPD.h.

49 { return fApplName; }
const std::string& util::FileCatalogMetadataMPD::BeamFluxID ( ) const
inline

Definition at line 41 of file FileCatalogMetadataMPD.h.

41 { return fBeamFluxID; }
const std::string& util::FileCatalogMetadataMPD::Data_Tier ( ) const
inline

Definition at line 48 of file FileCatalogMetadataMPD.h.

48 { return fDataTier; }
const std::string& util::FileCatalogMetadataMPD::EnvVarVer ( ) const
inline

Definition at line 50 of file FileCatalogMetadataMPD.h.

50 { return fEnvVarVer; }
const std::string& util::FileCatalogMetadataMPD::Generators ( ) const
inline

Definition at line 39 of file FileCatalogMetadataMPD.h.

39 { return fGenerators; }
const std::string& util::FileCatalogMetadataMPD::GeometryVersion ( ) const
inline

Definition at line 45 of file FileCatalogMetadataMPD.h.

const std::string& util::FileCatalogMetadataMPD::HornPolarity ( ) const
inline

Definition at line 52 of file FileCatalogMetadataMPD.h.

52 { return fHornPolarity; }
const std::string& util::FileCatalogMetadataMPD::MCName ( ) const
inline

Definition at line 42 of file FileCatalogMetadataMPD.h.

42 { return fMCName; }
const std::string& util::FileCatalogMetadataMPD::Miscellaneous ( ) const
inline

Definition at line 44 of file FileCatalogMetadataMPD.h.

44 { return fMiscellaneous; }
const std::string& util::FileCatalogMetadataMPD::NeutrinoFlavors ( ) const
inline

Definition at line 43 of file FileCatalogMetadataMPD.h.

const std::string& util::FileCatalogMetadataMPD::Overlay ( ) const
inline

Definition at line 46 of file FileCatalogMetadataMPD.h.

46 { return fOverlay; }
void util::FileCatalogMetadataMPD::postBeginJob ( )
private

Definition at line 49 of file FileCatalogMetadataMPD_service.cc.

50  {
51  // Get art metadata service.
52 
54 
55  // Add metadata.
56 
57  if (fGenerators!="") mds->addMetadata("DUNE.Generators", fGenerators);
58  if (fGenerators!="") mds->addMetadata("DUNE_MC.Generators", fGenerators);
59  if (fTriggerListVersion!="") mds->addMetadata("DUNE_MC.trigger-list-version", fTriggerListVersion);
60  if (fBeamFluxID!="") mds->addMetadata("DUNE_MC.beam_flux_ID", fBeamFluxID);
61  if (fMCName!="") mds->addMetadata("DUNE_MC.name", fMCName);
62  if (fNeutrinoFlavors!="") mds->addMetadata("DUNE_MC_neutrino_flavors", fNeutrinoFlavors);
63  if (fMiscellaneous!="") mds->addMetadata("DUNE_MC.miscellaneous", fMiscellaneous);
64  if (fGeometryVersion!="") mds->addMetadata("DUNE_MC.GeometryVersion", fGeometryVersion);
65  if (fOverlay!="") mds->addMetadata("DUNE_MC.Overlay", fOverlay);
66  if (fSystematic!="") mds->addMetadata("DUNE_MC.Systematic", fSystematic);
67  if (fRunType!="") mds->addMetadata("run_type", fRunType);
68  if (fDataTier!="") mds->addMetadata("data_tier", fDataTier); // e.g. "reco"
69  if (fApplName!="") mds->addMetadata("application.family", fApplName); // e.g. "garsoft"
70  if (fDataTier!="") mds->addMetadata("application.name", fDataTier); // e.g. "reco"
71  if (fEnvVarVer!="") mds->addMetadata("application.version", getenv(fEnvVarVer.c_str()));
72  if (fHornPolarity!="") mds->addMetadata("DUNE_MC.HornPolarity", fHornPolarity);
73  }
std::string getenv(std::string const &name)
Definition: getenv.cc:15
void addMetadata(std::string const &key, std::string const &value)
const std::string& util::FileCatalogMetadataMPD::Run_Type ( ) const
inline

Definition at line 47 of file FileCatalogMetadataMPD.h.

47 { return fRunType; }
const std::string& util::FileCatalogMetadataMPD::Systematic ( ) const
inline

Definition at line 51 of file FileCatalogMetadataMPD.h.

51 { return fSystematic; }
const std::string& util::FileCatalogMetadataMPD::TriggerListVersion ( ) const
inline

Definition at line 40 of file FileCatalogMetadataMPD.h.

Member Data Documentation

std::string util::FileCatalogMetadataMPD::fApplName
private

Definition at line 73 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fBeamFluxID
private

Definition at line 65 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fDataTier
private

Definition at line 72 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fEnvVarVer
private

Definition at line 74 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fGenerators
private

Definition at line 63 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fGeometryVersion
private

Definition at line 69 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fHornPolarity
private

Definition at line 76 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fMCName
private

Definition at line 66 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fMiscellaneous
private

Definition at line 68 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fNeutrinoFlavors
private

Definition at line 67 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fOverlay
private

Definition at line 70 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fRunType
private

Definition at line 71 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fSystematic
private

Definition at line 75 of file FileCatalogMetadataMPD.h.

std::string util::FileCatalogMetadataMPD::fTriggerListVersion
private

Definition at line 64 of file FileCatalogMetadataMPD.h.


The documentation for this class was generated from the following files: