Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Alignment_SurveyAnalysis_SurveyInputBase_h
0002 #define Alignment_SurveyAnalysis_SurveyInputBase_h
0003 
0004 /** \class SurveyInputBase
0005  *
0006  *  Abstract base class to read survey raw measurements.
0007  *
0008  *  $Date: 2007/05/15 18:14:04 $
0009  *  $Revision: 1.2 $
0010  *  \author Chung Khim Lae
0011  */
0012 
0013 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0014 
0015 class Alignable;
0016 
0017 class SurveyInputBase : public edm::one::EDAnalyzer<> {
0018 public:
0019   ~SurveyInputBase() override;
0020 
0021   /// Read data from input.
0022   void beginJob() override { theFirstEvent = true; }
0023 
0024   /// Do nothing for each event.
0025   void analyze(const edm::Event&, const edm::EventSetup&) override = 0;
0026 
0027   /// Get alignable detector as read from input.
0028   inline static Alignable* detector();
0029 
0030   /// Add a component or sub-system to the detector.
0031   /// Class will own component (takes care of deleting the pointer).
0032   static void addComponent(Alignable*);
0033 
0034 protected:
0035   bool theFirstEvent;
0036 
0037 private:
0038   static Alignable* theDetector;  // only one detector
0039 };
0040 
0041 Alignable* SurveyInputBase::detector() { return theDetector; }
0042 
0043 #endif