Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
sbncode
sbncode
Metadata
FileCatalogMetadataSBN.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Name: FileCatalogMetadataSBN.h.
4
//
5
// Purpose: Art service adds microboone-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
// ProjectSoftware - Project software information.
14
// ProductionName - Production campaign name.
15
// ProductionType - Production campaign type.
16
// Merge - Merge flag.
17
// 1 - Set merge.merge = 1 and merge.merged = 0
18
// 0 - Set merge.merge = 0 and merge.merged = 0
19
// -1 - Do not generate merge parameters.
20
// Parameters - Arbitrary (key, value) parameters.
21
// Specify in fcl file as sequence-of-sequence:
22
// [[key1, value1], [key2, value2],...]
23
// POTModuleLabel - POTSummary module label (default "generator").
24
//
25
// Above values will be added in internal metadata of artroot
26
// output files whenever this service is included in job
27
// configuration (service does not need to be called). The
28
// public interface of this service consists of accessors that
29
// allow other code to discover above metadata parameters.
30
//
31
// Created: 28-Oct-2014, H. Greenlee
32
//
33
////////////////////////////////////////////////////////////////////////
34
35
#ifndef FILECATALOGMETADATASBN_H
36
#define FILECATALOGMETADATASBN_H
37
38
#include "fhiclcpp/ParameterSet.h"
39
#include "art/Framework/Services/Registry/ActivityRegistry.h"
40
#include "art/Framework/Services/Registry/ServiceDeclarationMacros.h"
41
42
namespace
util {
43
44
class
FileCatalogMetadataSBN
45
{
46
public
:
47
48
// Constructor, destructor.
49
50
FileCatalogMetadataSBN
(fhicl::ParameterSet
const
& pset, art::ActivityRegistry& reg);
51
~FileCatalogMetadataSBN
() =
default
;
52
53
// Accessors.
54
55
const
std::string&
GetFCLName
()
const
{
return
fFCLName
;}
56
const
std::string&
GetProjectName
()
const
{
return
fProjectName
;}
57
const
std::string&
GetProjectStage
()
const
{
return
fProjectStage
;}
58
const
std::string&
GetProjectVersion
()
const
{
return
fProjectVersion
;}
59
const
std::string&
GetProjectSoftware
()
const
{
return
fProjectSoftware
;}
60
const
std::string&
GetProductionName
()
const
{
return
fProductionName
;}
61
const
std::string&
GetProductionType
()
const
{
return
fProductionType
;}
62
int
GetMerge
()
const
{
return
fMerge
;}
63
const
std::vector<std::pair<std::string, std::string>>&
GetParameters
()
const
{
return
fParameters
;}
64
65
private
:
66
67
// Callbacks.
68
69
void
postBeginJob
();
70
void
postEndSubRun
(art::SubRun
const
& subrun);
71
void
preCloseOutputFile
(
const
std::string& label);
72
73
// Data members.
74
75
std::string
fExperiment
;
76
std::string
fFCLName
;
77
std::string
fProjectName
;
78
std::string
fProjectStage
;
79
std::string
fProjectVersion
;
80
std::string
fProjectSoftware
;
81
std::string
fProductionName
;
//Production parameter, do not use if not running a production
82
std::string
fProductionType
;
//Production parameter, do not use if not running a production
83
int
fMerge
;
84
std::vector<std::pair<std::string, std::string>>
fParameters
;
85
std::string
fPOTModuleLabel
;
86
double
fTotPOT
;
87
};
88
89
}
// namespace util
90
91
DECLARE_ART_SERVICE(
util::FileCatalogMetadataSBN
, LEGACY)
92
93
#endif
util::FileCatalogMetadataSBN::fMerge
int fMerge
Definition:
FileCatalogMetadataSBN.h:83
util::FileCatalogMetadataSBN::GetProjectStage
const std::string & GetProjectStage() const
Definition:
FileCatalogMetadataSBN.h:57
util::FileCatalogMetadataSBN
Definition:
FileCatalogMetadataSBN.h:44
util::FileCatalogMetadataSBN::fPOTModuleLabel
std::string fPOTModuleLabel
Definition:
FileCatalogMetadataSBN.h:85
util::FileCatalogMetadataSBN::fParameters
std::vector< std::pair< std::string, std::string > > fParameters
Definition:
FileCatalogMetadataSBN.h:84
util::FileCatalogMetadataSBN::GetProjectVersion
const std::string & GetProjectVersion() const
Definition:
FileCatalogMetadataSBN.h:58
util::FileCatalogMetadataSBN::GetProjectSoftware
const std::string & GetProjectSoftware() const
Definition:
FileCatalogMetadataSBN.h:59
util::FileCatalogMetadataSBN::FileCatalogMetadataSBN
FileCatalogMetadataSBN(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
Definition:
FileCatalogMetadataSBN_service.cc:24
util::FileCatalogMetadataSBN::postBeginJob
void postBeginJob()
Definition:
FileCatalogMetadataSBN_service.cc:56
util::FileCatalogMetadataSBN::fProductionName
std::string fProductionName
Definition:
FileCatalogMetadataSBN.h:81
util::FileCatalogMetadataSBN::preCloseOutputFile
void preCloseOutputFile(const std::string &label)
Definition:
FileCatalogMetadataSBN_service.cc:96
util::FileCatalogMetadataSBN::GetParameters
const std::vector< std::pair< std::string, std::string > > & GetParameters() const
Definition:
FileCatalogMetadataSBN.h:63
util::FileCatalogMetadataSBN::fTotPOT
double fTotPOT
Definition:
FileCatalogMetadataSBN.h:86
util::FileCatalogMetadataSBN::GetFCLName
const std::string & GetFCLName() const
Definition:
FileCatalogMetadataSBN.h:55
util::FileCatalogMetadataSBN::postEndSubRun
void postEndSubRun(art::SubRun const &subrun)
Definition:
FileCatalogMetadataSBN_service.cc:85
util::FileCatalogMetadataSBN::GetMerge
int GetMerge() const
Definition:
FileCatalogMetadataSBN.h:62
util::FileCatalogMetadataSBN::fFCLName
std::string fFCLName
Definition:
FileCatalogMetadataSBN.h:76
util::FileCatalogMetadataSBN::fProjectStage
std::string fProjectStage
Definition:
FileCatalogMetadataSBN.h:78
util::FileCatalogMetadataSBN::fProjectVersion
std::string fProjectVersion
Definition:
FileCatalogMetadataSBN.h:79
util::FileCatalogMetadataSBN::fProjectName
std::string fProjectName
Definition:
FileCatalogMetadataSBN.h:77
util::FileCatalogMetadataSBN::GetProjectName
const std::string & GetProjectName() const
Definition:
FileCatalogMetadataSBN.h:56
util::FileCatalogMetadataSBN::fProductionType
std::string fProductionType
Definition:
FileCatalogMetadataSBN.h:82
util::FileCatalogMetadataSBN::fProjectSoftware
std::string fProjectSoftware
Definition:
FileCatalogMetadataSBN.h:80
util::FileCatalogMetadataSBN::fExperiment
std::string fExperiment
Definition:
FileCatalogMetadataSBN.h:75
util::FileCatalogMetadataSBN::GetProductionType
const std::string & GetProductionType() const
Definition:
FileCatalogMetadataSBN.h:61
util::FileCatalogMetadataSBN::GetProductionName
const std::string & GetProductionName() const
Definition:
FileCatalogMetadataSBN.h:60
util::FileCatalogMetadataSBN::~FileCatalogMetadataSBN
~FileCatalogMetadataSBN()=default
Generated by
1.8.5