All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
icarus::trigger::FixBeamGateInfo::Config Struct Reference

Classes

struct  ChangeGate
 Settings to change a gate. More...
 

Public Types

enum  BeamType_t { BeamType_t::kUnknown = sim::kUnknown, BeamType_t::kBNB = sim::kBNB, BeamType_t::kNuMI = sim::kNuMI }
 
using Name = fhicl::Name
 
using Comment = fhicl::Comment
 
using microsecond = util::quantities::points::microsecond
 
using microseconds = util::quantities::intervals::microseconds
 

Static Public Member Functions

static sim::BeamType_t getBeamType (fhicl::Atom< std::string > const &type)
 Converts a FHiCL atom into a beam type. More...
 
static std::vector
< sim::BeamType_t
getBeamTypes (fhicl::Sequence< std::string > const &type)
 Converts a FHiCL sequence into a vector of beam types. More...
 

Public Attributes

fhicl::Atom< art::InputTag > BeamGateTag
 
fhicl::Sequence
< fhicl::TableAs
< BeamChangeRecipe, ChangeGate > > 
Changes
 
fhicl::Atom< bool > KeepInstanceName
 
fhicl::Atom< std::string > OutputInstanceName
 
fhicl::Atom< std::string > LogCategory
 

Static Public Attributes

static
util::MultipleChoiceSelection
< BeamType_t > const 
BeamTypeSelector
 Selector for Type parameter. More...
 

Detailed Description

Definition at line 149 of file FixBeamGateInfo_module.cc.

Member Typedef Documentation

Definition at line 158 of file FixBeamGateInfo_module.cc.

Definition at line 160 of file FixBeamGateInfo_module.cc.

Definition at line 161 of file FixBeamGateInfo_module.cc.

Definition at line 157 of file FixBeamGateInfo_module.cc.

Member Enumeration Documentation

Enumerator
kUnknown 
kBNB 
kNuMI 

Definition at line 151 of file FixBeamGateInfo_module.cc.

151  { // we need to translate enum into a strong type
153  , kBNB = sim::kBNB
154  , kNuMI = sim::kNuMI
155  };
Unknown view.
Definition: geo_types.h:136
Unknown beam type.
Definition: BeamTypes.h:10
NuMI.
Definition: BeamTypes.h:12
BNB.
Definition: BeamTypes.h:11

Member Function Documentation

sim::BeamType_t icarus::trigger::FixBeamGateInfo::Config::getBeamType ( fhicl::Atom< std::string > const &  type)
static

Converts a FHiCL atom into a beam type.

Definition at line 550 of file FixBeamGateInfo_module.cc.

551 {
552  try {
553  return static_cast<sim::BeamType_t>
555  }
557  {
558  throw art::Exception(art::errors::Configuration)
559  << "Invalid value for '" << type.name()
560  << "' parameter: '" << e.label() << "'; valid options: "
561  << BeamTypeSelector.optionListString() << ".\n";
562  }
563 } // icarus::trigger::FixBeamGateInfo::Config::getBeamType()
Option_t const & parse(std::string const &label) const
Returns the option matching the specified label.
std::string optionListString(std::string const &sep=", ") const
Returns a string with the (main) name of all options.
static util::MultipleChoiceSelection< BeamType_t > const BeamTypeSelector
Selector for Type parameter.
do i e
BeamType_t
Defines category of beams to be stored in sim::BeamGateInfo.
Definition: BeamTypes.h:9
Choices_t value() const
Returns a copy of the value of the option.
auto icarus::trigger::FixBeamGateInfo::Config::getBeamTypes ( fhicl::Sequence< std::string > const &  type)
static

Converts a FHiCL sequence into a vector of beam types.

Definition at line 568 of file FixBeamGateInfo_module.cc.

569 {
570  std::vector<sim::BeamType_t> beamTypes;
571  beamTypes.reserve(types.size());
572  for (std::string const& type: types()) {
573  try {
574  beamTypes.push_back
575  (static_cast<sim::BeamType_t>(BeamTypeSelector.parse(type).value()));
576  }
578  {
579  throw art::Exception(art::errors::Configuration)
580  << "Invalid value for '" << types.name()
581  << "' parameter: '" << e.label() << "'; valid options: "
582  << BeamTypeSelector.optionListString() << ".\n";
583  }
584  }
585  return beamTypes;
586 } // icarus::trigger::FixBeamGateInfo::Config::getBeamTypes()
Option_t const & parse(std::string const &label) const
Returns the option matching the specified label.
std::string optionListString(std::string const &sep=", ") const
Returns a string with the (main) name of all options.
static util::MultipleChoiceSelection< BeamType_t > const BeamTypeSelector
Selector for Type parameter.
std::vector< SelDef > types
do i e
Choices_t value() const
Returns a copy of the value of the option.

Member Data Documentation

fhicl::Atom<art::InputTag> icarus::trigger::FixBeamGateInfo::Config::BeamGateTag
Initial value:
{
Name{ "BeamGateTag" },
Comment{ "beam gate data product to operate on" }
}

Definition at line 225 of file FixBeamGateInfo_module.cc.

util::MultipleChoiceSelection< FixBeamGateInfo::Config::BeamType_t > const icarus::trigger::FixBeamGateInfo::Config::BeamTypeSelector
static
Initial value:
{
{ BeamType_t::kUnknown, "unknown" }
, { BeamType_t::kBNB, "BNB" }
, { BeamType_t::kNuMI, "NuMI" }
}

Selector for Type parameter.

Definition at line 258 of file FixBeamGateInfo_module.cc.

fhicl::Sequence<fhicl::TableAs<BeamChangeRecipe, ChangeGate> > icarus::trigger::FixBeamGateInfo::Config::Changes
Initial value:
{
Name{ "Changes" },
Comment{ "sets of changes to apply to the beam gate" }
}

Definition at line 231 of file FixBeamGateInfo_module.cc.

fhicl::Atom<bool> icarus::trigger::FixBeamGateInfo::Config::KeepInstanceName
Initial value:
{
Name{ "KeepInstanceName" },
{ "output data product has the same instance name as in BeamGateTag" },
false
}

Definition at line 237 of file FixBeamGateInfo_module.cc.

fhicl::Atom<std::string> icarus::trigger::FixBeamGateInfo::Config::LogCategory
Initial value:
{
Name{ "LogCategory" },
Comment{ "name of the category used for the output" },
"FixBeamGateInfo"
}

Definition at line 250 of file FixBeamGateInfo_module.cc.

fhicl::Atom<std::string> icarus::trigger::FixBeamGateInfo::Config::OutputInstanceName
Initial value:
{
Name{ "OutputInstanceName" },
Comment{ "instance name for the output data product" },
""
}

Definition at line 244 of file FixBeamGateInfo_module.cc.


The documentation for this struct was generated from the following file: