All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FileCatalogMetadataICARUS.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Name: FileCatalogMetadataICARUS.h.
4 //
5 // Purpose: Art service adds icarus-specific per-job sam metadata.
6 //
7 // FCL parameters:
8 //
9 // FCLName - FCL file name.
10 // ProjectName - Project name.
11 // ProjectStage - Project stage.
12 // ProjectVersion - Project version.
13 // ProductionName - Production name.
14 // ProductionType - Production type.
15 //
16 // Above values will be added in internal metadata of artroot
17 // output files whenever this service is included in job
18 // configuration (service does not need to be called). The
19 // public interface of this service consists of accessors that
20 // allow other code to discover above metadata parameters.
21 //
22 // Created: 30-Dec-2019, M. Wospakrik
23 // based on the MicroBooNE version by H. Greenlee
24 //
25 ////////////////////////////////////////////////////////////////////////
26 
27 #ifndef FILECATALOGMETADATAICARUS_H
28 #define FILECATALOGMETADATAICARUS_H
29 
30 #include "fhiclcpp/ParameterSet.h"
31 #include "art/Framework/Services/Registry/ActivityRegistry.h"
32 #include "art/Framework/Services/Registry/ServiceDeclarationMacros.h"
33 
34 namespace icarusutil {
35 
37  {
38  public:
39 
40  // Constructor, destructor.
41 
42  FileCatalogMetadataICARUS(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg);
43  ~FileCatalogMetadataICARUS() = default;
44 
45  // Accessors.
46 
47  const std::string& GetFCLName() const {return fFCLName;}
48  const std::string& GetProjectName() const {return fProjectName;}
49  const std::string& GetProjectStage() const {return fProjectStage;}
50  const std::string& GetProjectVersion() const {return fProjectVersion;}
51  const std::string& GetProjectSoftware() const {return fProjectSoftware;}
52  const std::string& GetProductionName() const {return fProductionName;}
53  const std::string& GetProductionType() const {return fProductionType;}
54  int Merge() const {return fMerge;}
55  const std::vector<std::string>& Parameters() const {return fParameters;}
56 
57 
58  private:
59 
60  // Callbacks.
61 
62  void postBeginJob();
63 
64  // Data members.
65 
66  std::string fFCLName;
67  std::string fProjectName;
68  std::string fProjectStage;
69  std::string fProjectVersion;
70  std::string fProjectSoftware;
71  std::string fProductionName; //Production parameter, do not use if not running a production
72  std::string fProductionType; //Production parameter, do not use if not running a production
73  int fMerge;
74  std::vector<std::string> fParameters;
75  };
76 
77 } // namespace icarusutil
78 
79 DECLARE_ART_SERVICE(icarusutil::FileCatalogMetadataICARUS, LEGACY)
80 
81 #endif
const std::vector< std::string > & Parameters() const
const std::string & GetProjectVersion() const
const std::string & GetProductionName() const
const std::string & GetProjectStage() const
FileCatalogMetadataICARUS(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
const std::string & GetProductionType() const
const std::string & GetProjectSoftware() const