Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:23

0001 #ifndef Alignment_SurveyAnalysis_SurveyDBUploader_h
0002 #define Alignment_SurveyAnalysis_SurveyDBUploader_h
0003 
0004 /** \class SurveyDBUploader
0005  *
0006  * Module for uploading survey info to the DB.
0007  *
0008  * Usage:
0009  *   module uploader = SurveyDBUploader
0010  *   {
0011  *     string valueTag = "TrackerSurveyRcd"
0012  *     string errorTag = "TrackerSurveyErrorExtendedRcd"
0013  *   }
0014  *
0015  *  $Date: 2007/04/09 01:16:13 $
0016  *  $Revision: 1.2 $
0017  *  \author Chung Khim Lae
0018  */
0019 
0020 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0021 
0022 class Alignable;
0023 class Alignments;
0024 class AlignTransform;
0025 struct SurveyErrors;
0026 
0027 class SurveyDBUploader : public edm::one::EDAnalyzer<> {
0028   typedef AlignTransform SurveyValue;
0029   typedef Alignments SurveyValues;
0030 
0031 public:
0032   /// Set value & error tag names for survey records.
0033   SurveyDBUploader(const edm::ParameterSet&);
0034 
0035   void analyze(const edm::Event&, const edm::EventSetup&) override {}
0036 
0037   /// Upload to DB
0038   void endJob() override;
0039 
0040 private:
0041   /// Get survey info of an alignable in the detector.
0042   void getSurveyInfo(const Alignable*);
0043 
0044   std::string theValueRcd;          // tag name of survey values record in DB
0045   std::string theErrorExtendedRcd;  // tag name of survey errors record in DB
0046 
0047   SurveyValues* theValues;  // survey values for all alignables in detector
0048   SurveyErrors* theErrors;  // survey errors for all alignables in detector
0049 };
0050 
0051 #endif