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