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