Commit 59e385b3 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Change Objects->ObjectVector, SpidrSignals->SpidrSignalVector

parent 88548c8e
Pipeline #1057946 passed with stages
in 13 minutes and 21 seconds
......@@ -47,9 +47,9 @@ void Clipboard::clear() {
// Loop over all stored collections of this type
for(auto set = collections.cbegin(); set != collections.cend();) {
std::shared_ptr<Objects> collection = std::static_pointer_cast<Objects>(set->second);
std::shared_ptr<ObjectVector> collection = std::static_pointer_cast<ObjectVector>(set->second);
// Loop over all objects and delete them
for(Objects::iterator it = collection->begin(); it != collection->end(); ++it) {
for(ObjectVector::iterator it = collection->begin(); it != collection->end(); ++it) {
delete(*it);
}
set = collections.erase(set);
......@@ -68,7 +68,7 @@ std::vector<std::string> Clipboard::list_collections() const {
std::string line(corryvreckan::demangle(block.first.name()));
line += ": ";
for(const auto& set : block.second) {
std::shared_ptr<Objects> collection = std::static_pointer_cast<Objects>(set.second);
std::shared_ptr<ObjectVector> collection = std::static_pointer_cast<ObjectVector>(set.second);
line += set.first + " (" + collection->size() + ") ";
}
line += "\n";
......
......@@ -57,7 +57,7 @@ StatusCode AnalysisPowerPulsing::run(std::shared_ptr<Clipboard> clipboard) {
/*
// Now update the power pulsing with any new signals
SpidrSignals* spidrData = (SpidrSignals*)clipboard->get(m_DUT, "SpidrSignals");
SpidrSignal* spidrData = (SpidrSignals*)clipboard->get(m_DUT, "SpidrSignals");
// If there are new signals
if(spidrData != NULL) {
// Loop over all signals registered
......
......@@ -55,7 +55,7 @@ void AnalysisTelescope::initialise() {
}
ROOT::Math::XYZPoint AnalysisTelescope::closestApproach(ROOT::Math::XYZPoint position,
std::shared_ptr<MCParticles> particles) {
std::shared_ptr<MCParticleVector> particles) {
// Find the closest MC particle
double smallestDistance(DBL_MAX);
ROOT::Math::XYZPoint particlePosition;
......
......@@ -21,7 +21,7 @@ namespace corryvreckan {
StatusCode run(std::shared_ptr<Clipboard> clipboard);
private:
ROOT::Math::XYZPoint closestApproach(ROOT::Math::XYZPoint position, std::shared_ptr<MCParticles> particles);
ROOT::Math::XYZPoint closestApproach(ROOT::Math::XYZPoint position, std::shared_ptr<MCParticleVector> particles);
// Histograms for each of the devices
std::map<std::string, TH1F*> telescopeMCresidualsLocalX;
......
......@@ -229,7 +229,7 @@ StatusCode EventLoaderTimepix3::run(std::shared_ptr<Clipboard> clipboard) {
// Make a new container for the data
auto deviceData = std::make_shared<PixelVector>();
auto spidrData = std::make_shared<SpidrSignals>();
auto spidrData = std::make_shared<SpidrSignalVector>();
// Load the next chunk of data
bool data = loadData(clipboard, deviceData, spidrData);
......@@ -319,7 +319,7 @@ void EventLoaderTimepix3::loadCalibration(std::string path, char delim, std::vec
// Function to load data for a given device, into the relevant container
bool EventLoaderTimepix3::loadData(std::shared_ptr<Clipboard> clipboard,
std::shared_ptr<PixelVector>& devicedata,
std::shared_ptr<SpidrSignals>& spidrData) {
std::shared_ptr<SpidrSignalVector>& spidrData) {
std::string detectorID = m_detector->name();
auto event = clipboard->get_event();
......
......@@ -39,7 +39,8 @@ namespace corryvreckan {
TH2F* pixelTOAParameterT;
TH1F* timeshiftPlot;
bool loadData(std::shared_ptr<Clipboard> clipboard, std::shared_ptr<PixelVector>&, std::shared_ptr<SpidrSignals>&);
bool
loadData(std::shared_ptr<Clipboard> clipboard, std::shared_ptr<PixelVector>&, std::shared_ptr<SpidrSignalVector>&);
void loadCalibration(std::string path, char delim, std::vector<std::vector<float>>& dat);
void maskPixels(std::string);
......
......@@ -95,7 +95,7 @@ StatusCode FileWriter::run(std::shared_ptr<Clipboard> clipboard) {
detector_name = detector_block.first;
}
auto objects = std::static_pointer_cast<Objects>(detector_block.second);
auto objects = std::static_pointer_cast<ObjectVector>(detector_block.second);
LOG(TRACE) << " - " << detector_name << ": " << objects->size();
// Create a new branch of the correct type if this object has not been received before
......
......@@ -82,7 +82,7 @@ StatusCode TextWriter::run(std::shared_ptr<Clipboard> clipboard) {
*output_file_ << "--- " << detector_name << " ---" << std::endl;
auto objects = std::static_pointer_cast<Objects>(detector_block.second);
auto objects = std::static_pointer_cast<ObjectVector>(detector_block.second);
for(auto& object : *objects) {
*output_file_ << *object << std::endl;
}
......
......@@ -37,7 +37,7 @@ namespace corryvreckan {
};
// Vector type declaration
using MCParticles = std::vector<MCParticle*>;
using MCParticleVector = std::vector<MCParticle*>;
} // namespace corryvreckan
#endif // MCPARTICLE_H
......@@ -98,7 +98,7 @@ namespace corryvreckan {
std::ostream& operator<<(std::ostream& out, const corryvreckan::Object& obj);
// Vector type declaration
using Objects = std::vector<Object*>;
using ObjectVector = std::vector<Object*>;
} // namespace corryvreckan
#endif // CORRYVRECKAN_OBJECT_H
......@@ -26,7 +26,7 @@ namespace corryvreckan {
};
// Vector type declaration
using SpidrSignals = std::vector<SpidrSignal*>;
using SpidrSignalVector = std::vector<SpidrSignal*>;
} // namespace corryvreckan
#endif // SPIDRSIGNAL_H
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