CocoaToDDLMgr

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
//   COCOA class header file
//Id:  CocoaToDDLMgr.h
//CAT: Model
//
//   Class to manage the sets of fitted entries (one set per each measurement data set)
//
//   History: v1.0
//   Pedro Arce

#ifndef _CocoaToDDLMgr_HH
#define _CocoaToDDLMgr_HH

#include <map>
//#include <fstream>
#include "Alignment/CocoaUtilities/interface/ALIFileOut.h"

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"

#include "CLHEP/Vector/Rotation.h"

class CocoaMaterialElementary;
class CocoaSolidShape;
class OpticalObject;

class CocoaToDDLMgr {
public:
  //---------- Constructors / Destructor
  CocoaToDDLMgr() {}
  ~CocoaToDDLMgr() {}
  static CocoaToDDLMgr* getInstance();

  void writeDDDFile(ALIstring filename);
  void writeHeader(ALIstring filename);
  void writeMaterials();
  void writeSolids();
  void writeLogicalVolumes();
  void writePhysicalVolumes();
  void writeRotations();
  void writeSpecPars();
  void measurementsAsSpecPars();

  void newPartPre(std::string name);
  void newPartPost(std::string name, std::string extension);
  void newSectPre_ma(std::string name);
  void ma(CocoaMaterialElementary* ma);
  void newSectPost_ma(std::string name);
  void newSectPre_so(std::string name);
  void so(OpticalObject* opto);
  void newSectPost_so(std::string name);
  void newSectPre_lv(std::string name);
  void lv(OpticalObject* opto);
  void newSectPost_lv(std::string name);
  void newSectPre_pv(std::string name);
  void pv(OpticalObject* opto);
  void newSectPost_pv(std::string name);
  void newSectPre_ro(std::string name);
  void ro(const CLHEP::HepRotation& ro, int n);
  void newSectPost_ro(std::string name);
  void newSectPre_specPar(std::string name);
  void specPar(OpticalObject* opto);
  void writeSpecParsCocoa();
  void newSectPost_specPar(std::string name);
  void newSectPre(std::string name, std::string type);
  void newSectPost(std::string name);
  ALIbool materialIsRepeated(CocoaMaterialElementary* ma);
  ALIint buildRotationNumber(OpticalObject* opto);

  std::string scrubString(const std::string& s);

private:
  static CocoaToDDLMgr* instance;

  ALIFileOut file_;
  std::string filename_;

  std::vector<CocoaMaterialElementary*> theMaterialList;
  std::vector<CLHEP::HepRotation> theRotationList;
};
#endif