Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:26

0001 #ifndef LOOSES_H
0002 #define LOOSES_H
0003 
0004 //C++ headers
0005 #include <string>
0006 #include <map>
0007 #include <vector>
0008 
0009 class Looses {
0010 public:
0011   ///Constructor is not public (only one instance needed)
0012   static Looses* instance();
0013 
0014   ///Virtual destructor (empty)
0015   virtual ~Looses();
0016 
0017   ///Counting
0018   void count(const std::string& name, unsigned cut);
0019 
0020   ///Printing
0021   void summary();
0022 
0023 private:
0024   // The constructor is hidden as we do not want to construct
0025   // more than one instance.
0026   Looses();
0027 
0028   // The instance
0029   static Looses* myself;
0030 
0031   // The table of losses
0032   std::map<std::string, std::vector<unsigned> > theLosses;
0033 };
0034 #endif