File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 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+ {
21+ auto & ccdb = o2::ccdb::BasicCCDBManager::instance ();
22+ TH1* counters = ccdb.getForRun <TH1>(baseCCDBPath + " FilterCounters" , runNumber);
23+ TAxis* axis = counters->GetXaxis ();
24+
25+ std::vector<std::string> binLabels (axis->GetNbins () - 2 ); // skip first and last bins
26+ std::cout << " Menu for run " << runNumber << " :\n " ;
27+ for (int i = 2 ; i < axis->GetNbins (); ++i) {
28+ binLabels[i - 1 ] = axis->GetBinLabel (i);
29+ std::cout << " Id " << i - 2 << " : " << axis->GetBinLabel (i) << " \n " ;
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments