Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DModuleType Class Reference

#include <DModuleType.h>

Public Types

enum  type_id_t {
  TID, FADC250, FADC125, F1TDC32,
  F1TDC48, JLAB_TS, TD, SSP,
  JLAB_DISC, MODULE_TYPE_RES1, MODULE_TYPE_RES2, MODULE_TYPE_RES3,
  MODULE_TYPE_RES4, MODULE_TYPE_RES5, MODULE_TYPE_RES6, MODULE_TYPE_RES7,
  UNKNOWN, VMECPU, CAEN1190, CAEN1290,
  CDAQTSG =22, N_MODULE_TYPES
}
 

Public Member Functions

 DModuleType (type_id_t type, std::string name, std::string description)
 
type_id_t GetType (void) const
 
string GetName (void) const
 
string GetDescription (void) const
 

Static Public Member Functions

static DModuleType GetModule (type_id_t id)
 Given the type_id of a module type, return a DModuleType object. This is much more efficient than GetModule(string), but is still not really intended to be called every event. More...
 
static DModuleType GetModule (std::string name)
 Given the name of a module type, return a DModuleType object. This is not a terribly efficient mechanism and is inteded to be called only at the beginning of event processing rather than every event. More...
 
static void GetModuleList (std::vector< DModuleType > &modules)
 Get a list of all module types currently defined. This will append the full list to the given "modules" container. (The vector is not cleared on input). More...
 
static string GetName (type_id_t id)
 Get the name of a module type based on its id. This can be called without an instance of the class if one already has the type. More...
 
static string GetDescription (type_id_t id)
 Get the name of a module type based on its id. This can be called without an instance of the class if one already has the type. More...
 

Protected Attributes

type_id_t type
 
std::string name
 
std::string description
 

Detailed Description

Definition at line 14 of file DModuleType.h.

Member Enumeration Documentation

Enumerator
TID 
FADC250 
FADC125 
F1TDC32 
F1TDC48 
JLAB_TS 
TD 
SSP 
JLAB_DISC 
MODULE_TYPE_RES1 
MODULE_TYPE_RES2 
MODULE_TYPE_RES3 
MODULE_TYPE_RES4 
MODULE_TYPE_RES5 
MODULE_TYPE_RES6 
MODULE_TYPE_RES7 
UNKNOWN 
VMECPU 
CAEN1190 
CAEN1290 
CDAQTSG 
N_MODULE_TYPES 

Definition at line 27 of file DModuleType.h.

Constructor & Destructor Documentation

DModuleType::DModuleType ( type_id_t  type,
std::string  name,
std::string  description 
)
inline

Definition at line 61 of file DModuleType.h.

Referenced by GetModule().

Member Function Documentation

static string DModuleType::GetDescription ( type_id_t  id)
inlinestatic

Get the name of a module type based on its id. This can be called without an instance of the class if one already has the type.

Definition at line 136 of file DModuleType.h.

References GetDescription(), and GetModule().

Referenced by GetDescription().

string DModuleType::GetDescription ( void  ) const
inline

Definition at line 144 of file DModuleType.h.

References description.

static DModuleType DModuleType::GetModule ( type_id_t  id)
inlinestatic

Given the type_id of a module type, return a DModuleType object. This is much more efficient than GetModule(string), but is still not really intended to be called every event.

Definition at line 70 of file DModuleType.h.

References CAEN1190, CAEN1290, DModuleType(), F1TDC32, F1TDC48, FADC125, FADC250, JLAB_DISC, JLAB_TS, SSP, TD, TID, UNKNOWN, and VMECPU.

Referenced by GetDescription(), GetModule(), GetModuleList(), and GetName().

static DModuleType DModuleType::GetModule ( std::string  name)
inlinestatic

Given the name of a module type, return a DModuleType object. This is not a terribly efficient mechanism and is inteded to be called only at the beginning of event processing rather than every event.

Definition at line 97 of file DModuleType.h.

References GetModule(), GetModuleList(), N_MODULE_TYPES, and UNKNOWN.

static void DModuleType::GetModuleList ( std::vector< DModuleType > &  modules)
inlinestatic

Get a list of all module types currently defined. This will append the full list to the given "modules" container. (The vector is not cleared on input).

Definition at line 113 of file DModuleType.h.

References GetModule(), N_MODULE_TYPES, and UNKNOWN.

Referenced by GetModule().

static string DModuleType::GetName ( type_id_t  id)
inlinestatic

Get the name of a module type based on its id. This can be called without an instance of the class if one already has the type.

Definition at line 126 of file DModuleType.h.

References GetModule(), and GetName().

Referenced by GetName().

string DModuleType::GetName ( void  ) const
inline

Definition at line 143 of file DModuleType.h.

References name.

Referenced by DEVIOWorkerThread::F1TDC_channel(), and JEventProcessor_pedestals::GetHist().

type_id_t DModuleType::GetType ( void  ) const
inline

Definition at line 142 of file DModuleType.h.

References type.

Member Data Documentation

std::string DModuleType::description
protected

Definition at line 149 of file DModuleType.h.

Referenced by GetDescription().

std::string DModuleType::name
protected

Definition at line 148 of file DModuleType.h.

Referenced by GetName().

type_id_t DModuleType::type
protected

Definition at line 147 of file DModuleType.h.

Referenced by GetType().


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