CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Looses Class Reference

#include <Looses.h>

Public Member Functions

void count (const std::string &name, unsigned cut)
 Counting. More...
 
void summary ()
 Printing. More...
 
virtual ~Looses ()
 Virtual destructor (empty) More...
 

Static Public Member Functions

static Loosesinstance ()
 Constructor is not public (only one instance needed) More...
 

Private Member Functions

 Looses ()
 

Private Attributes

std::map< std::string, std::vector< unsigned > > theLosses
 

Static Private Attributes

static Loosesmyself = nullptr
 

Detailed Description

Definition at line 9 of file Looses.h.

Constructor & Destructor Documentation

◆ ~Looses()

Looses::~Looses ( )
virtual

Virtual destructor (empty)

Definition at line 17 of file Looses.cc.

17 { summary(); }

References summary().

◆ Looses()

Looses::Looses ( )
private

Definition at line 9 of file Looses.cc.

9 {}

Referenced by instance().

Member Function Documentation

◆ count()

void Looses::count ( const std::string &  name,
unsigned  cut 
)

Counting.

Definition at line 19 of file Looses.cc.

19  {
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 }

References TkAlMuonSelectors_cfi::cut, mps_fire::i, Skims_PA_cff::name, and theLosses.

◆ instance()

Looses * Looses::instance ( )
static

Constructor is not public (only one instance needed)

Definition at line 11 of file Looses.cc.

11  {
12  if (!myself)
13  myself = new Looses();
14  return myself;
15 }

References Looses(), and myself.

◆ summary()

void Looses::summary ( )

Printing.

Definition at line 31 of file Looses.cc.

31  {
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 }

References gather_cfg::cout, mps_fire::i, dqmiolumiharvest::j, and theLosses.

Referenced by ~Looses().

Member Data Documentation

◆ myself

Looses * Looses::myself = nullptr
staticprivate

Definition at line 29 of file Looses.h.

Referenced by instance().

◆ theLosses

std::map<std::string, std::vector<unsigned> > Looses::theLosses
private

Definition at line 32 of file Looses.h.

Referenced by count(), and summary().

mps_fire.i
i
Definition: mps_fire.py:355
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::myself
static Looses * myself
Definition: Looses.h:29
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