CMS 3D CMS Logo

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, HcalHF = 5 };
31 
32  HcalDcsValues();
33 
34  virtual ~HcalDcsValues();
35 
36  // add a new value to the appropriate list
37  bool addValue(HcalDcsValue const& newVal);
38  void sortAll();
39  // check if a given id has any entries in a list
40  bool exists(HcalDcsDetId const& fid);
41  // get a list of values that are for the give id
42  DcsSet getValues(HcalDcsDetId const& fid);
43 
44  DcsSet const& getAllSubdetValues(DcsSubDet subd) const;
45 
46  std::string myname() const { return (std::string) "HcalDcsValues"; }
47 
48  //Check the values of a subdetector. If LS is -1 then for the whole run
49  //otherwise for the given LS.
50  bool DcsValuesOK(DcsSubDet subd, int LS = -1);
51  //bool DcsValuesOK(HcalDetID dataId, DcsMap, int LS = -1) const;
52 
53 protected:
54  bool foundDcsId(DcsSet const& valList, HcalDcsDetId const& fid) const;
55  bool subDetOk(DcsSet const& valList, int LS) const;
56  bool sortList(DcsSet& valList) const;
57 
58 private:
60  bool mHBsorted;
62  bool mHEsorted;
64  bool mHO0sorted;
68  bool mHFsorted;
69 
71 };
72 
73 #endif
bool foundDcsId(DcsSet const &valList, HcalDcsDetId const &fid) const
DcsSet getValues(HcalDcsDetId const &fid)
bool subDetOk(DcsSet const &valList, int LS) const
bool exists(HcalDcsDetId const &fid)
std::string myname() const
Definition: HcalDcsValues.h:46
DcsSet mHO0Values
Definition: HcalDcsValues.h:63
std::vector< HcalDcsValue > DcsSet
Definition: HcalDcsValues.h:27
DcsSet mHFValues
Definition: HcalDcsValues.h:67
bool sortList(DcsSet &valList) const
bool DcsValuesOK(DcsSubDet subd, int LS=-1)
virtual ~HcalDcsValues()
Definition: HcalDcsValues.cc:8
#define COND_SERIALIZABLE
Definition: Serializable.h:39
bool addValue(HcalDcsValue const &newVal)
DcsSet mHBValues
Definition: HcalDcsValues.h:59
DcsSet const & getAllSubdetValues(DcsSubDet subd) const
DcsSet mHO12Values
Definition: HcalDcsValues.h:65
DcsSet mHEValues
Definition: HcalDcsValues.h:61