1 #ifndef CastorCondObjectContainer_h
2 #define CastorCondObjectContainer_h
36 std::string
myname()
const {
return (std::string)
"Castor Undefined";}
57 template<
class Item>
void
74 template<
class Item>
const Item*
81 unsigned int index1 =
abs(index);
83 const Item* cell =
NULL;
87 if (index1 < CASTORcontainer.size())
88 cell = &(CASTORcontainer.at(index1) );
95 if ((!cell) || (cell->rawId() != fId ) )
97 <<
"Unavailable Conditions of type " << myname() <<
" for cell " << myId;
101 template<
class Item>
const bool
107 if (index < 0)
return false;
108 unsigned int index1 =
abs(index);
109 const Item* cell =
NULL;
112 if (index1 < CASTORcontainer.size()) cell = &(CASTORcontainer.at(index1) );
114 default:
return false;
break;
120 if (cell->rawId() == fId )
126 template<
class Item>
bool
130 unsigned long myRawId = myItem.rawId();
135 if (index < 0) success =
false;
136 unsigned int index1 =
abs(index);
141 if (!CASTORcontainer.size() ) initContainer(myId.
genericSubdet() );
142 if (index1 < CASTORcontainer.size())
144 CASTORcontainer.at(index1) = myItem;
153 <<
" no valid filling possible for Conditions of type " << myname() <<
" for DetId " << myId;
158 template<
class Item> std::vector<DetId>
161 std::vector<DetId> channels;
163 for (
unsigned int i=0;
i<CASTORcontainer.size();
i++)
165 if (emptyItem.rawId() != CASTORcontainer.at(
i).rawId() )
166 channels.push_back(
DetId(CASTORcontainer.at(
i).rawId()) );
CastorCondObjectContainer()
std::vector< Item > CASTORcontainer
void initContainer(int container)
int hashedId(bool h2mode_=false) const
std::vector< DetId > getAllChannels() const
const bool exists(DetId fId) const
~CastorCondObjectContainer()
const Item * getValues(DetId fId) const
bool addValues(const Item &myItem)
HcalGenericSubdetector genericSubdet() const
std::string myname() const