Commit 3b92d82e authored by Chad Lantz's avatar Chad Lantz
Browse files

Moved call to Detector::PrintMap() to DataReader2021 for uniformity.

parent ba0719e8
......@@ -252,6 +252,7 @@ void DataReader2021::LoadConfigurationFile(std::string _inFile ){
m_detectors.erase(m_detectors.begin() + det);
}else{
names+= m_detectors.at(det)->GetName() + "; ";
m_detectors.at(det)->PrintMap();
}
}
std::cout << "Detectors found in config file: " << names << std::endl << std::endl;
......@@ -545,10 +546,10 @@ void DataReader2021::Initialize(){
// If no output directory is specified by the user
// one is created for this run in $JZCaPA/results. Default is $JZCaPA/results/
// If an output tag has been chosen, use it to name the directory. Default is "run"
std::string outDir = ( m_outputDir != "" ) ? m_outputDir : (std::string)std::getenv("JZCaPA") + "/results";
std::string dirName = ( m_outputTag == "" ) ? "run" : m_outputTag;
m_outputDir += Form("/%s%d/", dirName.c_str(), m_runNumber);
gSystem->Exec( ("mkdir -p " + m_outputDir).c_str() );
m_outputDir = ( m_outputDir != "" ) ? m_outputDir : (std::string)std::getenv("JZCaPA") + "/results";
m_outputTag = ( m_outputTag == "" ) ? "run" : m_outputTag;
m_outputDir += Form("/%s%d/", m_outputTag.c_str(), m_runNumber);
gSystem->Exec( Form("mkdir -p %s", m_outputDir.c_str() ) );
// If we are reading a list of files, or have no run number
// make default name output.root, otherwise make it
......
......@@ -83,8 +83,9 @@ void EM::LoadElements( std::vector < Channel* > _elements, int _runNumber ){
}
}
std::cout << "EM object created with " << m_nRows << " rows and " << m_nColumns << " columns" << std::endl;
PrintMap();
if(GetChannelsVector().size() > 0)
std::cout << "EM object created with " << m_nRows << " rows and " << m_nColumns << " columns" << std::endl;
}
/** @brief Get the properties of a detector element
......
......@@ -77,8 +77,9 @@ RPD::RPD( std::vector < Channel* > _elements, int _runNumber, std::string _name
}
}
std::cout << std::endl << GetName() << " object created with " << m_nRows << " rows and " << m_nColumns << " columns" << std::endl;
PrintMap();
if(GetChannelsVector().size() > 0)
std::cout << std::endl << GetName() << " object created with " << m_nRows << " rows and " << m_nColumns << " columns" << std::endl;
}
/** @brief Constructor that takes the whole vector of channels readout and selects and stores only the RPD ones
* @param _elements Vector of Channels with all detector configs
......
Markdown is supported
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