CMS 3D CMS Logo

Functions
FillInfo.cc File Reference
#include "CondFormats/RunInfo/interface/FillInfo.h"
#include "CondFormats/Common/interface/TimeConversions.h"
#include <algorithm>
#include <iterator>
#include <stdexcept>

Go to the source code of this file.

Functions

static std::vector< unsigned short > bitsetToVector (std::bitset< FillInfo::bunchSlots+1 > const &bs)
 
static std::string fillTypeToString (FillInfo::FillTypeId const &fillType)
 
std::ostream & operator<< (std::ostream &os, FillInfo fillInfo)
 
static std::string particleTypeToString (FillInfo::ParticleTypeId const &particleType)
 

Function Documentation

◆ bitsetToVector()

static std::vector<unsigned short> bitsetToVector ( std::bitset< FillInfo::bunchSlots+1 > const &  bs)
static

Definition at line 8 of file FillInfo.cc.

8  {
9  std::vector<unsigned short> vec;
10  //reserve space only for the bits in the bitset that are set
11  vec.reserve(bs.count());
12  for (size_t i = 0; i < bs.size(); ++i) {
13  if (bs.test(i))
14  vec.push_back((unsigned short)i);
15  }
16  return vec;
17 }

References cms::cuda::bs, and mps_fire::i.

Referenced by FillInfo::bunchConfigurationForBeam1(), and FillInfo::bunchConfigurationForBeam2().

◆ fillTypeToString()

static std::string fillTypeToString ( FillInfo::FillTypeId const &  fillType)
static

Definition at line 20 of file FillInfo.cc.

20  {
21  std::string s_fillType("UNKNOWN");
22  switch (fillType) {
23  case FillInfo::UNKNOWN:
24  s_fillType = std::string("UNKNOWN");
25  break;
26  case FillInfo::PROTONS:
27  s_fillType = std::string("PROTONS");
28  break;
29  case FillInfo::IONS:
30  s_fillType = std::string("IONS");
31  break;
32  case FillInfo::COSMICS:
33  s_fillType = std::string("COSMICS");
34  break;
35  case FillInfo::GAP:
36  s_fillType = std::string("GAP");
37  break;
38  default:
39  s_fillType = std::string("UNKNOWN");
40  }
41  return s_fillType;
42 }

References FillInfo::COSMICS, FillInfo::GAP, FillInfo::IONS, FillInfo::PROTONS, AlCaHLTBitMon_QueryRunRegistry::string, and FillInfo::UNKNOWN.

Referenced by FillInfo::print().

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
FillInfo  fillInfo 
)

Definition at line 321 of file FillInfo.cc.

321  {
322  std::stringstream ss;
323  fillInfo.print(ss);
324  os << ss.str();
325  return os;
326 }

References FillInfo::print(), and contentValuesCheck::ss.

◆ particleTypeToString()

static std::string particleTypeToString ( FillInfo::ParticleTypeId const &  particleType)
static

Definition at line 45 of file FillInfo.cc.

45  {
46  std::string s_particleType("NONE");
47  switch (particleType) {
48  case FillInfo::NONE:
49  s_particleType = std::string("NONE");
50  break;
51  case FillInfo::PROTON:
52  s_particleType = std::string("PROTON");
53  break;
54  case FillInfo::PB82:
55  s_particleType = std::string("PB82");
56  break;
57  case FillInfo::AR18:
58  s_particleType = std::string("AR18");
59  break;
60  case FillInfo::D:
61  s_particleType = std::string("D");
62  break;
63  case FillInfo::XE54:
64  s_particleType = std::string("XE54");
65  break;
66  default:
67  s_particleType = std::string("NONE");
68  }
69  return s_particleType;
70 }

References FillInfo::AR18, FillInfo::D, FillInfo::NONE, PbPb_ZMuSkimMuonDPG_cff::particleType, FillInfo::PB82, FillInfo::PROTON, AlCaHLTBitMon_QueryRunRegistry::string, and FillInfo::XE54.

Referenced by FillInfo::print().

FillInfo::XE54
Definition: FillInfo.h:16
mps_fire.i
i
Definition: mps_fire.py:428
FillInfo::AR18
Definition: FillInfo.h:16
FillInfo::print
void print(std::stringstream &ss) const
Definition: FillInfo.cc:276
FillInfo::COSMICS
Definition: FillInfo.h:15
FillInfo::NONE
Definition: FillInfo.h:16
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
cms::cuda::bs
bs
Definition: HistoContainer.h:76
FillInfo::IONS
Definition: FillInfo.h:15
FillInfo::D
Definition: FillInfo.h:16
FillInfo::PROTON
Definition: FillInfo.h:16
FillInfo::UNKNOWN
Definition: FillInfo.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FillInfo::PB82
Definition: FillInfo.h:16
FillInfo::GAP
Definition: FillInfo.h:15
PbPb_ZMuSkimMuonDPG_cff.particleType
particleType
Definition: PbPb_ZMuSkimMuonDPG_cff.py:27
FillInfo::PROTONS
Definition: FillInfo.h:15