LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::DropMetaData Class Reference

#include "DropMetaData.h"

Public Types

enum  enum_t { DropNone, DropPrior, DropAll }
 

Public Member Functions

 DropMetaData (enum_t e)
 
 DropMetaData (std::string const &config)
 
bool operator== (enum_t const e) const
 
bool operator!= (enum_t const e) const
 

Private Member Functions

enum_t strToValue_ (std::string const &dropMetaData)
 

Private Attributes

enum_t value_
 

Detailed Description

Definition at line 8 of file DropMetaData.h.

Member Enumeration Documentation

Enumerator
DropNone 
DropPrior 
DropAll 

Definition at line 10 of file DropMetaData.h.

Constructor & Destructor Documentation

DropMetaData::DropMetaData ( enum_t  e)

Definition at line 6 of file DropMetaData.cc.

6 : value_{e} {}
Float_t e
Definition: plot.C:34
DropMetaData::DropMetaData ( std::string const &  config)

Definition at line 8 of file DropMetaData.cc.

References strToValue_().

9  : value_{strToValue_(config)}
10 {}
enum_t strToValue_(std::string const &dropMetaData)
Definition: DropMetaData.cc:13

Member Function Documentation

bool art::DropMetaData::operator!= ( enum_t const  e) const
inline

Definition at line 22 of file DropMetaData.h.

References operator==(), and strToValue_().

23  {
24  return !operator==(e);
25  }
bool operator==(enum_t const e) const
Definition: DropMetaData.h:16
Float_t e
Definition: plot.C:34
bool art::DropMetaData::operator== ( enum_t const  e) const
inline

Definition at line 16 of file DropMetaData.h.

References e, and value_.

Referenced by operator!=().

17  {
18  return value_ == e;
19  }
Float_t e
Definition: plot.C:34
DropMetaData::enum_t DropMetaData::strToValue_ ( std::string const &  dropMetaData)
private

Definition at line 13 of file DropMetaData.cc.

References art::errors::Configuration, DropAll, DropNone, and DropPrior.

Referenced by DropMetaData(), and operator!=().

14 {
15  enum_t result{DropNone};
16  if (dropMetaData == "NONE") {
17  result = DropNone;
18  } else if (dropMetaData == "PRIOR") {
19  result = DropPrior;
20  } else if (dropMetaData == "ALL") {
21  result = DropAll;
22  } else {
24  "Illegal dropMetaData parameter value: ")
25  << dropMetaData << ".\n"
26  << "Legal values are 'NONE', 'PRIOR', and 'ALL'.\n";
27  }
28  return result;
29 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Data Documentation

enum_t art::DropMetaData::value_
private

Definition at line 29 of file DropMetaData.h.

Referenced by operator==().


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