1
0
Fork 0
This repository has been archived on 2021-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
uni-m.cds-adv-prog/ex4.2/CaloCell.hh

32 lines
560 B
C++
Raw Normal View History

2019-12-17 15:05:27 +01:00
//CaloCell.hh
#ifndef CALOCELL_HH
#define CALOCELL_HH
class CaloCell
{
public:
CaloCell() { init( 0, 0 ); }
CaloCell( double energy, int ID ) {
init( energy, ID );
}
// No need for Constructor or Destructor
double getEnergy() const { return energy; }
2020-06-30 13:58:41 +02:00
void setEnergy( double new_energy ) { energy = new_energy ; }
2019-12-17 15:05:27 +01:00
int getId() const { return ID ; }
2020-06-30 13:58:41 +02:00
void setId( int new_id ) { ID = new_id ; }
2019-12-17 15:05:27 +01:00
private:
void init( double init_energy, int ID )
{
setEnergy( init_energy );
setId( ID );
}
int ID ;
double energy ;
};
#endif