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/main.cpp

34 lines
650 B
C++

#include "iostream"
#include "CaloCell.hh"
#include "CaloGrid.hh"
#include "Point.hh"
#include "Calorimeter.hh"
void printCellId( const CaloCell* cell ) {
std::cout << cell->getId() << std::endl;
}
int main() {
CaloCell cell(0, 1) ;
Point p ;
CaloGrid grid(2, 2) ;
grid.cell(1, 1);
int nx = 3;
int ny = 4;
Calorimeter calo(nx, ny) ;
std::cout << "CellId at Start: " << calo.grid().cell(0,0)->getId() << std::endl;
std::cout << "CellId at End: " << calo.grid().cell(nx-1,ny-1)->getId() << std::endl;
std::cout << "CellId at Center: " ;
printCellId(calo.grid().cell(nx/2,ny/2));
const CaloGrid grid2(5,5);
grid2.cell(3,3);
}