CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

Looses Class Reference

#include <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().

{ summary(); }
Looses::Looses ( ) [private]

Definition at line 9 of file Looses.cc.

Referenced by instance().

{}

Member Function Documentation

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

Counting.

Definition at line 19 of file Looses.cc.

References GOODCOLL_filter_cfg::cut, i, mergeVDriftHistosByStation::name, and theLosses.

                                                 { 
  
  if ( theLosses.find(name) == theLosses.end() ) { 

    std::vector<unsigned> myCounts;
    for ( unsigned i=0; i<20; ++i ) myCounts.push_back(0);
    theLosses[name] = myCounts;

  } 

  if ( cut < 20 ) ++theLosses[name][cut];

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

Constructor is not public (only one instance needed)

Definition at line 11 of file Looses.cc.

References Looses(), and myself.

                         {
  if (!myself) myself = new Looses();
  return myself;
}
void Looses::summary ( )

Printing.

Definition at line 34 of file Looses.cc.

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

Referenced by ~Looses().

                { 

  std::map< std::string, std::vector<unsigned> >::const_iterator lossItr;
  std::cout << "***** From LOOSES ***** : Cuts effects" << std::endl << std::endl;

  for ( lossItr=theLosses.begin(); lossItr != theLosses.end(); ++lossItr ) {
    std::cout << lossItr->first << ":" << std::endl;
    for ( unsigned i=0; i<4; ++i ) {
      for ( unsigned j=0; j<5; ++j ) {
        std::cout << std::setw(8) << lossItr->second[5*i+j] << " ";
      }
      std::cout << std::endl;
    }
    std::cout << std::endl;
  }
     
}

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().