HOPS
HOPS class reference
MHO_LegacyRootCodeGenerator.hh
Go to the documentation of this file.
1 #ifndef MHO_LegacyRootCodeGenerator_HH__
2 #define MHO_LegacyRootCodeGenerator_HH__
3 
4 #include <ctime>
5 #include <string>
6 #include <vector>
7 
8 namespace hops
9 {
10 
23 {
24  public:
27 
28 
34  std::string GetCode();
35 
36 
46  std::vector< std::string > GetCodes(std::size_t N);
47 
48  private:
49  time_t fNow;
50  int fYear;
51  int fDay;
52  int fHour;
53  int fMin;
54  int fSec;
55 
56 
65  int root_id_delta(time_t now);
66 
73  std::string root_id_later(time_t now);
74 
85  std::string root_id(int year, int day, int hour, int min, int sec);
86 
98  std::string root_id_break(time_t now, int year, int day, int hour, int min, int sec);
99 };
100 
101 } // namespace hops
102 
103 #endif
Class MHO_LegacyRootCodeGenerator.
Definition: MHO_LegacyRootCodeGenerator.hh:23
std::vector< std::string > GetCodes(std::size_t N)
Getter for multiple root codes get a pre-assigned sequential list of N root codes to avoid collisions...
Definition: MHO_LegacyRootCodeGenerator.cc:22
virtual ~MHO_LegacyRootCodeGenerator()
Definition: MHO_LegacyRootCodeGenerator.hh:26
MHO_LegacyRootCodeGenerator()
Definition: MHO_LegacyRootCodeGenerator.hh:25
std::string GetCode()
get a single code corresponding to the current time
Definition: MHO_LegacyRootCodeGenerator.cc:9
#define min(a, b)
Definition: max555.c:9
Definition: MHO_ChannelLabeler.hh:17