CMS 3D CMS Logo

ThrParameters.cc
Go to the documentation of this file.
3 
4 using namespace edm;
5 using namespace std;
6 
8 {
9  // Read the threshold DB
10  ESHandle<DYTThrObject> dytThresholdsH;
11 
12  // This try catch is just temporary and
13  // will be removed as soon as the DYTThrObject
14  // record is included in a GT.
15  // It is necessary here for testing
16  try {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(); it++ ) {
28  CLHEP::HepSymMatrix error = (*it).matrix();
29  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
30  DTChamberId DTid((*it).rawId());
31  dtApeMap.insert( pair<DTChamberId, GlobalError> (DTid, glbErr) );
32  }
33  ESHandle<AlignmentErrorsExtended> cscAlignmentErrorsExtended;
34  eSetup->get<CSCAlignmentErrorExtendedRcd>().get( cscAlignmentErrorsExtended );
35  for ( std::vector<AlignTransformErrorExtended>::const_iterator it = cscAlignmentErrorsExtended->m_alignError.begin();
36  it != cscAlignmentErrorsExtended->m_alignError.end(); it++ ) {
37  CLHEP::HepSymMatrix error = (*it).matrix();
38  GlobalError glbErr(error[0][0], error[1][0], error[1][1], error[2][0], error[2][1], error[2][2]);
39  CSCDetId CSCid((*it).rawId());
40  cscApeMap.insert( pair<CSCDetId, GlobalError> (CSCid, glbErr) );
41  }
42 }
43 
45 
ThrParameters(const edm::EventSetup *)
Definition: ThrParameters.cc:7
std::vector< AlignTransformErrorExtended > m_alignError
HLT enums.
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86