Commit bc85b959 authored by Chad Lantz's avatar Chad Lantz
Browse files

Corrected PrintMap indecies and made the successful creation statement...

Corrected PrintMap indecies and made the successful creation statement conditional on the successful creation of the detector
parent 3b92d82e
......@@ -46,7 +46,10 @@ void Scintillators::LoadElements( std::vector < Channel* > _elements, int _runNu
SetElement(_elements.at(i));
}
}
if(GetChannelsVector().size() > 4) std::cout << "WARNING : more than one entry for one Scintillators module. Check the config.xml" << std::endl;
if(GetChannelsVector().size() > 4)
std::cout << "WARNING : more than one entry for one Scintillators module. Check the config.xml" << std::endl;
if(GetChannelsVector().size() > 0)
std::cout << "Scintillators object created with " << GetChannelsVector().size() << " channel entries " << std::endl;
}
......@@ -92,8 +95,8 @@ std::string Scintillators::FindPaddleType( Channel *c ){
*/
void Scintillators::PrintMap(){
for(int i = 0; i < 2; i++){
for(int j = 0; j < 2; j++){
for(int i = 1; i <= 2; i++){
for(int j = 1; j <= 2; j++){
Channel *c = GetElement(i, j);
std::cout<<"| " << FindPaddleType(c) <<" |"<<std::endl;
std::cout<<"| " << c->name <<" |"<<std::endl;
......
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