File indexing completed on 2024-04-06 12:02:13
0001
0002 #ifndef HcalDcsValues_h
0003 #define HcalDcsValues_h
0004
0005 #include "CondFormats/Serialization/interface/Serializable.h"
0006
0007 #include <iostream>
0008
0009 #include <vector>
0010 #include "CondFormats/HcalObjects/interface/HcalDcsValue.h"
0011 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0012 #include "DataFormats/HcalDetId/interface/HcalDcsDetId.h"
0013 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 class HcalDcsValues {
0026 public:
0027 typedef std::vector<HcalDcsValue> DcsSet;
0028
0029
0030 enum DcsSubDet { HcalHB = 1, HcalHE = 2, HcalHO0 = 3, HcalHO12 = 4, HcalHF = 5 };
0031
0032 HcalDcsValues();
0033
0034 virtual ~HcalDcsValues();
0035
0036
0037 bool addValue(HcalDcsValue const& newVal);
0038 void sortAll();
0039
0040 bool exists(HcalDcsDetId const& fid);
0041
0042 DcsSet getValues(HcalDcsDetId const& fid);
0043
0044 DcsSet const& getAllSubdetValues(DcsSubDet subd) const;
0045
0046 std::string myname() const { return (std::string) "HcalDcsValues"; }
0047
0048
0049
0050 bool DcsValuesOK(DcsSubDet subd, int LS = -1);
0051
0052
0053 protected:
0054 bool foundDcsId(DcsSet const& valList, HcalDcsDetId const& fid) const;
0055 bool subDetOk(DcsSet const& valList, int LS) const;
0056 bool sortList(DcsSet& valList) const;
0057
0058 private:
0059 DcsSet mHBValues;
0060 bool mHBsorted;
0061 DcsSet mHEValues;
0062 bool mHEsorted;
0063 DcsSet mHO0Values;
0064 bool mHO0sorted;
0065 DcsSet mHO12Values;
0066 bool mHO12sorted;
0067 DcsSet mHFValues;
0068 bool mHFsorted;
0069
0070 COND_SERIALIZABLE;
0071 };
0072
0073 #endif