CMS 3D CMS Logo

Classes | Functions
theLHCInfoPerLSImpl Namespace Reference

Classes

struct  LumiSectionFilter
 

Functions

bool comparePayloads (const LHCInfoPerLS &rhs, const LHCInfoPerLS &lhs)
 
size_t transferPayloads (const std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfoPerLS >>> &buffer, std::map< cond::Time_t, std::shared_ptr< LHCInfoPerLS >> &iovsToTransfer, std::shared_ptr< LHCInfoPerLS > &prevPayload)
 

Function Documentation

◆ comparePayloads()

bool theLHCInfoPerLSImpl::comparePayloads ( const LHCInfoPerLS rhs,
const LHCInfoPerLS lhs 
)

Definition at line 93 of file LHCInfoPerLSPopConAnalyzer.cc.

References LHCInfoPerLS::betaStarX(), LHCInfoPerLS::betaStarY(), LHCInfoPerLS::crossingAngleX(), LHCInfoPerLS::crossingAngleY(), LHCInfoPerLS::fillNumber(), and LHCInfoPerLS::runNumber().

Referenced by transferPayloads().

93  {
94  if (rhs.fillNumber() != lhs.fillNumber())
95  return false;
96  if (rhs.runNumber() != lhs.runNumber())
97  return false;
98  if (rhs.crossingAngleX() != lhs.crossingAngleX())
99  return false;
100  if (rhs.crossingAngleY() != lhs.crossingAngleY())
101  return false;
102  if (rhs.betaStarX() != lhs.betaStarX())
103  return false;
104  if (rhs.betaStarY() != lhs.betaStarY())
105  return false;
106  return true;
107  }
cond::Time_t runNumber() const
Definition: LHCInfoPerLS.cc:23
float const betaStarY() const
Definition: LHCInfoPerLS.cc:21
float const crossingAngleX() const
Definition: LHCInfoPerLS.cc:15
float const crossingAngleY() const
Definition: LHCInfoPerLS.cc:17
unsigned short const fillNumber() const
Definition: LHCInfoPerLS.cc:11
float const betaStarX() const
Definition: LHCInfoPerLS.cc:19

◆ transferPayloads()

size_t theLHCInfoPerLSImpl::transferPayloads ( const std::vector< std::pair< cond::Time_t, std::shared_ptr< LHCInfoPerLS >>> &  buffer,
std::map< cond::Time_t, std::shared_ptr< LHCInfoPerLS >> &  iovsToTransfer,
std::shared_ptr< LHCInfoPerLS > &  prevPayload 
)

Definition at line 109 of file LHCInfoPerLSPopConAnalyzer.cc.

References PVValHelper::add(), edmScanValgrind::buffer, comparePayloads(), jetsAK4_Puppi_cff::payload, and SiStripBadComponentsDQMServiceTemplate_cfg::since.

Referenced by LHCInfoPerLSPopConSourceHandler::getNewObjects().

111  {
112  size_t niovs = 0;
113  std::stringstream condIovs;
114  for (auto& iov : buffer) {
115  bool add = false;
116  auto payload = iov.second;
117  cond::Time_t since = iov.first;
118  if (iovsToTransfer.empty()) {
119  add = true;
120  } else {
121  LHCInfoPerLS& lastAdded = *iovsToTransfer.rbegin()->second;
122  if (!comparePayloads(lastAdded, *payload)) {
123  add = true;
124  }
125  }
126  if (add) {
127  niovs++;
128  condIovs << since << " ";
129  iovsToTransfer.insert(std::make_pair(since, payload));
130  prevPayload = iov.second;
131  }
132  }
133  edm::LogInfo("transferPayloads") << "TRANSFERED COND IOVS: " << condIovs.str();
134  return niovs;
135  }
unsigned long long Time_t
Definition: Time.h:14
Log< level::Info, false > LogInfo
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
bool comparePayloads(const LHCInfoPerLS &rhs, const LHCInfoPerLS &lhs)