Skip to content

Conversation

@tomeichlersmith
Copy link
Member

  • increase number of tries in the ROC::getValue and add a sleep on fails
  • write a maker that returns a std::unique_ptr so all the run logic isn't copied
  • call setup_run before each change to the fc calib
  • move from a lambda function to a free function in daq

I don't know if any of this is necessary to get charge injection working. I actually strongly suspect its not, but it is what I did to the code while working on it.

Comment on lines +669 to +697
template <class EventPacket>
std::unique_ptr<DecodeAndWriteToCSV<EventPacket>> make_all_channel_writer(
const std::string& file_name) {
return std::make_unique<DecodeAndWriteToCSV<EventPacket>>(
file_name,
[](std::ofstream& f) {
f << std::boolalpha;
f << EventPacket::to_csv_header << '\n';
},
[](std::ofstream& f, const EventPacket& ep) { ep.to_csv(f); }, 2);
}

std::unique_ptr<DAQRunConsumer> make_all_channel_writer(
Target::DaqFormat f, const std::string& file_name) {
switch (f) {
case Target::DaqFormat::ECOND_SW_HEADERS:
return make_all_channel_writer<
pflib::packing::MultiSampleECONDEventPacket>(file_name);
break;
case Target::DaqFormat::SIMPLEROC:
return make_all_channel_writer<pflib::packing::SingleROCEventPacket>(
file_name);
break;
default:
PFEXCEPTION_RAISE("NoDecode",
"Unable to decode format currently configured.");
break;
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only thing I really want to keep. The other stuff is probably (hopefully) not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants