BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Coverage.h
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/calibUtil/src/dbIntegrity/Coverage.h,v 1.1.1.1
2// 2005/10/17 06:12:26 maqm Exp $
3#ifndef CALIBUTIL_COVERAGE_H
4#define CALIBUTIL_COVERAGE_H
5/**
6 @file Coverage.h
7*/
8#include "facilities/Timestamp.h"
9#include <string>
10#include <vector>
11
12namespace rdbModel {
13 class Rdb;
14 class Connection;
15} // namespace rdbModel
16namespace calibUtil {
17 class Metadata;
18}
19
20/**
21 @class Coverage
22
23 Check whether calibrations for a particular calibration type (or each in
24 a predefined collection) exist covering full time interval, and whether
25 they overlap.
26*/
27class Coverage {
28public:
29 Coverage( calibUtil::Metadata* meta, const std::string& instr, const std::string& flavor,
30 const std::string& level, const facilities::Timestamp& ts );
31
32 /// The @nickname argument may be a single legal calib_type or may be
33 /// one of the special wildcard values "CAL" "TKR" "*", in which case it
34 /// is expanded to a suitable list of calib types (if we have a schema)
35 bool expandTypes( std::string& nickname, std::vector<std::string>& types );
36
38
39 // raison d'etre of this class. Examine all db rows of type @calibType
40 // and also matching flavor, instrument, level, etc., to see if there
41 // is precisely one valid an any one time (with some tolerance for
42 // small overlap)
43 unsigned checkType( std::string calibtype );
44 void setOverlap( unsigned seconds ) { m_overlap = seconds; }
45
46private:
48 rdbModel::Rdb* m_rdb;
49 std::string m_instr;
50 std::string m_flavor;
51 std::string m_level;
52 std::string m_calib;
53
55 std::string m_table;
56 unsigned m_overlap;
57 std::vector<std::string> m_selects;
58 std::vector<std::string> m_orderBy;
59};
60#endif
double meta
void setOverlap(unsigned seconds)
Definition Coverage.h:44
unsigned checkType(std::string calibtype)
Definition Coverage.cxx:84
~Coverage()
Definition Coverage.h:37
bool expandTypes(std::string &nickname, std::vector< std::string > &types)
Definition Coverage.cxx:64
Coverage(calibUtil::Metadata *meta, const std::string &instr, const std::string &flavor, const std::string &level, const facilities::Timestamp &ts)
Definition Coverage.cxx:45
Module implements methods for clients to get generic services.