Jpp 20.0.0-rc.9-29-gccc23c492-D
the software that should make you happy
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
JACOUSTICS::JEKey Struct Reference

Emitter key. More...

#include <JEKey.hh>

Inheritance diagram for JACOUSTICS::JEKey:
JACOUSTICS::JCounter

Public Member Functions

 JEKey ()
 Default constructor.
 
 JEKey (const JObjectID &id, const JCounter &counter)
 Constructor.
 
int getKey () const
 Get hash key.
 
int getCounter () const
 Get counter.
 
 ClassDefNV (JCounter, 1)
 

Static Public Attributes

static const int COUNTER = 100
 Multiplication factor applied to the event counter for the evaluation of the hash key.
 

Protected Attributes

int counter
 

Friends

std::ostream & operator<< (std::ostream &out, const JEKey &key)
 Write emitter key to output stream.
 

Detailed Description

Emitter key.

The emitter key can be used to umambiguously address an event in a data set.

Definition at line 32 of file JEKey.hh.

Constructor & Destructor Documentation

◆ JEKey() [1/2]

JACOUSTICS::JEKey::JEKey ( )
inline

Default constructor.

Definition at line 47 of file JEKey.hh.

48 {}

◆ JEKey() [2/2]

JACOUSTICS::JEKey::JEKey ( const JObjectID & id,
const JCounter & counter )
inline

Constructor.

Parameters
idemitter identifier
counterevent counter

Definition at line 57 of file JEKey.hh.

58 :
59 JObjectID(id),
61 {}
JCounter()
Default constructor.
Definition JCounter.hh:30

Member Function Documentation

◆ getKey()

int JACOUSTICS::JEKey::getKey ( ) const
inline

Get hash key.

Returns
hash key

Definition at line 69 of file JEKey.hh.

70 {
71 return getCounter() * COUNTER + getID();
72 }
int getCounter() const
Get counter.
Definition JCounter.hh:50
static const int COUNTER
Multiplication factor applied to the event counter for the evaluation of the hash key.
Definition JEKey.hh:41

◆ getCounter()

int JACOUSTICS::JCounter::getCounter ( ) const
inlineinherited

Get counter.

Returns
counter

Definition at line 50 of file JCounter.hh.

51 {
52 return counter;
53 }

◆ ClassDefNV()

JACOUSTICS::JCounter::ClassDefNV ( JCounter ,
1  )
inherited

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JEKey & key )
friend

Write emitter key to output stream.

Parameters
outoutput stream
keyemitter key
Returns
output stream

Definition at line 82 of file JEKey.hh.

83 {
84 using namespace std;
85
86 return out << setw(3) << key.getID() << ' '
87 << setw(4) << key.getCounter();
88 }

Member Data Documentation

◆ COUNTER

const int JACOUSTICS::JEKey::COUNTER = 100
static

Multiplication factor applied to the event counter for the evaluation of the hash key.


Note that the object identifier of any emitter should not exceed this value.

Definition at line 41 of file JEKey.hh.

◆ counter

int JACOUSTICS::JCounter::counter
protectedinherited

Definition at line 88 of file JCounter.hh.


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