CMS 3D CMS Logo

CocoaAnalyzer.h

Go to the documentation of this file.
00001 #ifndef CocoaAnalyser_HH
00002 #define CocoaAnalyser_HH
00003 //-*- C++ -*-
00004 //
00005 // Package:    Alignment/CocoaApplication
00006 // Class:      CocoaAnalyzer
00007 // 
00008 /*
00009 
00010  Description: test access to the OpticalAlignMeasurements via OpticalAlignMeasurementsGeneratedSource
00011     This also should demonstrate access to a geometry via the XMLIdealGeometryESSource
00012     for use in THE COCOA analyzer.
00013 
00014  Implementation:
00015      Iterate over retrieved alignments.
00016 */
00017 //
00018 
00019 #include <stdexcept>
00020 #include <string>
00021 #include <iostream>
00022 #include <map>
00023 #include "FWCore/Framework/interface/EDAnalyzer.h"
00024 #include "DetectorDescription/Core/interface/DDPosData.h" 
00025 
00026 class Event;
00027 class EventSetup;
00028 class Entry;
00029 //#include "FWCore/Framework/interface/EventSetup.h"
00030 
00031 #include "CondFormats/OptAlignObjects/interface/OpticalAlignments.h"
00032 #include "CondFormats/OptAlignObjects/interface/OpticalAlignInfo.h"
00033 #include "CondFormats/OptAlignObjects/interface/OpticalAlignMeasurements.h"
00034 
00035 
00036 class DDFilteredView;
00037 class DDCompactView;
00038 class DDSpecifics;
00039 class OpticalObject;
00040 
00041 
00042 class CocoaAnalyzer : public edm::EDAnalyzer
00043 {
00044  public:
00045   
00046   explicit  CocoaAnalyzer(edm::ParameterSet const& p);
00047   explicit  CocoaAnalyzer(int i) { }
00048   virtual ~ CocoaAnalyzer() { }
00049   
00050   virtual void beginJob(const edm::EventSetup& c);
00051   virtual void analyze(const edm::Event& e, const edm::EventSetup& c);
00052   // see note on endJob() at the bottom of the file.
00053   // virtual void endJob() ;
00054 
00055  private:
00056   void ReadXMLFile( const edm::EventSetup& evts );
00057   std::vector<OpticalAlignInfo> ReadCalibrationDB( const edm::EventSetup& evts );
00058 
00059   void CorrectOptAlignments( std::vector<OpticalAlignInfo>& oaListCalib );
00060   OpticalAlignInfo* FindOpticalAlignInfoXML( OpticalAlignInfo oaInfo );
00061   bool CorrectOaParam( OpticalAlignParam* oaParamXML, OpticalAlignParam oaParamDB );
00062 
00063   void RunCocoa();
00064 
00065   bool DumpCocoaResults(); 
00066   double GetEntryError( const Entry* entry );
00067  
00068   OpticalAlignInfo GetOptAlignInfoFromOptO( OpticalObject* opto );
00069   double myFetchDbl(const DDsvalues_type& dvst, 
00070                                       const std::string& spName,
00071                                     const size_t& vecInd );
00072   std::string myFetchString(const DDsvalues_type& dvst, 
00073                                       const std::string& spName,
00074                                     const size_t& vecInd );
00075 
00076  private:
00077   OpticalAlignments oaList_;
00078   OpticalAlignMeasurements measList_;
00079   std::string theCocoaDaqRootFileName;
00080 };
00081 
00082 #endif

Generated on Tue Jun 9 17:23:26 2009 for CMSSW by  doxygen 1.5.4