Commit 1c24ed75 authored by clantz's avatar clantz
Browse files

Implemented detector class with GetElement

parent 71570b7f
/** @file Detector.cpp
* @brief Implementation of Detector.
*
* Function definitions for Detector are provided.
* This is the mother class for detectors.
* Methods common to all detectors are implemented here.
*
* @author Chad Lantz
* @bug No known bugs.
*/
#include "Detector.h"
/** @brief Default Constructor for Detector.
*/
Detector::Detector( ){
}
/** @brief Destructor for Detector.
*/
Detector::~Detector( ){
}
/** @brief Get the properties of a detector element
*
* Returns a pointer to the Channel stored in Elements with the
* requested row and column.
* If the requested element is not found, return an NULL pointer.
*
*/
Channel* Detector::GetElement(int row, int column){
int entries=Element.size();
for(int i=0; i<entries; i++){
if(row==Element[i].mapping_row && column==Element[i].mapping_column){
return &entry[i];
}
}
return nullptr;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment