CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
hltrigreport::Accumulate Struct Reference

#include <HLTrigReport.h>

Public Member Functions

 Accumulate ()
 
 Accumulate (size_t numHLNames, std::vector< std::vector< unsigned int >> const &hlIndex, std::vector< std::vector< unsigned int >> const &dsIndex)
 
void accumulate (Accumulate const &)
 
void reset ()
 

Public Attributes

std::vector< std::vector< unsigned int > > dsAccTotS_
 
std::vector< unsigned int > dsAllTotS_
 
std::vector< unsigned int > hlAccept_
 
std::vector< unsigned int > hlAccTot_
 
std::vector< std::vector< unsigned int > > hlAccTotDS_
 
std::vector< unsigned int > hlAllTotDS_
 
std::vector< unsigned int > hlErrors_
 
std::vector< unsigned int > hltL1s_
 
std::vector< unsigned int > hltPre_
 
std::vector< unsigned int > hlWasRun_
 
unsigned int nAccept_
 
unsigned int nErrors_
 
unsigned int nEvents_
 
unsigned int nWasRun_
 

Detailed Description

Definition at line 32 of file HLTrigReport.h.

Constructor & Destructor Documentation

◆ Accumulate() [1/2]

hltrigreport::Accumulate::Accumulate ( )

Definition at line 47 of file HLTrigReport.cc.

48  : nEvents_(0),
49  nWasRun_(0),
50  nAccept_(0),
51  nErrors_(0),
52  hlWasRun_(0),
53  hltL1s_(0),
54  hltPre_(0),
55  hlAccept_(0),
56  hlAccTot_(0),
57  hlErrors_(0),
58  hlAccTotDS_(0),
59  dsAccTotS_(0) {}
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:47
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:51
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:54
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:43
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:46
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:45
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:48
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:44

◆ Accumulate() [2/2]

hltrigreport::Accumulate::Accumulate ( size_t  numHLNames,
std::vector< std::vector< unsigned int >> const &  hlIndex,
std::vector< std::vector< unsigned int >> const &  dsIndex 
)

Member Function Documentation

◆ accumulate()

void hltrigreport::Accumulate::accumulate ( hltrigreport::Accumulate const &  iOther)

Definition at line 87 of file HLTrigReport.cc.

References cms::cuda::assert(), dsAccTotS_, dsAllTotS_, hlAccept_, hlAccTot_, hlAccTotDS_, hlAllTotDS_, hlErrors_, hltL1s_, hltPre_, hlWasRun_, mps_fire::i, dqmiolumiharvest::j, nAccept_, nErrors_, nEvents_, nWasRun_, and findQualityFiles::size.

Referenced by HLTrigReport::globalEndLuminosityBlock().

87  {
88  nEvents_ += iOther.nEvents_;
89  nWasRun_ += iOther.nWasRun_;
90  nAccept_ += iOther.nAccept_;
91  nErrors_ += iOther.nErrors_;
92 
93  auto vsum = [](auto& to, auto const& from) {
94  for (size_t i = 0; i < from.size(); ++i) {
95  to[i] += from[i];
96  }
97  };
98 
99  assert(hlWasRun_.size() == iOther.hlWasRun_.size());
100  vsum(hlWasRun_, iOther.hlWasRun_);
101  vsum(hltL1s_, iOther.hltL1s_);
102  vsum(hltPre_, iOther.hltPre_);
103  vsum(hlAccept_, iOther.hlAccept_);
104  vsum(hlAccTot_, iOther.hlAccTot_);
105  vsum(hlErrors_, iOther.hlErrors_);
106 
107  assert(hlAllTotDS_.size() == iOther.hlAllTotDS_.size());
108  vsum(hlAllTotDS_, iOther.hlAllTotDS_);
109  vsum(dsAllTotS_, iOther.dsAllTotS_);
110 
111  auto vvsum = [](auto& to, auto const& from) {
112  for (size_t i = 0; i < from.size(); ++i) {
113  assert(from[i].size() == to[i].size());
114  for (size_t j = 0; j < from[i].size(); ++j) {
115  to[i][j] += from[i][j];
116  }
117  }
118  };
119 
120  vvsum(hlAccTotDS_, iOther.hlAccTotDS_);
121  vvsum(dsAccTotS_, iOther.dsAccTotS_);
122 }
size
Write out results.
std::vector< unsigned int > hlAllTotDS_
Definition: HLTrigReport.h:52
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:47
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:51
assert(be >=bs)
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:54
std::vector< unsigned int > dsAllTotS_
Definition: HLTrigReport.h:55
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:43
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:46
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:45
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:48
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:44

