7 std::pair<unsigned int, unsigned int>
GetInnerNHits(TrTrackR *track) {
9 return std::make_pair(0, 0);
10 unsigned int patt_xy = track->GetBitPatternXYJ();
11 unsigned int patt_y = track->GetBitPatternJ();
12 unsigned int nxy = 0, ny = 0;
13 for (
int ilay = 0 + 1; ilay < 9 - 1; ilay++) {
14 if ((patt_xy & (1 << ilay)) > 0)
16 if ((patt_y & (1 << ilay)) > 0)
19 return std::make_pair(nxy, ny);
23 using namespace std::string_literals;
25 std::ifstream infilelist(txtFile);
26 std::vector<std::string> flist;
27 for (std::string bufname; std::getline(infilelist, bufname);) {
28 if (bufname.substr(bufname.length() - 4, 4) ==
".txt"s) {
32 flist.push_back(bufname);
39 std::vector<std::string>
LoadInputFiles(std::vector<std::string> &inputFiles) {
41 using namespace std::string_literals;
42 if (inputFiles.size() > 1 && std::any_of(
begin(inputFiles),
end(inputFiles), [](
const std::string &filename) {
43 return filename.substr(filename.length() - 4, 4) ==
".txt"s;
45 throw std::runtime_error(
"Input file list cannot contain mixed txt and root files");
49 std::vector<std::string> fileList;
50 if (inputFiles.size() == 1 && inputFiles[0].substr(inputFiles[0].length() - 4, 4) ==
".txt") {
53 fileList = inputFiles;
63 FILE *
muteOut(fopen(
"/dev/null",
"w"));
64 std::ofstream
fout(
"/dev/null");
74 if (!std::exchange(isMuted,
true)) {
80 cout_sbuf = std::cout.rdbuf();
81 cerr_sbuf = std::cerr.rdbuf();
82 std::cout.rdbuf(
fout.rdbuf());
83 std::cerr.rdbuf(
fout.rdbuf());
88 if (std::exchange(isMuted,
false)) {
99 std::cout.rdbuf(cout_sbuf);
103 std::cerr.rdbuf(cerr_sbuf);
NAIAChain::EventItr begin(NAIAChain &chain)
NAIAChain::EventItr end(NAIAChain &chain)