CMS 3D CMS Logo

ThrParameters.cc
Go to the documentation of this file.
3 
4 using namespace edm;
5 using namespace std;
6 
8  // Read the threshold DB
9  ESHandle<DYTThrObject> dytThresholdsH;
10 
11  // This try catch is just temporary and
12  // will be removed as soon as the DYTThrObject
13  // record is included in a GT.
14  // It is necessary here for testing
15  try {
16  eSetup->get<DYTThrObjectRcd>().get(dytThresholdsH);
17  dytThresholds = dytThresholdsH.product();
18  isValidThdDB_ = true;
19  } catch (...) {
20  isValidThdDB_ = false;
21  }
22 
23  // Ape are always filled even they're null
24  ESHandle<AlignmentErrorsExtended> dtAlignmentErrorsExtended;
25  eSetup->get<DTAlignmentErrorExtendedRcd>().get(dtAlignmentErrorsExtended);
26  for (std::vector<AlignTransformErrorExtended>::const_iterator it = dtAlignmentErrorsExtended->m_alignError.begin();
27  it != dtAlignmentErrorsExtended->m_alignError.end();
28  it++) {
29  CLHEP::HepSymMatrix error = (*it).matrix();
30  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
31  DTChamberId DTid((*it).rawId());
32  dtApeMap.insert(pair<DTChamberId, GlobalError>(DTid, glbErr));
33  }
34  ESHandle<AlignmentErrorsExtended> cscAlignmentErrorsExtended;
35  eSetup->get<CSCAlignmentErrorExtendedRcd>().get(cscAlignmentErrorsExtended);
36  for (std::vector<AlignTransformErrorExtended>::const_iterator it = cscAlignmentErrorsExtended->m_alignError.begin();
37  it != cscAlignmentErrorsExtended->m_alignError.end();
38  it++) {
39  CLHEP::HepSymMatrix error = (*it).matrix();
40  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
41  CSCDetId CSCid((*it).rawId());
42  cscApeMap.insert(pair<CSCDetId, GlobalError>(CSCid, glbErr));
43  }
44 }
45 
ThrParameters(const edm::EventSetup *)
Definition: ThrParameters.cc:7
std::vector< AlignTransformErrorExtended > m_alignError
HLT enums.
T get() const
Definition: EventSetup.h:73
T const * product() const
Definition: ESHandle.h:86