Jpp  18.5.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
JDETECTOR::JModuleAttributes< JAttributes_t > Struct Template Reference

Data structure for module address and module attributes. More...

#include <JModuleMapper.hh>

Inheritance diagram for JDETECTOR::JModuleAttributes< JAttributes_t >:
JDETECTOR::JModuleAddress JLANG::JEquals< JFirst_t, JSecond_t >

Public Member Functions

 JModuleAttributes ()
 Default constructor. More...
 
 JModuleAttributes (const int index, const JModule &first, const JModule &second)
 Constructor. More...
 
bool equals (const JModuleAddress &address) const
 Equal method. More...
 

Static Public Member Functions

static const JAttributes_t & getAttributes (const JModule &first, const JModule &second)
 Get module attributes. More...
 

Public Attributes

int first
 index of module in detector data structure More...
 

Detailed Description

template<class JAttributes_t>
struct JDETECTOR::JModuleAttributes< JAttributes_t >

Data structure for module address and module attributes.

The template argument refers to the module attributes for which the following method should be overloaded:

    void setAttributes(const JModule& first,
                       const JModule& second,
                       JAttributes_t& attributes);

Definition at line 67 of file JModuleMapper.hh.

Constructor & Destructor Documentation

template<class JAttributes_t >
JDETECTOR::JModuleAttributes< JAttributes_t >::JModuleAttributes ( )
inline

Default constructor.

Definition at line 92 of file JModuleMapper.hh.

92  :
94  JAttributes_t()
95  {}
JModuleAddress()
Default constructor.
template<class JAttributes_t >
JDETECTOR::JModuleAttributes< JAttributes_t >::JModuleAttributes ( const int  index,
const JModule first,
const JModule second 
)
inline

Constructor.

Parameters
indexindex of module in detector data structure
firstfirst module
secondsecond module

Definition at line 105 of file JModuleMapper.hh.

107  :
108  JModuleAddress(index),
109  JAttributes_t(getAttributes(first, second))
110  {}
static const JAttributes_t & getAttributes(const JModule &first, const JModule &second)
Get module attributes.
JModuleAddress()
Default constructor.

Member Function Documentation

template<class JAttributes_t >
static const JAttributes_t& JDETECTOR::JModuleAttributes< JAttributes_t >::getAttributes ( const JModule first,
const JModule second 
)
inlinestatic

Get module attributes.

Parameters
firstfirst module
secondsecond module
Returns
module attributes

Definition at line 78 of file JModuleMapper.hh.

80  {
81  static JAttributes_t attributes;
82 
83  setAttributes(first, second, attributes);
84 
85  return attributes;
86  }
void setAttributes(const JModule &first, const JModule &second, JAttributes_t &attributes)
Template method to set module attributes.
bool JDETECTOR::JModuleAddress::equals ( const JModuleAddress address) const
inlineinherited

Equal method.

Parameters
addressmodule address
Returns
true if this module address equal to given module address; else false

Definition at line 58 of file JModuleAddress.hh.

59  {
60  return this->first == address.first;
61  }
int first
index of module in detector data structure

Member Data Documentation

int JDETECTOR::JModuleAddress::first
inherited

index of module in detector data structure

Definition at line 90 of file JModuleAddress.hh.


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