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>
120 std::vector<DetId> channels;
122 for (
unsigned int i = 0;
i < CASTORcontainer.size();
i++) {
123 if (emptyItem.rawId() != CASTORcontainer.at(
i).rawId())
124 channels.push_back(
DetId(CASTORcontainer.at(
i).rawId()));
130 template <
class Item>
135 int sector = tid.
sector();
137 static const int CASTORhalf = 224;
139 int index = 14 * (sector - 1) + (module - 1);
CastorCondObjectContainer()
std::vector< Item > CASTORcontainer
int sector() const
get the sector (1-16)
std::vector< DetId > getAllChannels() const
int module() const
get the module (1-2 for EM, 1-12 for HAD)
const Item * getValues(DetId fId, bool throwOnFail=true) const
const bool exists(DetId fId) const
unsigned int hashed_id(DetId fId) const
~CastorCondObjectContainer()
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int zside() const
get the z-side of the cell (1/-1)
static const int SubdetectorId
#define COND_SERIALIZABLE
bool addValues(const Item &myItem)
std::string myname() const
constexpr Detector det() const
get the detector field from this detid