1 #ifndef CastorCondObjectContainer_h 2 #define CastorCondObjectContainer_h 59 if (CASTORcontainer.empty())
61 CASTORcontainer.push_back(emptyItem);
66 const Item* cell =
nullptr;
70 unsigned int index = hashed_id(fId);
72 if (
index < CASTORcontainer.size())
73 cell = &(CASTORcontainer.at(
index));
76 if ((!cell) || (cell->rawId() != fId)) {
79 <<
"Unavailable Conditions of type " << myname() <<
" for cell " << myId;
89 const Item* cell = getValues(fId,
false);
92 if (cell->rawId() == fId)
99 unsigned long myRawId = myItem.rawId();
101 unsigned int index = hashed_id(myId);
104 if (CASTORcontainer.empty())
106 if (
index < CASTORcontainer.size()) {
107 CASTORcontainer.at(
index) = myItem;
113 <<
" no valid filling possible for Conditions of type " << myname() <<
" for DetId " << myId;
118 template <
class Item>
122 for (
unsigned int i = 0;
i < CASTORcontainer.size();
i++) {
123 if (emptyItem.rawId() != CASTORcontainer.at(
i).rawId())
130 template <
class Item>
137 static const int CASTORhalf = 224;
CastorCondObjectContainer()
std::vector< Item > CASTORcontainer
std::string myname() const
const Item * getValues(DetId fId, bool throwOnFail=true) const
constexpr Detector det() const
get the detector field from this detid
std::vector< DetId > getAllChannels() const
~CastorCondObjectContainer()
int module() const
get the module (1-2 for EM, 1-12 for HAD)
int zside() const
get the z-side of the cell (1/-1)
unsigned int hashed_id(DetId fId) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int sector() const
get the sector (1-16)
static const int SubdetectorId
#define COND_SERIALIZABLE
bool addValues(const Item &myItem)
const bool exists(DetId fId) const