Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
 JModuleAttributes (const int index, const JModule &first, const JModule &second)
 Constructor.
 
bool equals (const JModuleAddress &address) const
 Equal method.
 

Static Public Member Functions

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

Public Attributes

int first
 index of module in detector data structure
 

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

◆ JModuleAttributes() [1/2]

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.

◆ JModuleAttributes() [2/2]

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 {}
int first
index of module in detector data structure
static const JAttributes_t & getAttributes(const JModule &first, const JModule &second)
Get module attributes.

Member Function Documentation

◆ getAttributes()

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.

◆ equals()

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 }

Member Data Documentation

◆ first

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: