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

write time in milliseconds to root file

parent a483f3a0
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ file(GLOB_RECURSE SOURCE "source/*.cpp")
add_library(vklib ${HEADERS} ${SOURCE} ${GIT_FILE})
add_executable(vksort sort.cpp ${HEADERS} ${SOURCE})
add_executable(vksort sort.cpp)
############################################
......
rm CMakeCache.txt
rm -rf CMakeCache.txt
rm -rf CMakeFiles/
rm libidslib.a
rm -rf libidslib.a
cmake ./
make -j4
......@@ -63,6 +63,7 @@ namespace VEIKONKONE {
std::unique_ptr<TFile> fOut;
TTree * tOut;
ULong64_t tms;
std::vector<UInt_t> M;
std::vector<std::unique_ptr<AUSA::DynamicBranchVector<ULong64_t>>> T;
std::vector<std::unique_ptr<AUSA::DynamicBranchVector<Double_t>>> E;
......
......@@ -34,6 +34,10 @@ void VKSortedWriter::fill(size_t i, const VKRawReader::Hit& hit)
T[i]->add(hit.T);
E[i]->add(hit.E);
Z[i]->add(hit.Z);
// time in milliseconds
ULong64_t t = 1E-5 * hit.T;
if (t > 0 && (t < tms || tms == 0)) tms = t;
}
......@@ -87,6 +91,9 @@ void VKSortedWriter::setup()
string zname = Form("Z%i", i);
Z[i] = move(make_unique<DynamicBranchVector<UInt_t>>(*tOut, zname, mname));
}
// time in milliseconds
tOut->Branch("tms", &tms, "tms/l");
// Prepare for receiving data
clear();
......@@ -102,6 +109,7 @@ void VKSortedWriter::clear()
E[i]->clear();
Z[i]->clear();
}
tms = 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