Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 8212718.
- Loading branch information
Showing
4 changed files
with
789 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<use name="clhep"/> | ||
<use name="root"/> | ||
<use name="DetectorDescription/Core"/> | ||
<use name="FWCore/Framework"/> | ||
<use name="FWCore/ParameterSet"/> | ||
<use name="Geometry/Records"/> | ||
<use name="CondFormats/OptAlignObjects"/> | ||
<use name="CondFormats/DataRecord"/> | ||
<use name="CondFormats/Alignment"/> | ||
<use name="CondFormats/AlignmentRecord"/> | ||
<use name="Alignment/CocoaModel"/> | ||
<use name="Alignment/CocoaFit"/> | ||
<use name="meschach"/> | ||
<use name="Alignment/CocoaDaq"/> | ||
<use name="CondCore/DBOutputService"/> | ||
<flags EDM_PLUGIN="1"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#ifndef CocoaAnalyser_HH | ||
#define CocoaAnalyser_HH | ||
//-*- C++ -*- | ||
// | ||
// Package: Alignment/CocoaApplication | ||
// Class: CocoaAnalyzer | ||
// | ||
/* | ||
Description: test access to the OpticalAlignMeasurements via OpticalAlignMeasurementsGeneratedSource | ||
This also should demonstrate access to a geometry via the XMLIdealGeometryESSource | ||
for use in THE COCOA analyzer. | ||
Implementation: | ||
Iterate over retrieved alignments. | ||
*/ | ||
// | ||
|
||
#include <stdexcept> | ||
#include <string> | ||
#include <iostream> | ||
#include <map> | ||
#include "FWCore/Framework/interface/one/EDAnalyzer.h" | ||
#include "DetectorDescription/Core/interface/DDPosData.h" | ||
|
||
class Event; | ||
class EventSetup; | ||
class Entry; | ||
//#include "FWCore/Framework/interface/EventSetup.h" | ||
|
||
#include "CondFormats/OptAlignObjects/interface/OpticalAlignments.h" | ||
#include "CondFormats/OptAlignObjects/interface/OpticalAlignInfo.h" | ||
#include "CondFormats/OptAlignObjects/interface/OpticalAlignMeasurements.h" | ||
|
||
class DDFilteredView; | ||
class DDCompactView; | ||
class DDSpecifics; | ||
class OpticalObject; | ||
|
||
|
||
class CocoaAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> | ||
{ | ||
public: | ||
|
||
explicit CocoaAnalyzer(edm::ParameterSet const& p); | ||
explicit CocoaAnalyzer(int i) { } | ||
virtual ~ CocoaAnalyzer() { } | ||
|
||
virtual void beginJob() override; | ||
virtual void analyze(const edm::Event& e, const edm::EventSetup& c) override; | ||
// see note on endJob() at the bottom of the file. | ||
// virtual void endJob() ; | ||
|
||
private: | ||
void ReadXMLFile( const edm::EventSetup& evts ); | ||
std::vector<OpticalAlignInfo> ReadCalibrationDB( const edm::EventSetup& evts ); | ||
|
||
void CorrectOptAlignments( std::vector<OpticalAlignInfo>& oaListCalib ); | ||
OpticalAlignInfo* FindOpticalAlignInfoXML( const OpticalAlignInfo& oaInfo ); | ||
bool CorrectOaParam( OpticalAlignParam* oaParamXML, const OpticalAlignParam& oaParamDB ); | ||
|
||
void RunCocoa(); | ||
|
||
OpticalAlignInfo GetOptAlignInfoFromOptO( OpticalObject* opto ); | ||
double myFetchDbl(const DDsvalues_type& dvst, | ||
const std::string& spName, | ||
const size_t& vecInd ); | ||
std::string myFetchString(const DDsvalues_type& dvst, | ||
const std::string& spName, | ||
const size_t& vecInd ); | ||
|
||
private: | ||
OpticalAlignments oaList_; | ||
OpticalAlignMeasurements measList_; | ||
std::string theCocoaDaqRootFileName; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.