Skip to content

Commit 07f74cb

Browse files
committed
Add macro to inspect trigger menu per run
1 parent 93aaf9e commit 07f74cb

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

EventFiltering/macros/getMenu.cc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#include "CCDB/BasicCCDBManager.h"
13+
14+
#include <TAxis.h>
15+
#include <TH1.h>
16+
17+
#include <string>
18+
19+
void getMenu(int runNumber, std::string baseCCDBPath = "Users/m/mpuccio/EventFiltering/OTS/Chunked/") {
20+
auto& ccdb = o2::ccdb::BasicCCDBManager::instance();
21+
TH1* counters = ccdb.getForRun<TH1>(baseCCDBPath + "FilterCounters", runNumber);
22+
TAxis* axis = counters->GetXaxis();
23+
24+
std::vector<std::string> binLabels(axis->GetNbins() - 2); // skip first and last bins
25+
std::cout << "Menu for run " << runNumber << ":\n";
26+
for (int i = 2; i < axis->GetNbins(); ++i) {
27+
binLabels[i - 1] = axis->GetBinLabel(i);
28+
std::cout << "Id " << i - 2 << ": " << axis->GetBinLabel(i) << "\n";
29+
}
30+
31+
}

0 commit comments

Comments
 (0)