CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LMFCorrCoefDat.h
Go to the documentation of this file.
1 #ifndef LMFCORRCOEFDAT_H
2 #define LMFCORRCOEFDAT_H
3 
4 /*
5  Last updated by Giovanni.Organtini@roma1.infn.it 2010
6 
7  This class represents a block of data from LMF_CORR_COEF_DAT
8 
9 */
10 
11 #include <map>
12 
15 
17  public:
20  LMFCorrCoefDat(oracle::occi::Environment* env,
21  oracle::occi::Connection* conn);
23 
24  void init();
25  LMFCorrCoefDat& setConnection(oracle::occi::Environment* env,
26  oracle::occi::Connection* conn);
28  const EcalLogicID &id, float p1, float p2, float p3);
30  const EcalLogicID &id, float p1, float p2, float p3,
31  float p1e, float p2e, float p3e);
33  const EcalLogicID &id, float p1e, float p2e,
34  float p3e);
36  const EcalLogicID &id, int flag);
38  const EcalLogicID &id, int seq_id);
40  const EcalLogicID &id,
41  const LMFSeqDat &seq);
43  void fetchAfter(const Tm &t);
44  void fetchAfter(const Tm &t, int howMany);
45  void fetchBetween(const Tm &tmin, const Tm &tmax);
46  void fetchBetween(const Tm &tmin, const Tm &tmax, int maxNumberOfIOVs);
47  void fetch(std::list<int> subiov_ids);
48  void fetch(int subiov_id);
49  void fetch(const LMFLmrSubIOV &iov);
50 
51  std::map<int, std::map<int, LMFSextuple> > getCorrections(const Tm &t);
52  std::map<int, std::map<int, LMFSextuple> > getCorrections(const Tm &t,
53  int max);
54  std::map<int, std::map<int, LMFSextuple> > getCorrections(const Tm &t,
55  const Tm &t2,
56  int max);
57  std::list<std::vector<float> > getParameters(int id);
58  std::list<std::vector<float> > getParameters(const EcalLogicID &id);
59  std::vector<float> getParameters(const LMFLmrSubIOV &iov,
60  const EcalLogicID &id);
61  std::vector<float> getParameterErrors(const LMFLmrSubIOV &iov,
62  const EcalLogicID &id);
63  std::vector<Tm> getTimes(const LMFLmrSubIOV &iov);
64  int getFlag(const LMFLmrSubIOV &iov, const EcalLogicID &id);
65  int getSeqID(const LMFLmrSubIOV &iov, const EcalLogicID &id);
66  LMFSeqDat getSequence(const LMFLmrSubIOV &iov, const EcalLogicID &id);
67  std::list<int> getSubIOVIDs();
68 
69  int size() const;
70  void dump();
71  void debug();
72  void nodebug();
73  void writeDB();
74 
75  private:
76  static const int MAX_NUMBER_OF_SEQUENCES_TO_FETCH = 32;
77 
78  std::map<int, LMFCorrCoefDatComponent *> m_data; // this map associates SUBIOV_IDs to data
79  std::map<int, LMFLmrSubIOV *> m_subiov; // this map associates SUBIOV_IDs to SubIOVs
80  oracle::occi::Environment* m_env;
81  oracle::occi::Connection* m_conn;
82  bool m_debug;
83 
85  void checkTriplets(int logic_id, const LMFSextuple &s,
86  const std::map<int, LMFSextuple> &lastMap);
87 
88 };
89 
90 #endif
std::map< int, LMFLmrSubIOV * > m_subiov
int size() const
long int flag
Definition: mlp_lapack.h:47
std::map< int, std::map< int, LMFSextuple > > getCorrections(const Tm &t)
std::list< std::vector< float > > getParameters(int id)
std::vector< float > getParameterErrors(const LMFLmrSubIOV &iov, const EcalLogicID &id)
int getFlag(const LMFLmrSubIOV &iov, const EcalLogicID &id)
oracle::occi::Connection * m_conn
RunIOV fetchLastInsertedRun()
void fetch(std::list< int > subiov_ids)
static const int MAX_NUMBER_OF_SEQUENCES_TO_FETCH
LMFCorrCoefDat & setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void fetchBetween(const Tm &tmin, const Tm &tmax)
tuple iov
Definition: o2o.py:307
const T & max(const T &a, const T &b)
LMFSeqDat getSequence(const LMFLmrSubIOV &iov, const EcalLogicID &id)
std::map< int, LMFCorrCoefDatComponent * > m_data
oracle::occi::Environment * m_env
double p2[4]
Definition: TauolaWrapper.h:90
int getSeqID(const LMFLmrSubIOV &iov, const EcalLogicID &id)
void fetchAfter(const Tm &t)
static const double tmax[3]
std::vector< Tm > getTimes(const LMFLmrSubIOV &iov)
void checkTriplets(int logic_id, const LMFSextuple &s, const std::map< int, LMFSextuple > &lastMap)
double p1[4]
Definition: TauolaWrapper.h:89
LMFCorrCoefDat & setP123Errors(const LMFLmrSubIOV &iov, const EcalLogicID &id, float p1e, float p2e, float p3e)
LMFCorrCoefDat & setSequence(const LMFLmrSubIOV &iov, const EcalLogicID &id, int seq_id)
LMFCorrCoefDat & setFlag(const LMFLmrSubIOV &iov, const EcalLogicID &id, int flag)
Definition: RunIOV.h:13
std::list< int > getSubIOVIDs()
Definition: Tm.h:14
LMFCorrCoefDatComponent * find(const LMFLmrSubIOV &iov)
tuple conn
Definition: results_mgr.py:53
LMFCorrCoefDat & setP123(const LMFLmrSubIOV &iov, const EcalLogicID &id, float p1, float p2, float p3)
double p3[4]
Definition: TauolaWrapper.h:91