Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef SurveyInputTextReader_h
0002 #define SurveyInputTextReader_h
0003 //
0004 // Class to read in survey data from text file
0005 //
0006 // The format of the file is assumed to be:
0007 //
0008 // DetId AlignableObjectId dx sigma_x dy sigma_y dz sigma_z angle_x sigma(angle_x) ...
0009 //   angle_y sigma(angle_y) angle_z sigma(angle_z)
0010 // Where all numbers are floats, except DetId which is an unsigned integer
0011 //
0012 // The result is a map of UniqueIds and corresponding SurveyInfo
0013 //
0014 
0015 #include "Alignment/CommonAlignment/interface/StructureType.h"
0016 #include "Alignment/CommonAlignment/interface/Utilities.h"
0017 
0018 class SurveyInputTextReader {
0019 public:
0020   typedef std::pair<align::ID, align::StructureType> UniqueId;
0021 
0022   typedef std::map<UniqueId, align::Scalars> MapType;
0023   typedef std::pair<UniqueId, align::Scalars> PairType;
0024 
0025   /// Read given text file
0026   void readFile(const std::string& textFileName);
0027 
0028   // Returns the Map
0029   const MapType& UniqueIdMap() const { return theMap; }
0030 
0031 private:
0032   MapType theMap;
0033 
0034   static const int NINPUTS = 27;  // Not including DetId
0035 };
0036 
0037 #endif