1 #ifndef ECAL_COND_OBJECT_CONTAINER_HH 2 #define ECAL_COND_OBJECT_CONTAINER_HH 10 template <
typename T >
16 typedef typename std::vector<Item>
Items;
18 typedef typename std::vector<Item>::iterator
iterator;
40 inline void insert( std::pair<uint32_t, Item>
const &
a ) {
42 switch (
id.subdetId()) {
59 inline const_iterator
find( uint32_t rawId )
const {
61 switch (
id.subdetId()) {
64 const_iterator it =
eb_.
find(rawId);
84 inline const_iterator
begin()
const {
88 inline const_iterator
end()
const {
92 inline void setValue(
const uint32_t
id,
const Item &item) {
114 switch (
id.subdetId()) {
132 void summary(
float & arg_mean_x_EB,
float & arg_rms_EB,
int & arg_num_x_EB,
133 float & arg_mean_x_EE,
float & arg_rms_EE,
int & arg_num_x_EE)
const {
156 int thesign =
sign==1 ? 1:-1;
163 float x=
eb_[
id.rawId()];
165 mean_x_EB=mean_x_EB+
x;
166 mean_xx_EB=mean_xx_EB+x*
x;
177 float x=
ee_[
id.rawId()];
179 mean_x_EE=mean_x_EE+
x;
180 mean_xx_EE=mean_xx_EE+x*
x;
188 mean_x_EB=mean_x_EB/num_x_EB;
189 mean_x_EE=mean_x_EE/num_x_EE;
190 mean_xx_EB=mean_xx_EB/num_x_EB;
191 mean_xx_EE=mean_xx_EE/num_x_EE;
192 float rms_EB=(mean_xx_EB-mean_x_EB*mean_x_EB);
193 float rms_EE=(mean_xx_EE-mean_x_EE*mean_x_EE);
196 arg_mean_x_EB = mean_x_EB;
198 arg_num_x_EB = num_x_EB;
201 arg_mean_x_EE = mean_x_EE;
203 arg_num_x_EE = num_x_EE;
const_iterator begin() const
std::vector< Item >::iterator iterator
const Item & item(size_t hashid) const
const self & getMap() const
const Items & items() const
const_iterator end() const
static const int kBarlRings
const Items & barrelItems() const
Item & operator[](uint32_t rawId)
Item operator[](uint32_t rawId) const
~EcalCondObjectContainer()
static const int kBarlWedges
void setValue(const uint32_t id, const Item &item)
int hashedIndex(int ieta, int iphi)
static const int kEndcWedgesX
EcalContainer< EBDetId, Item > eb_
const_iterator find(uint32_t rawId) const
const_iterator begin() const
void summary(float &arg_mean_x_EB, float &arg_rms_EB, int &arg_num_x_EB, float &arg_mean_x_EE, float &arg_rms_EE, int &arg_num_x_EE) const
void insert(std::pair< uint32_t, Item > const &a)
static const int MAX_IPHI
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
std::vector< Item >::const_iterator const_iterator
static const int MAX_IETA
std::vector< Item > Items
#define COND_SERIALIZABLE
void insert(std::pair< uint32_t, Item > const &a)
const_iterator find(uint32_t rawId) const
EcalCondObjectContainer()
EcalContainer< EEDetId, Item > ee_
const_iterator end() const
const Item & barrel(size_t hashedIndex) const
const Items & endcapItems() const
const Item & endcap(size_t hashedIndex) const
EcalCondObjectContainer< float > EcalFloatCondObjectContainer
static const int kEndcWedgesY