test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StorageAccount.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_STORAGE_ACCOUNT_H
2 # define STORAGE_FACTORY_STORAGE_ACCOUNT_H
3 
4 # include <boost/shared_ptr.hpp>
5 # include <stdint.h>
6 # include <string>
7 # include <map>
8 
10 public:
11  struct Counter {
14  double amount;
15  double amount_square;
16  int64_t vector_count;
17  int64_t vector_square;
18  double timeTotal;
19  double timeMin;
20  double timeMax;
21  };
22 
23  class Stamp {
24  public:
26 
27  void tick (double amount = 0., int64_t tick = 0) const;
28  protected:
30  double m_start;
31  };
32 
33  typedef std::map<std::string, Counter> OperationStats;
34  typedef std::map<std::string, boost::shared_ptr<OperationStats> > StorageStats;
35 
36  static const StorageStats& summary(void);
37  static std::string summaryXML(void);
38  static std::string summaryText(bool banner=false);
39  static void fillSummary(std::map<std::string, std::string> &summary);
40  static Counter& counter (const std::string &storageClass,
41  const std::string &operation);
42 };
43 
44 #endif // STORAGE_FACTORY_STORAGE_ACCOUNT_H
void tick(double amount=0., int64_t tick=0) const
static void fillSummary(std::map< std::string, std::string > &summary)
std::map< std::string, Counter > OperationStats
static const StorageStats & summary(void)
std::map< std::string, boost::shared_ptr< OperationStats > > StorageStats
static std::string summaryXML(void)
unsigned long long uint64_t
Definition: Time.h:15
static Counter & counter(const std::string &storageClass, const std::string &operation)
Stamp(Counter &counter)
static std::string summaryText(bool banner=false)