CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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<AlignmentErrors> dtAlignmentErrors;
25  eSetup->get<DTAlignmentErrorRcd>().get( dtAlignmentErrors );
26  for ( std::vector<AlignTransformError>::const_iterator it = dtAlignmentErrors->m_alignError.begin();
27  it != dtAlignmentErrors->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<AlignmentErrors> cscAlignmentErrors;
34  eSetup->get<CSCAlignmentErrorRcd>().get( cscAlignmentErrors );
35  for ( std::vector<AlignTransformError>::const_iterator it = cscAlignmentErrors->m_alignError.begin();
36  it != cscAlignmentErrors->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
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62