CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Alignment/SurveyAnalysis/interface/SurveyInputTextReader.h

Go to the documentation of this file.
00001 #ifndef SurveyInputTextReader_h
00002 #define SurveyInputTextReader_h
00003 //
00004 // Class to read in survey data from text file
00005 //
00006 // The format of the file is assumed to be:
00007 //
00008 // DetId AlignableObjectId dx sigma_x dy sigma_y dz sigma_z angle_x sigma(angle_x) ...
00009 //   angle_y sigma(angle_y) angle_z sigma(angle_z)
00010 // Where all numbers are floats, except DetId which is an unsigned integer
00011 //
00012 // The result is a map of UniqueIds and corresponding SurveyInfo
00013 //
00014 
00015 #include "Alignment/CommonAlignment/interface/StructureType.h"
00016 #include "Alignment/CommonAlignment/interface/Utilities.h"
00017 
00018 class SurveyInputTextReader
00019 {
00020 public:
00021 
00022   typedef std::pair<align::ID, align::StructureType> UniqueId;
00023 
00024   typedef std::map<UniqueId, align::Scalars> MapType;
00025   typedef std::pair<UniqueId, align::Scalars> PairType;
00026 
00028   void readFile( const std::string& textFileName );
00029 
00030   // Returns the Map
00031   const MapType& UniqueIdMap() const { return theMap; }
00032 
00033 private:
00034         
00035   MapType theMap;
00036 
00037   static const int NINPUTS = 27; // Not including DetId
00038         
00039 };
00040 
00041 #endif