Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:24

0001 #ifndef DD_DDTYPES_H
0002 #define DD_DDTYPES_H
0003 
0004 #include <string>
0005 #include <vector>
0006 #include <map>
0007 #include "DetectorDescription/Core/interface/DDReadMapType.h"
0008 #include <iosfwd>
0009 
0010 //! corresponds to a collection of named doubles
0011 /** in XML: a set of <Numeric name="n" value="1"/> */
0012 typedef ReadMapType<double> DDNumericArguments;
0013 
0014 //! corresponds to a collection of named strings
0015 /** in XML: a set of <String name="n" value="val"/> */
0016 typedef ReadMapType<std::string> DDStringArguments;
0017 
0018 //! corresponds to a collection of named std::vectors of doubles */
0019 /** in XML: a set of <Vector name="n"> 1,2,3,4 </Vector> */
0020 typedef ReadMapType<std::vector<double> > DDVectorArguments;
0021 
0022 //! corresponds to a collection of named std::maps of strings to double */
0023 /** in XML: a set of <Map name="n"> val:1, val_2:2 </Map> */
0024 typedef ReadMapType<std::map<std::string, double> > DDMapArguments;
0025 
0026 typedef ReadMapType<std::vector<std::string> > DDStringVectorArguments;
0027 
0028 std::ostream& operator<<(std::ostream& os, const DDNumericArguments& t);
0029 std::ostream& operator<<(std::ostream& os, const DDStringArguments& t);
0030 std::ostream& operator<<(std::ostream& os, const DDVectorArguments& t);
0031 std::ostream& operator<<(std::ostream& os, const DDMapArguments& t);
0032 std::ostream& operator<<(std::ostream& os, const DDStringVectorArguments& t);
0033 
0034 // Formats an angle in radians as a 0-padded string in degrees; e.g. "0001.293900" for 1.2939 degrees.
0035 std::string formatAsDegrees(double radianVal);
0036 
0037 // Formats an angle in radians as a 0-padded string in degrees expressed as integer between 0 and 360; e.g. "090" for -270.001 degrees.
0038 std::string formatAsDegreesInInteger(double radianVal);
0039 
0040 #endif  // DDTYPES