Belle II Software development
DQMFileMetaData.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <dqm/dataobjects/DQMFileMetaData.h>
10
11#include <framework/utilities/KeyValuePrinter.h>
12
13#include <iostream>
14
15using namespace std;
16using namespace Belle2;
17
19 m_nEvents(0), m_experiment(0), m_run(0), m_date(""), m_release(""), m_procID(""), m_rtype(""), m_isMC(false),
20 m_databaseGlobalTag("")
21{
22}
23
24
25void DQMFileMetaData::Print(Option_t* option) const
26{
27
28 const bool all = (option && option == std::string("all"));
29 KeyValuePrinter printer(false);
30 printer.put("nEvents", m_nEvents);
31 printer.put("Experiment", m_experiment);
32 printer.put("Run", m_run);
33
34 if (all) {
35 printer.put("run type", m_rtype);
36 printer.put("run date", m_date);
37 printer.put("processing", m_procID);
38 printer.put("release", m_release);
39 printer.put("isMC", m_isMC);
40 printer.put("globalTag", m_databaseGlobalTag);
41 }
42 std::cout << "=== DQMFileMetaData ===\n";
43 std::cout << printer.string();
44 std::cout << "=======================\n";
45}
virtual void Print(Option_t *option="") const override
Print the content of the meta data object.
std::string m_databaseGlobalTag
Global tag in the database used for production of this file.
unsigned int m_nEvents
Number of events.
bool m_isMC
Is it generated or real data?.
std::string m_rtype
run type (physics, cosmics, etc.)
std::string m_procID
processing ID
std::string m_release
Software release version.
std::string m_date
run date and time (UTC).
int m_experiment
experiment number.
DQMFileMetaData()
Constructor.
create human-readable or JSON output for key value pairs.
void put(const std::string &key, const T &value)
Add one key-value pair.
std::string string() const
Return completed string.
Abstract base class for different kinds of events.
STL namespace.