◆ reset()

void hltrigreport::Accumulate::reset ( void  )

Definition at line 124 of file HLTrigReport.cc.

References MillePedeFileConverter_cfg::e, and ntuplemaker::fill.

Referenced by HLTrigReport::analyze(), and HLTrigReport::reset().

124  {
125  nEvents_ = 0;
126  nWasRun_ = 0;
127  nAccept_ = 0;
128  nErrors_ = 0;
129 
130  auto vreset = [](auto& to) { std::fill(to.begin(), to.end(), 0); };
131 
132  vreset(hlWasRun_);
133  vreset(hltL1s_);
134  vreset(hltPre_);
135  vreset(hlAccept_);
136  vreset(hlAccTot_);
137  vreset(hlErrors_);
138 
139  vreset(hlAllTotDS_);
140  vreset(dsAllTotS_);
141 
142  auto vvreset = [&vreset](auto& to) {
143  for (auto& e : to) {
144  vreset(e);
145  }
146  };
147 
148  vvreset(hlAccTotDS_);
149  vvreset(dsAccTotS_);
150 }
std::vector< unsigned int > hlAllTotDS_
Definition: HLTrigReport.h:52
std::vector< unsigned int > hlAccTot_
Definition: HLTrigReport.h:47
std::vector< std::vector< unsigned int > > hlAccTotDS_
Definition: HLTrigReport.h:51
std::vector< std::vector< unsigned int > > dsAccTotS_
Definition: HLTrigReport.h:54
std::vector< unsigned int > dsAllTotS_
Definition: HLTrigReport.h:55
std::vector< unsigned int > hlWasRun_
Definition: HLTrigReport.h:43
std::vector< unsigned int > hlAccept_
Definition: HLTrigReport.h:46
std::vector< unsigned int > hltPre_
Definition: HLTrigReport.h:45
std::vector< unsigned int > hlErrors_
Definition: HLTrigReport.h:48
std::vector< unsigned int > hltL1s_
Definition: HLTrigReport.h:44

Member Data Documentation

◆ dsAccTotS_

std::vector<std::vector<unsigned int> > hltrigreport::Accumulate::dsAccTotS_

Definition at line 54 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ dsAllTotS_

std::vector<unsigned int> hltrigreport::Accumulate::dsAllTotS_

◆ hlAccept_

std::vector<unsigned int> hltrigreport::Accumulate::hlAccept_

Definition at line 46 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ hlAccTot_

std::vector<unsigned int> hltrigreport::Accumulate::hlAccTot_

Definition at line 47 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ hlAccTotDS_

std::vector<std::vector<unsigned int> > hltrigreport::Accumulate::hlAccTotDS_

Definition at line 51 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ hlAllTotDS_

std::vector<unsigned int> hltrigreport::Accumulate::hlAllTotDS_

◆ hlErrors_

std::vector<unsigned int> hltrigreport::Accumulate::hlErrors_

Definition at line 48 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ hltL1s_

std::vector<unsigned int> hltrigreport::Accumulate::hltL1s_

Definition at line 44 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ hltPre_

std::vector<unsigned int> hltrigreport::Accumulate::hltPre_

Definition at line 45 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ hlWasRun_

std::vector<unsigned int> hltrigreport::Accumulate::hlWasRun_

Definition at line 43 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ nAccept_

unsigned int hltrigreport::Accumulate::nAccept_

Definition at line 40 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ nErrors_

unsigned int hltrigreport::Accumulate::nErrors_

Definition at line 41 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ nEvents_

unsigned int hltrigreport::Accumulate::nEvents_

Definition at line 38 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().

◆ nWasRun_

unsigned int hltrigreport::Accumulate::nWasRun_

Definition at line 39 of file HLTrigReport.h.

Referenced by accumulate(), and HLTrigReport::dumpReport().