Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:05

0001 #ifndef CondFormats_EcalObjects_EcalTimeDependentCorrections_H
0002 #define CondFormats_EcalObjects_EcalTimeDependentCorrections_H
0003 /**
0004  *Author: Vladlen Timciuc, Caltech
0005  * Created: 10 July 2007
0006  * $Id: EcalLaserAPDPNRatios.h,v 1.6 2009/06/24 09:42:27 fra Exp $
0007  **/
0008 #include "CondFormats/Serialization/interface/Serializable.h"
0009 
0010 #include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"
0011 #include "DataFormats/Provenance/interface/Timestamp.h"
0012 #include <vector>
0013 
0014 class EcalTimeDependentCorrections {
0015 public:
0016   struct Values {
0017     Values() : p1(0), p2(0), p3(0) {}
0018     float p1;
0019     float p2;
0020     float p3;
0021 
0022     COND_SERIALIZABLE;
0023   };
0024   struct Times {
0025     Times() : t1(0), t2(0), t3(0) {}
0026     edm::Timestamp t1;
0027     edm::Timestamp t2;
0028     edm::Timestamp t3;
0029 
0030     COND_SERIALIZABLE;
0031   };
0032 
0033   typedef EcalCondObjectContainer<Values> EcalValueMap;
0034   typedef std::vector<Times> EcalTimeMap;
0035 
0036   EcalTimeDependentCorrections() : time_map(92){};  // FIXME
0037   ~EcalTimeDependentCorrections(){};
0038 
0039   void setValue(uint32_t rawId, const Values& value) { value_map[rawId] = value; };
0040   const EcalValueMap& getValueMap() const { return value_map; }
0041 
0042   void setTime(int hashedIndex, const Times& value) { time_map[hashedIndex] = value; };
0043   const EcalTimeMap& getTimeMap() const { return time_map; }
0044 
0045 private:
0046   EcalValueMap value_map;
0047   EcalTimeMap time_map;
0048 
0049   COND_SERIALIZABLE;
0050 };
0051 
0052 #endif