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

31 lines
560 B
C++

//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; }
void setEnergy( double new_energy ) { energy = new_energy ; }
int getId() const { return ID ; }
void setId( int new_id ) { ID = new_id ; }
private:
void init( double init_energy, int ID )
{
setEnergy( init_energy );
setId( ID );
}
int ID ;
double energy ;
};
#endif