CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/Alignment/CocoaToDDL/interface/CocoaToDDLMgr.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  CocoaToDDLMgr.h
00003 //CAT: Model
00004 //
00005 //   Class to manage the sets of fitted entries (one set per each measurement data set)
00006 // 
00007 //   History: v1.0 
00008 //   Pedro Arce
00009 
00010 #ifndef _CocoaToDDLMgr_HH
00011 #define _CocoaToDDLMgr_HH
00012 
00013 #include <map>
00014 //#include <fstream>
00015 #include "Alignment/CocoaUtilities/interface/ALIFileOut.h"
00016 
00017 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
00018 
00019 #include "CLHEP/Vector/Rotation.h"
00020 
00021 class CocoaMaterialElementary;
00022 class CocoaSolidShape;
00023 class OpticalObject;
00024 
00025 
00026 class CocoaToDDLMgr
00027 {
00028 
00029 public:
00030   //---------- Constructors / Destructor
00031   CocoaToDDLMgr(){ };
00032   ~CocoaToDDLMgr(){ };
00033   static CocoaToDDLMgr* getInstance();  
00034 
00035   void writeDDDFile( ALIstring filename );
00036   void writeHeader( ALIstring filename );
00037   void writeMaterials();
00038   void writeSolids();
00039   void writeLogicalVolumes();
00040   void writePhysicalVolumes();
00041   void writeRotations();
00042   void writeSpecPars();
00043   void measurementsAsSpecPars();
00044 
00045   void newPartPre(std::string name);
00046   void newPartPost(std::string name, std::string extension);
00047   void newSectPre_ma(std::string name);
00048   void ma(CocoaMaterialElementary* ma);
00049   void newSectPost_ma(std::string name);
00050   void newSectPre_so(std::string name);
00051   void so(OpticalObject * opto);
00052   void newSectPost_so(std::string name);
00053   void newSectPre_lv(std::string name);
00054   void lv(OpticalObject * opto);
00055   void newSectPost_lv(std::string name);
00056   void newSectPre_pv(std::string name);
00057   void pv(OpticalObject * opto);
00058   void newSectPost_pv(std::string name);
00059   void newSectPre_ro(std::string name);
00060   void ro(const CLHEP::HepRotation& ro, int n);
00061   void newSectPost_ro(std::string name);
00062   void newSectPre_specPar(std::string name);
00063   void specPar(OpticalObject * opto);
00064   void writeSpecParsCocoa();
00065   void newSectPost_specPar(std::string name);
00066   void newSectPre(std::string name, std::string type);
00067   void newSectPost(std::string name);
00068   ALIbool materialIsRepeated( CocoaMaterialElementary* ma );
00069   ALIint buildRotationNumber( OpticalObject* opto );
00070 
00071   std::string scrubString(const std::string& s);
00072 
00073 private:
00074   static CocoaToDDLMgr* instance;
00075 
00076   ALIFileOut file_;
00077   std::string filename_;
00078 
00079   std::vector<CocoaMaterialElementary*> theMaterialList;
00080   std::vector<CLHEP::HepRotation> theRotationList;
00081 
00082 };
00083 #endif
00084