FastSimulation
Utilities
src
Looses.cc
Go to the documentation of this file.
1
//FAMOS headers
2
#include "
FastSimulation/Utilities/interface/Looses.h
"
3
4
#include <iomanip>
5
#include <iostream>
6
7
Looses
*
Looses::myself
=
nullptr
;
8
9
Looses::Looses
() {}
10
11
Looses
*
Looses::instance
() {
12
if
(!
myself
)
13
myself
=
new
Looses
();
14
return
myself
;
15
}
16
17
Looses::~Looses
() {
summary
(); }
18
19
void
Looses::count
(
const
std::string
&
name
,
unsigned
cut
) {
20
if
(
theLosses
.find(
name
) ==
theLosses
.end()) {
21
std::vector<unsigned> myCounts;
22
for
(
unsigned
i
= 0;
i
< 20; ++
i
)
23
myCounts.push_back(0);
24
theLosses
[
name
] = myCounts;
25
}
26
27
if
(
cut
< 20)
28
++
theLosses
[
name
][
cut
];
29
}
30
31
void
Looses::summary
() {
32
std::map<std::string, std::vector<unsigned> >::const_iterator lossItr;
33
std::cout
<<
"***** From LOOSES ***** : Cuts effects"
<< std::endl << std::endl;
34
35
for
(lossItr =
theLosses
.begin(); lossItr !=
theLosses
.end(); ++lossItr) {
36
std::cout
<< lossItr->first <<
":"
<< std::endl;
37
for
(
unsigned
i
= 0;
i
< 4; ++
i
) {
38
for
(
unsigned
j
= 0;
j
< 5; ++
j
) {
39
std::cout
<< std::setw(8) << lossItr->second[5 *
i
+
j
] <<
" "
;
40
}
41
std::cout
<< std::endl;
42
}
43
std::cout
<< std::endl;
44
}
45
}
mps_fire.i
i
Definition:
mps_fire.py:428
TkAlMuonSelectors_cfi.cut
cut
Definition:
TkAlMuonSelectors_cfi.py:5
Looses::Looses
Looses()
Definition:
Looses.cc:9
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
Looses::theLosses
std::map< std::string, std::vector< unsigned > > theLosses
Definition:
Looses.h:32
Looses::count
void count(const std::string &name, unsigned cut)
Counting.
Definition:
Looses.cc:19
Looses::myself
static Looses * myself
Definition:
Looses.h:29
Looses::~Looses
virtual ~Looses()
Virtual destructor (empty)
Definition:
Looses.cc:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
Looses::instance
static Looses * instance()
Constructor is not public (only one instance needed)
Definition:
Looses.cc:11
Looses
Definition:
Looses.h:9
Looses.h
Looses::summary
void summary()
Printing.
Definition:
Looses.cc:31
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
Generated for CMSSW Reference Manual by
1.8.16