CMS 3D CMS Logo

Looses Class Reference

#include <FastSimulation/Utilities/interface/Looses.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions

 Looses ()

Private Attributes

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

Static Private Attributes

static Loosesmyself = 0


Detailed Description

Definition at line 9 of file Looses.h.


Constructor & Destructor Documentation

Looses::~Looses (  )  [virtual]

Virtual destructor (empty).

Definition at line 16 of file Looses.cc.

References summary().

00016 { summary(); }

Looses::Looses (  )  [private]

Definition at line 9 of file Looses.cc.

Referenced by instance().

00009 {}


Member Function Documentation

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

Counting.

Definition at line 19 of file Looses.cc.

References i, and theLosses.

00019                                                  { 
00020   
00021   if ( theLosses.find(name) == theLosses.end() ) { 
00022 
00023     std::vector<unsigned> myCounts;
00024     for ( unsigned i=0; i<20; ++i ) myCounts.push_back(0);
00025     theLosses[name] = myCounts;
00026 
00027   } 
00028 
00029   if ( cut < 20 ) ++theLosses[name][cut];
00030 
00031 }

Looses * Looses::instance ( void   )  [static]

Constructor is not public (only one instance needed).

Definition at line 11 of file Looses.cc.

References Looses(), and myself.

00011                          {
00012   if (!myself) myself = new Looses();
00013   return myself;
00014 }

void Looses::summary (  ) 

Printing.

Definition at line 34 of file Looses.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), i, j, and theLosses.

Referenced by ~Looses().

00034                 { 
00035 
00036   std::map< std::string, std::vector<unsigned> >::const_iterator lossItr;
00037   std::cout << "***** From LOOSES ***** : Cuts effects" << std::endl << std::endl;
00038 
00039   for ( lossItr=theLosses.begin(); lossItr != theLosses.end(); ++lossItr ) {
00040     std::cout << lossItr->first << ":" << std::endl;
00041     for ( unsigned i=0; i<4; ++i ) {
00042       for ( unsigned j=0; j<5; ++j ) {
00043         std::cout << std::setw(8) << lossItr->second[5*i+j] << " ";
00044       }
00045       std::cout << std::endl;
00046     }
00047     std::cout << std::endl;
00048   }
00049      
00050 }


Member Data Documentation

Looses * Looses::myself = 0 [static, private]

Definition at line 29 of file Looses.h.

Referenced by instance().

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

Definition at line 32 of file Looses.h.

Referenced by count(), and summary().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:27:56 2009 for CMSSW by  doxygen 1.5.4