Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions EventFiltering/macros/getMenu.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in EventFiltering/macros/getMenu.C

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check failure on line 11 in EventFiltering/macros/getMenu.C

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in EventFiltering/macros/getMenu.C

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in EventFiltering/macros/getMenu.C

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include "CCDB/BasicCCDBManager.h"

#include <TAxis.h>
#include <TH1.h>

#include <string>

void getMenu(int runNumber, std::string baseCCDBPath = "Users/m/mpuccio/EventFiltering/OTS/Chunked/")
{
auto& ccdb = o2::ccdb::BasicCCDBManager::instance();
TH1* counters = ccdb.getForRun<TH1>(baseCCDBPath + "FilterCounters", runNumber);
TAxis* axis = counters->GetXaxis();

std::vector<std::string> binLabels(axis->GetNbins() - 2); // skip first and last bins
std::cout << "Menu for run " << runNumber << ":\n";
for (int i = 2; i < axis->GetNbins(); ++i) {
binLabels[i - 1] = axis->GetBinLabel(i);
std::cout << "Id " << i - 2 << ": " << axis->GetBinLabel(i) << "\n";
}
}
Loading