CMS 3D CMS Logo

VisDetContent.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "VisReco/VisDetector/interface/VisDetContent.h"
00004 #include "VisReco/VisDetector/interface/VisDetIvTwig.h"
00005 #include "VisReco/VisDetector/interface/VisDetTextureTwig.h"
00006 #include "Iguana/Studio/interface/IgQtLock.h"
00007 #include "Iguana/Studio/interface/IgQtAppStatusBarService.h"
00008 #include "Iguana/Studio/interface/IgDocumentData.h"
00009 #include "Iguana/GLBrowsers/interface/Ig3DShapeManager.h"
00010 
00011 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00012 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00013 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00014 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00015 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00016 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00017 
00018 IG_DEFINE_STATE_ELEMENT (VisDetContent, "Data/Reco/Detector");
00019 
00020 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00021 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00022 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00023 
00025 VisDetContent::VisDetContent (IgState *state)
00026     : VisContent (state, s_key, MAIN_THREAD,
00027                   lat::CreateCallback (this, &VisDetContent::init))
00028 {
00029 }
00030 
00033 void
00034 VisDetContent::init (void)
00035 {
00036     IgQtLock ();
00037     IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (state ());
00038     ASSERT (sbar);
00039     sbar->setMessage ("Starting CMS detector construction...");
00040 
00041     Ig3DShapeManager *shapeManager = Ig3DShapeManager::get (state ());
00042     if (! shapeManager) shapeManager = new Ig3DShapeManager (state ());
00043     ASSERT (shapeManager);
00044 
00045     IgTwig *rootTwig = IgDocumentData::get (state ())->root ("", true);
00046     IgTwig *detTwig = 0;
00047 
00048     sbar->setMessage ("Starting CMS detector construction...");
00049     
00050     detTwig = rootTwig->lookup ("CMS Event and Detector");
00051     if (! detTwig) detTwig = new IgSimpleTwig (rootTwig, "CMS Event and Detector");
00052     new VisDetTextureTwig (state (), detTwig, "CMSskin");
00053     
00054     IgTwig *muonDet        = new IgSimpleTwig (detTwig, "Muon");
00055     IgTwig *muonBarrel     = new IgSimpleTwig (muonDet, "Barrel");
00056     IgTwig *muonBarrelDt   = new VisDetIvTwig (state (), muonBarrel, "Drift Tubes", "driftTubes-3d.gzip.iv", "driftTubes-rphi.gzip.iv", "driftTubes-rz.gzip.iv");
00057     sbar->setMessage ("Drift Tubes...");
00058     IgTwig *muonBarrelDtSl = new VisDetIvTwig (state (), muonBarrelDt, "Drift Tubes Superlayers", "none.iv", "driftTubes-superlayers-rphi.gzip.iv", "driftTubes-superlayers-rz.gzip.iv");
00059     sbar->setMessage ("Drift Tubes Superlayers...");
00060     new VisDetIvTwig (state (), muonBarrelDtSl, "Drift Tubes Superlayers (details)", "none.iv", "driftTubes-superlayer-details-rphi.gzip.iv", "none.iv");
00061     sbar->setMessage ("Drift Tubes Superlayers (details)...");
00062     new VisDetIvTwig (state (), muonBarrel, "RPCs", "rpc-barrel-3d.gzip.iv", "rpc-barrel-rphi.gzip.iv", "rpc-barrel-rz.gzip.iv");
00063     sbar->setMessage ("RPCs in barrel...");
00064     new VisDetIvTwig (state (), muonBarrel, "Absorber", "absorber-barrel-3d.gzip.iv", "absorber-barrel-rphi.gzip.iv", "absorber-barrel-rz.gzip.iv");
00065     sbar->setMessage ("Absorber in barrel...");
00066 
00067     IgTwig *muonEndcap = new IgSimpleTwig (muonDet, "Endcap");
00068     sbar->setMessage ("Starting CMS detector endcap construction...");
00069     new VisDetIvTwig (state (), muonEndcap, "CSCs", "csc-3d.gzip.iv", "none.iv", "csc-rz.gzip.iv");
00070     sbar->setMessage ("CSCs...");
00071     new VisDetIvTwig (state (), muonEndcap, "RPCs", "rpc-endcap-3d.gzip.iv", "none.iv", "rpc-endcap-rz.gzip.iv");
00072     sbar->setMessage ("RPCs in the endcaps...");
00073     new VisDetIvTwig (state (), muonEndcap, "Absorber", "absorber-endcap-3d.gzip.iv", "none.iv", "absorber-endcap-rz.gzip.iv");
00074     sbar->setMessage ("Absorber in the endcaps...");
00075     
00076     IgTwig *ecalDet = new IgSimpleTwig (detTwig, "ECAL");
00077     sbar->setMessage ("ECAL barrel...");
00078     new VisDetIvTwig (state (), ecalDet, "Barrel", "ecal-barrel-3d.gzip.iv", "ecal-barrel-rphi.gzip.iv", "ecal-rz.gzip.iv");
00079     sbar->setMessage ("ECAL forward...");
00080     new VisDetIvTwig (state (), ecalDet, "Forward", "ecal-forward-3d.gzip.iv", "none.iv", "none.iv");
00081     sbar->setMessage ("Preshower...");
00082     new VisDetIvTwig (state (), ecalDet, "Preshower", "ecal-preshower-3d.gzip.iv", "none.iv", "none.iv");
00083     sbar->setMessage ("HCAL...");
00084     
00085     IgTwig *hcalDet = new IgSimpleTwig (detTwig, "HCAL");
00086     sbar->setMessage ("HCAL barrel...");
00087     IgTwig *hcalBarrelDet = new VisDetIvTwig (state (), hcalDet, "Barrel", "hcal-barrel-3d.gzip.iv", "hcal-barrel-rphi.gzip.iv", "hcal-barrel-rz.gzip.iv");
00088     sbar->setMessage ("HCAL barrel layers...");
00089     new VisDetIvTwig (state (), hcalBarrelDet, "Barrel Layers", "none.iv", "hcal-barrel-layers-rphi.gzip.iv", "hcal-barrel-layers-rz.gzip.iv");
00090     sbar->setMessage ("HCAL barrel towers...");
00091     new VisDetIvTwig (state (), hcalBarrelDet, "Towers", "none.iv", "hcal-barrel-towers-rphi.gzip.iv", "none.iv");
00092 
00093     sbar->setMessage ("HCAL endcap...");
00094     new VisDetIvTwig (state (), hcalDet, "Endcap", "hcal-endcap-3d.gzip.iv", "none.iv", "hcal-endcap-rz.gzip.iv");
00095     sbar->setMessage ("HCAL forward...");
00096     new VisDetIvTwig (state (), hcalDet, "Forward", "hcal-forward-3d.gzip.iv", "none.iv", "hcal-forward-rz.gzip.iv");
00097     sbar->setMessage ("HCAL outer...");
00098     new VisDetIvTwig (state (), hcalDet, "Outer", "hcal-outer-3d.gzip.iv", "none.iv", "none.iv");
00099     sbar->setMessage ("Tracker...");
00100 
00101     IgTwig *trackerDet = new IgSimpleTwig (detTwig, "Tracker");
00102     new VisDetIvTwig (state (), trackerDet, "Tracker", "none.iv", "tracker-barrel-rphi.gzip.iv", "tracker-rz.gzip.iv");
00103     sbar->setMessage ("Beampipe...");
00104 
00105     new VisDetIvTwig (state (), detTwig, "Beampipe", "beampipe.gzip.iv", "none.iv", "beampipe-rz.gzip.iv");
00106     sbar->setMessage ("Magnet...");
00107     new VisDetIvTwig (state (), detTwig, "Magnet", "magnet-3d.gzip.iv", "magnet-rphi.gzip.iv", "magnet-rz.gzip.iv");
00108 
00109     sbar->setMessage ("CMS detector is loaded.");
00110 }

Generated on Tue Jun 9 17:50:14 2009 for CMSSW by  doxygen 1.5.4