File indexing completed on 2024-04-06 12:02:32
0001 #include "CondFormats/RunInfo/interface/RunSummary.h"
0002 RunSummary::RunSummary() {}
0003
0004 RunSummary* RunSummary::Fake_RunSummary() {
0005 RunSummary* sum = new RunSummary();
0006 sum->m_run = -1;
0007 sum->m_hltkey = "null";
0008 sum->m_start_time_str = "null";
0009 sum->m_stop_time_str = "null";
0010 sum->m_name = "null";
0011 return sum;
0012 }
0013
0014 void RunSummary::printAllValues() const {
0015 std::cout << "run number: " << m_run << std::endl;
0016 std::cout << "run name: " << m_name << std::endl;
0017 std::cout << "run start time as timestamp: " << m_start_time_ll << std::endl;
0018 std::cout << "run start time as date: " << m_start_time_str << std::endl;
0019 std::cout << "run stop time as timestamp: " << m_stop_time_ll << std::endl;
0020 std::cout << "run stop time as date: " << m_stop_time_str << std::endl;
0021 std::cout << "lumisection in the run: " << m_lumisections << std::endl;
0022 std::cout << "run hltkey: " << m_hltkey << std::endl;
0023 std::cout << "run number of events according hlt: " << m_nevents << std::endl;
0024 std::cout << "hlt rate: " << m_rate << std::endl;
0025 std::cout << "ids of subdetectors in run: " << std::endl;
0026 for (size_t i = 0; i < m_subdt_in.size(); i++) {
0027 std::cout << "---> " << m_subdt_in[i] << std::endl;
0028 }
0029 }
0030
0031 std::vector<std::string> RunSummary::getSubdtIn() const {
0032 std::vector<std::string> v;
0033 for (size_t i = 0; i < m_subdt_in.size(); i++) {
0034 if (m_subdt_in[i] == 0) {
0035 v.push_back("PIXEL");
0036 }
0037 if (m_subdt_in[i] == 1) {
0038 v.push_back("TRACKER");
0039 }
0040 if (m_subdt_in[i] == 2) {
0041 v.push_back("ECAL");
0042 }
0043 if (m_subdt_in[i] == 3) {
0044 v.push_back("HCAL");
0045 }
0046
0047 if (m_subdt_in[i] == 4) {
0048 v.push_back("DT");
0049 }
0050 if (m_subdt_in[i] == 5) {
0051 v.push_back("CSC");
0052 }
0053 if (m_subdt_in[i] == 6) {
0054 v.push_back("RPC");
0055 }
0056 }
0057 return v;
0058 }