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
HcalDcsValues::HcalDcsValues
HcalDcsValues()
Definition: HcalDcsValues.cc:5
HcalDcsValue
Definition: HcalDcsValue.h:10
HcalDcsDetId
Definition: HcalDcsDetId.h:27
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
HcalDcsValues::~HcalDcsValues
virtual ~HcalDcsValues()
Definition: HcalDcsValues.cc:8
HcalDcsValues::addValue
bool addValue(HcalDcsValue const &newVal)
Definition: HcalDcsValues.cc:10
HcalDcsValues::DcsSet
std::vector< HcalDcsValue > DcsSet
Definition: HcalDcsValues.h:27
HcalDcsValues::mHO12Values
DcsSet mHO12Values
Definition: HcalDcsValues.h:65
HcalDcsValue.h
HcalDcsValues::mHO0sorted
bool mHO0sorted
Definition: HcalDcsValues.h:64
HcalDcsValues::myname
std::string myname() const
Definition: HcalDcsValues.h:46
HcalDcsDetId.h
HcalDcsValues::mHEsorted
bool mHEsorted
Definition: HcalDcsValues.h:62
HcalDcsValues::getValues
DcsSet getValues(HcalDcsDetId const &fid)
Definition: HcalDcsValues.cc:76
HcalDcsValues::sortList
bool sortList(DcsSet &valList) const
Definition: HcalDcsValues.cc:231
HcalDcsValues::subDetOk
bool subDetOk(DcsSet const &valList, int LS) const
Definition: HcalDcsValues.cc:215
HcalDcsValues::mHEValues
DcsSet mHEValues
Definition: HcalDcsValues.h:61
HcalDcsValues::foundDcsId
bool foundDcsId(DcsSet const &valList, HcalDcsDetId const &fid) const
Definition: HcalDcsValues.cc:207
HcalDcsValues::HcalHO12
Definition: HcalDcsValues.h:30
HcalDcsValues
Definition: HcalDcsValues.h:25
HcalDcsValues::DcsSubDet
DcsSubDet
Definition: HcalDcsValues.h:30
HcalDcsValues::getAllSubdetValues
DcsSet const & getAllSubdetValues(DcsSubDet subd) const
Definition: HcalDcsValues.cc:163
HcalDetId.h
HcalDcsValues::DcsValuesOK
bool DcsValuesOK(DcsSubDet subd, int LS=-1)
Definition: HcalDcsValues.cc:179
Serializable.h
HcalDcsValues::mHFValues
DcsSet mHFValues
Definition: HcalDcsValues.h:67
HcalSubdetector.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalDcsValues::mHFsorted
bool mHFsorted
Definition: HcalDcsValues.h:68
HcalDcsValues::sortAll
void sortAll()
Definition: HcalDcsValues.cc:39
HcalDcsValues::mHBsorted
bool mHBsorted
Definition: HcalDcsValues.h:60
HcalDcsValues::exists
bool exists(HcalDcsDetId const &fid)
Definition: HcalDcsValues.cc:47
HcalDcsValues::mHO0Values
DcsSet mHO0Values
Definition: HcalDcsValues.h:63
HcalDcsValues::HcalHF
Definition: HcalDcsValues.h:30
HcalDcsValues::mHO12sorted
bool mHO12sorted
Definition: HcalDcsValues.h:66
HcalDcsValues::HcalHB
Definition: HcalDcsValues.h:30
HcalDcsValues::HcalHO0
Definition: HcalDcsValues.h:30
HcalDcsValues::mHBValues
DcsSet mHBValues
Definition: HcalDcsValues.h:59
HcalDcsValues::HcalHE
Definition: HcalDcsValues.h:30