CMS 3D CMS Logo

CocoaAnalyzer.h
Go to the documentation of this file.
1 #ifndef CocoaAnalyser_HH
2 #define CocoaAnalyser_HH
3 //-*- C++ -*-
4 //
5 // Package: Alignment/CocoaApplication
6 // Class: CocoaAnalyzer
7 //
8 /*
9 
10  Description: test access to the OpticalAlignMeasurements via OpticalAlignMeasurementsGeneratedSource
11  This also should demonstrate access to a geometry via the XMLIdealGeometryESSource
12  for use in THE COCOA analyzer.
13 
14  Implementation:
15  Iterate over retrieved alignments.
16 */
17 //
18 
19 #include <stdexcept>
20 #include <string>
21 #include <iostream>
22 #include <map>
25 
26 class Event;
27 class EventSetup;
28 class Entry;
29 //#include "FWCore/Framework/interface/EventSetup.h"
30 
34 
35 class DDFilteredView;
36 class DDCompactView;
37 class DDSpecifics;
38 class OpticalObject;
39 
40 
41 class CocoaAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources>
42 {
43  public:
44 
45  explicit CocoaAnalyzer(edm::ParameterSet const& p);
46  explicit CocoaAnalyzer(int i) { }
47  virtual ~ CocoaAnalyzer() { }
48 
49  virtual void beginJob() override;
50  virtual void analyze(const edm::Event& e, const edm::EventSetup& c) override;
51  // see note on endJob() at the bottom of the file.
52  // virtual void endJob() ;
53 
54  private:
55  void ReadXMLFile( const edm::EventSetup& evts );
56  std::vector<OpticalAlignInfo> ReadCalibrationDB( const edm::EventSetup& evts );
57 
58  void CorrectOptAlignments( std::vector<OpticalAlignInfo>& oaListCalib );
60  bool CorrectOaParam( OpticalAlignParam* oaParamXML, const OpticalAlignParam& oaParamDB );
61 
62  void RunCocoa();
63 
65  double myFetchDbl(const DDsvalues_type& dvst,
66  const std::string& spName,
67  const size_t& vecInd );
69  const std::string& spName,
70  const size_t& vecInd );
71 
72  private:
76 };
77 
78 #endif
std::string myFetchString(const DDsvalues_type &dvst, const std::string &spName, const size_t &vecInd)
std::string theCocoaDaqRootFileName
Definition: CocoaAnalyzer.h:75
CocoaAnalyzer(edm::ParameterSet const &p)
virtual void beginJob() override
CocoaAnalyzer(int i)
Definition: CocoaAnalyzer.h:46
OpticalAlignInfo GetOptAlignInfoFromOptO(OpticalObject *opto)
Definition: Entry.h:18
void ReadXMLFile(const edm::EventSetup &evts)
void CorrectOptAlignments(std::vector< OpticalAlignInfo > &oaListCalib)
type of data representation of DDCompactView
Definition: DDCompactView.h:90
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:20
virtual void analyze(const edm::Event &e, const edm::EventSetup &c) override
double myFetchDbl(const DDsvalues_type &dvst, const std::string &spName, const size_t &vecInd)
OpticalAlignMeasurements measList_
Definition: CocoaAnalyzer.h:74
virtual ~CocoaAnalyzer()
Definition: CocoaAnalyzer.h:47
OpticalAlignInfo * FindOpticalAlignInfoXML(const OpticalAlignInfo &oaInfo)
std::vector< OpticalAlignInfo > ReadCalibrationDB(const edm::EventSetup &evts)
OpticalAlignments oaList_
Definition: CocoaAnalyzer.h:73
Interface to attach user specific data to nodes in the expanded-view.
Definition: DDSpecifics.h:42
bool CorrectOaParam(OpticalAlignParam *oaParamXML, const OpticalAlignParam &oaParamDB)