Skip to content
Snippets Groups Projects
Commit 79fbc863 authored by Oliver Kirsebom's avatar Oliver Kirsebom
Browse files

files were not being added in correct order - now fixed!

parent 6205c0ed
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,12 @@ namespace VEIKONKONE {
* Close sorter.
*/
void close();
/*
* Save meta data to output file.
* @param n Meta data.
*/
void saveInfo(TNamed& n);
private:
void setup();
......
......@@ -45,7 +45,7 @@ int main( int argc, char* argv[] ){
{
vector<string> input;
findFiles(run, input);
if (input.size() == 0) {
cout << "Unable to find any files with run number " << run << endl;
return 0;
......@@ -183,13 +183,16 @@ void findFiles(int run, vector<string>& input)
fname = file->GetName();
if (!file->IsDirectory()) {
if (fname.EndsWith(Form("%04d_ch000.txt", run))) {
input.push_back(fname.Data());
if (input.size() < 1) input.resize(1);
input[0] = fname.Data();
}
else if (fname.EndsWith(Form("%04d_ch001.txt", run))) {
input.push_back(fname.Data());
if (input.size() < 2) input.resize(2);
input[1] = fname.Data();
}
else if (fname.EndsWith(Form("%04d_ch002.txt", run))) {
input.push_back(fname.Data());
if (input.size() < 3) input.resize(3);
input[2] = fname.Data();
}
}
}
......
......@@ -104,3 +104,9 @@ void VKSortedWriter::clear()
}
}
void VKSortedWriter::saveInfo(TNamed& n)
{
n.Write();
}
......@@ -24,6 +24,10 @@ VKSorter::VKSorter(vector<shared_ptr<VKRawReader>>& _readers, string output, Dou
writer = make_unique<VKSortedWriter> (n, output);
// log coincidence window to file
TNamed info("VetoWindow", Form("%.1f us", window));
writer->saveInfo(info);
trigger = vector<bool>(n, true);
a0 = vector<double>(n, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment