CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDcsValues.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef HcalDcsValues_h
3 #define HcalDcsValues_h
4 
6 
7 #include <iostream>
8 //#include <set>
9 #include <vector>
14 
15 /*
16  \class: HcalDcsValues
17  \author: Jacob Anderson
18 
19  A container class for holding the dcs values from the database. The
20  values are organized by subdetector, and sorted by HcalDcsDetId.
21  There is also checking functionality to be able to see that the
22  values are witin their set bounds.
23  */
24 
26 public:
27  typedef std::vector<HcalDcsValue> DcsSet;
28 
29  //The subdetectors of interest to the Hcal run certification
30  enum DcsSubDet{ HcalHB = 1, HcalHE = 2, HcalHO0 = 3, HcalHO12 = 4,
31  HcalHF = 5 };
32 
33  HcalDcsValues();
34 
35  virtual ~HcalDcsValues();
36 
37  // add a new value to the appropriate list
38  bool addValue(HcalDcsValue const& newVal);
39  void sortAll();
40  // check if a given id has any entries in a list
41  bool exists(HcalDcsDetId const& fid);
42  // get a list of values that are for the give id
43  DcsSet getValues(HcalDcsDetId const& fid);
44 
45  DcsSet const & getAllSubdetValues(DcsSubDet subd) const;
46 
47  std::string myname() const { return (std::string)"HcalDcsValues"; }
48 
49  //Check the values of a subdetector. If LS is -1 then for the whole run
50  //otherwise for the given LS.
51  bool DcsValuesOK(DcsSubDet subd, int LS = -1);
52  //bool DcsValuesOK(HcalDetID dataId, DcsMap, int LS = -1) const;
53 
54 protected:
55  bool foundDcsId(DcsSet const& valList, HcalDcsDetId const& fid) const;
56  bool subDetOk(DcsSet const& valList, int LS) const;
57  bool sortList(DcsSet& valList) const;
58 
59 private:
60  DcsSet mHBValues;
61  bool mHBsorted;
62  DcsSet mHEValues;
63  bool mHEsorted;
64  DcsSet mHO0Values;
65  bool mHO0sorted;
66  DcsSet mHO12Values;
68  DcsSet mHFValues;
69  bool mHFsorted;
70 
72 };
73 
74 #endif
DcsSet getValues(HcalDcsDetId const &fid)
bool exists(HcalDcsDetId const &fid)
DcsSet const & getAllSubdetValues(DcsSubDet subd) const
std::string myname() const
Definition: HcalDcsValues.h:47
DcsSet mHO0Values
Definition: HcalDcsValues.h:64
bool foundDcsId(DcsSet const &valList, HcalDcsDetId const &fid) const
std::vector< HcalDcsValue > DcsSet
Definition: HcalDcsValues.h:27
DcsSet mHFValues
Definition: HcalDcsValues.h:68
bool DcsValuesOK(DcsSubDet subd, int LS=-1)
virtual ~HcalDcsValues()
#define COND_SERIALIZABLE
Definition: Serializable.h:38
bool addValue(HcalDcsValue const &newVal)
DcsSet mHBValues
Definition: HcalDcsValues.h:60
bool sortList(DcsSet &valList) const
bool subDetOk(DcsSet const &valList, int LS) const
DcsSet mHO12Values
Definition: HcalDcsValues.h:66
DcsSet mHEValues
Definition: HcalDcsValues.h:62