LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::ActionTable Class Reference

#include "Actions.h"

Classes

struct  Config
 

Public Member Functions

 ~ActionTable ()
 
 ActionTable ()
 
 ActionTable (Config const &)
 
 ActionTable (ActionTable const &)=delete
 
 ActionTable (ActionTable &&)=delete
 
ActionTableoperator= (ActionTable const &)=delete
 
ActionTableoperator= (ActionTable &&)=delete
 
actions::ActionCodes find (std::string const &category) const
 
void add (std::string const &category, actions::ActionCodes)
 

Private Member Functions

void addDefaults_ ()
 
void install_ (actions::ActionCodes, std::vector< std::string > const &)
 

Private Attributes

std::map< std::string, actions::ActionCodesmap_ {}
 

Detailed Description

Definition at line 15 of file Actions.h.

Constructor & Destructor Documentation

art::ActionTable::~ActionTable ( )
default
art::ActionTable::ActionTable ( )

Definition at line 12 of file Actions.cc.

References addDefaults_().

13  {
14  addDefaults_();
15  }
void addDefaults_()
Definition: Actions.cc:30
art::ActionTable::ActionTable ( ActionTable const &  )
delete
art::ActionTable::ActionTable ( ActionTable &&  )
delete

Member Function Documentation

void art::ActionTable::add ( std::string const &  category,
actions::ActionCodes  code 
)

Definition at line 52 of file Actions.cc.

References map_.

Referenced by install_().

53  {
54  map_[category] = code;
55  }
std::map< std::string, actions::ActionCodes > map_
Definition: Actions.h:48
void art::ActionTable::addDefaults_ ( )
private

Definition at line 30 of file Actions.cc.

References art::debugit, and map_.

Referenced by ActionTable().

31  {
32  // This is where defaults that are not 'Rethrow' would be populated.
33  if (2 > debugit())
34  return;
35 
36  for (auto const& [name, code] : map_) {
37  std::cerr << name << ',' << code << '\n';
38  }
39  std::cerr << '\n';
40  }
std::map< std::string, actions::ActionCodes > map_
Definition: Actions.h:48
DebugValue debugit
Definition: DebugMacros.cc:14
actions::ActionCodes art::ActionTable::find ( std::string const &  category) const

Definition at line 58 of file Actions.cc.

References map_, and art::actions::Rethrow.

Referenced by art::Worker::doWork_event(), art::TriggerPathsExecutor::process_event_paths_done(), and art::Worker::runWorker().

59  {
60  auto I = map_.find(category);
61  return (I != map_.end()) ? I->second : actions::Rethrow;
62  }
std::map< std::string, actions::ActionCodes > map_
Definition: Actions.h:48
void art::ActionTable::install_ ( actions::ActionCodes  code,
std::vector< std::string > const &  action_names 
)
private

Definition at line 43 of file Actions.cc.

References add().

Referenced by ActionTable().

45  {
46  cet::for_all(action_names, [this, code](auto const& action_name) {
47  add(action_name, code);
48  });
49  }
void add(std::string const &category, actions::ActionCodes)
Definition: Actions.cc:52
ActionTable& art::ActionTable::operator= ( ActionTable const &  )
delete
ActionTable& art::ActionTable::operator= ( ActionTable &&  )
delete

Member Data Documentation

std::map<std::string, actions::ActionCodes> art::ActionTable::map_ {}
private

Definition at line 48 of file Actions.h.

Referenced by add(), addDefaults_(), and find().


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