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;
35 inline void insert( std::pair<uint32_t, Item>
const &
a ) {
37 switch (
id.subdetId()) {
54 inline const_iterator
find( uint32_t rawId )
const {
56 switch (
id.subdetId()) {
59 const_iterator it =
eb_.
find(rawId);
79 inline const_iterator
begin()
const {
83 inline const_iterator
end()
const {
87 inline void setValue(
const uint32_t
id,
const Item &item) {
95 inline size_t size()
const {
109 switch (
id.subdetId()) {
127 void summary(
float & arg_mean_x_EB,
float & arg_rms_EB,
int & arg_num_x_EB,
128 float & arg_mean_x_EE,
float & arg_rms_EE,
int & arg_num_x_EE)
const {
151 int thesign =
sign==1 ? 1:-1;
158 float x=
eb_[
id.rawId()];
160 mean_x_EB=mean_x_EB+
x;
161 mean_xx_EB=mean_xx_EB+x*
x;
172 float x=
ee_[
id.rawId()];
174 mean_x_EE=mean_x_EE+
x;
175 mean_xx_EE=mean_xx_EE+x*
x;
183 mean_x_EB=mean_x_EB/num_x_EB;
184 mean_x_EE=mean_x_EE/num_x_EE;
185 mean_xx_EB=mean_xx_EB/num_x_EB;
186 mean_xx_EE=mean_xx_EE/num_x_EE;
187 float rms_EB=(mean_xx_EB-mean_x_EB*mean_x_EB);
188 float rms_EE=(mean_xx_EE-mean_x_EE*mean_x_EE);
191 arg_mean_x_EB = mean_x_EB;
193 arg_num_x_EB = num_x_EB;
196 arg_mean_x_EE = mean_x_EE;
198 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