Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

REROOT_Geom.cxx

Go to the documentation of this file.
00001 
00002 //
00003 // $Id: REROOT_Geom.cxx,v 1.15 2002/12/13 17:33:59 rhatcher Exp $
00004 //
00005 //
00006 // REROOT_Geom
00007 //
00008 //Begin_Html<img src="../../pedestrians.gif" align=center>  <a href="../source_warning.html">Warning for beginners</a>.<br>
00009 //Also see <a href="../../root_crib/index.html">The ROOT Crib</a> and <a href="../index.html">The MINOS Class User Guide</a>End_Html
00010 //
00011 //This single object corresponds to the ADAMO geometry data flow. It collects
00012 //all the geometry ADAMO class objects into a single object for I/O and has a
00013 //set of member functions to provide access to these objects.
00014 //
00015 //Its I/O is via a ROOT TTree object and this allows plotting of all its
00016 //ADAMO objects using the TTree:Draw command.
00017 //
00018 //For more details see the Begin_Html<a href = "../index.html#REROOT_Event">The REROOT_Event and REROOT_Geom Classes</a> section<br> 
00019 //of the <a href = "../index.html#REROOT">Overview: REROOT - OO Equivalent of the ADAMO Entity Sets</a>End_Html
00020 //
00021 //
00022 //Access to Objects
00023 //-----------------
00024 //
00025 //The current REROOT_Geom object can be retrieved from the global MINFAST
00026 //object pointer gMINFast by:-
00027 //
00028 //     REROOT_Geom *rgeo= gMINFast->GetREROOTEvent();
00029 //
00030 //Once a pointer to the REROOT_Geom object has been obtained, its ADAMO
00031 //objects can accessed, e.g.:-
00032 //
00033 //    TClonesArray *planespecs = rgeo->planspecs();
00034 //
00035 //
00036 //Member Functions
00037 //----------------
00038 //
00039 //For a list of member functions look up to the top of the current page
00040 //
00041 //
00043 #include <iostream>
00044 using std::cout;
00045 using std::endl;
00046 #include <iomanip>
00047 using std::setw;
00048 
00049 #include "REROOT_Classes/REROOT_Geom.h"
00050 
00051 //rwh: allocate a location for global pointer
00052 REROOT_Geom *gREROOT_Geom = 0;
00053 
00054 ClassImp(REROOT_Geom)
00055 
00056 // Define Static Variables
00057   Bool_t REROOT_Geom::AvailNuclei_isWanted;
00058   Bool_t REROOT_Geom::BeamSystem_isWanted;
00059   Bool_t REROOT_Geom::CellPos_isWanted;
00060   Bool_t REROOT_Geom::CoilTube_isWanted;       
00061   Bool_t REROOT_Geom::FLSParam_isWanted;
00062   Bool_t REROOT_Geom::GAFKey_isWanted;
00063   Bool_t REROOT_Geom::GeomMisc_isWanted;
00064   Bool_t REROOT_Geom::MassDistrib_isWanted;
00065   Bool_t REROOT_Geom::Material_isWanted;
00066   Bool_t REROOT_Geom::MdlOrg_isWanted;
00067   Bool_t REROOT_Geom::Mixture_isWanted;
00068   Bool_t REROOT_Geom::PlanePos_isWanted;
00069   Bool_t REROOT_Geom::PlaneSpec_isWanted;
00070   Bool_t REROOT_Geom::PlexusAdd_isWanted;
00071   Bool_t REROOT_Geom::Pln2MUX_isWanted;
00072   Bool_t REROOT_Geom::Rotm_isWanted;
00073   Bool_t REROOT_Geom::SubVolPos_isWanted;
00074   Bool_t REROOT_Geom::SubVolSpec_isWanted;
00075   Bool_t REROOT_Geom::SuperModule_isWanted;
00076   Bool_t REROOT_Geom::TMedium_isWanted;
00077   Bool_t REROOT_Geom::TPar_isWanted;
00078   Bool_t REROOT_Geom::TubePixelInfo_isWanted;
00079   Bool_t REROOT_Geom::TubePixelMap_isWanted;
00080 
00081   REROOT_Geom *REROOT_Geom::s_curgeom;
00082 
00083   TClonesArray *REROOT_Geom::s_availnucleis;
00084   TClonesArray *REROOT_Geom::s_beamsystems;
00085   TClonesArray *REROOT_Geom::s_cellposs;
00086   TClonesArray *REROOT_Geom::s_coiltubes;       
00087   TClonesArray *REROOT_Geom::s_flsparams;
00088   TClonesArray *REROOT_Geom::s_gafkeys;
00089   TClonesArray *REROOT_Geom::s_geommiscs;
00090   TClonesArray *REROOT_Geom::s_massdistribs;
00091   TClonesArray *REROOT_Geom::s_materials;
00092   TClonesArray *REROOT_Geom::s_mdlorgs;
00093   TClonesArray *REROOT_Geom::s_mixtures;
00094   TClonesArray *REROOT_Geom::s_planeposs;
00095   TClonesArray *REROOT_Geom::s_planespecs;
00096   TClonesArray *REROOT_Geom::s_plexusadds;
00097   TClonesArray *REROOT_Geom::s_pln2muxs;
00098   TClonesArray *REROOT_Geom::s_rotms;
00099   TClonesArray *REROOT_Geom::s_subvolposs;
00100   TClonesArray *REROOT_Geom::s_subvolspecs;
00101   TClonesArray *REROOT_Geom::s_supermodules;
00102   TClonesArray *REROOT_Geom::s_tmediums;
00103   TClonesArray *REROOT_Geom::s_tpars;
00104   TClonesArray *REROOT_Geom::s_tubepixelinfos;
00105   TClonesArray *REROOT_Geom::s_tubepixelmaps;
00106 
00107   Int_t   REROOT_Geom::fNumberOfGeomRead = 0;  // initialize it once
00108   Float_t REROOT_Geom::fGlobalZ0Shift    = 0.0;
00109 
00110 REROOT_Geom::REROOT_Geom()
00111 {
00112         s_curgeom = this;
00113 
00114         if (!s_availnucleis)
00115            s_availnucleis = new TClonesArray("REROOT_AvailNuclei",5);
00116         m_availnucleis = s_availnucleis;
00117         if (!s_beamsystems)
00118            s_beamsystems = new TClonesArray("REROOT_BeamSystem",1);
00119         m_beamsystems = s_beamsystems;
00120         if (!s_cellposs)
00121            s_cellposs = new TClonesArray("REROOT_CellPos",1000);
00122         m_cellposs = s_cellposs;
00123         if (!s_coiltubes)
00124            s_coiltubes = new TClonesArray("REROOT_CoilTube",100);
00125         m_coiltubes = s_coiltubes;
00126         if (!s_flsparams)
00127            s_flsparams = new TClonesArray("REROOT_FLSParam",45);
00128         m_flsparams = s_flsparams;
00129         if (!s_gafkeys)
00130            s_gafkeys = new TClonesArray("REROOT_GAFKey",1);
00131         m_gafkeys = s_gafkeys;
00132         if (!s_geommiscs)
00133            s_geommiscs = new TClonesArray("REROOT_GeomMisc",1);
00134         m_geommiscs = s_geommiscs;
00135         if (!s_massdistribs)
00136            s_massdistribs = new TClonesArray("REROOT_MassDistrib",5);
00137         m_massdistribs = s_massdistribs;
00138         if (!s_materials)
00139            s_materials = new TClonesArray("REROOT_Material",100);
00140         m_materials = s_materials;
00141         if (!s_mdlorgs)
00142            s_mdlorgs = new TClonesArray("REROOT_MdlOrg",50);
00143         m_mdlorgs = s_mdlorgs;
00144         if (!s_mixtures)
00145            s_mixtures = new TClonesArray("REROOT_Mixture",100);
00146         m_mixtures = s_mixtures;
00147         if (!s_planeposs)
00148            s_planeposs = new TClonesArray("REROOT_PlanePos",1000);
00149         m_planeposs = s_planeposs;
00150         if (!s_planespecs)
00151            s_planespecs = new TClonesArray("REROOT_PlaneSpec",10);
00152         m_planespecs = s_planespecs;
00153         if (!s_plexusadds)
00154            s_plexusadds = new TClonesArray("REROOT_PlexusAdd",5);
00155         m_plexusadds = s_plexusadds;
00156         if (!s_pln2muxs)
00157            s_pln2muxs = new TClonesArray("REROOT_Pln2MUX",5);
00158         m_pln2muxs = s_pln2muxs;
00159         if (!s_rotms)
00160            s_rotms = new TClonesArray("REROOT_Rotm",20);
00161         m_rotms = s_rotms;
00162         if (!s_subvolposs)
00163            s_subvolposs = new TClonesArray("REROOT_SubVolPos",5);
00164         m_subvolposs = s_subvolposs;
00165         if (!s_subvolspecs)
00166            s_subvolspecs = new TClonesArray("REROOT_SubVolSpec",5);
00167         m_subvolspecs = s_subvolspecs;
00168         if (!s_supermodules)
00169            s_supermodules = new TClonesArray("REROOT_SuperModule",10);
00170         m_supermodules = s_supermodules;
00171         if (!s_tmediums)
00172            s_tmediums = new TClonesArray("REROOT_TMedium",50);
00173         m_tmediums = s_tmediums;
00174         if (!s_tpars)
00175            s_tpars = new TClonesArray("REROOT_TPar",1);
00176         m_tpars = s_tpars;
00177         if (!s_tubepixelinfos)
00178            s_tubepixelinfos=new TClonesArray("REROOT_TubePixelInfo",5);
00179         m_tubepixelinfos = s_tubepixelinfos;
00180         if (!s_tubepixelmaps)
00181            s_tubepixelmaps = new TClonesArray("REROOT_TubePixelMap",5);
00182         m_tubepixelmaps = s_tubepixelmaps;
00183 
00184         fGlobalZ0Shift = 0.0;
00185 }
00186 
00187 REROOT_Geom::~REROOT_Geom()
00188 {
00189    Clear();
00190 }
00191 
00192 void sizes_of_geom_clones(Int_t i, const Char_t* name, const TClonesArray* tca)
00193 {
00194    if (i == 0) 
00195       cout << "new REROOT_Geom record" << endl;
00196    cout << setw(15) << name << " "
00197         << setw(5) << tca->Capacity()
00198         << setw(5) << tca->GetEntries()
00199         << setw(5) << tca->GetEntriesFast()
00200         << setw(5) << tca->GetLast();
00201    if (i >= 0) cout << endl;
00202 }
00203 void REROOT_Geom::Print(Option_t * /* option */) const
00204 {
00205    sizes_of_geom_clones(0,"AvailNuclei",m_availnucleis);
00206    sizes_of_geom_clones(1,"BeamSystem",m_beamsystems);
00207    sizes_of_geom_clones(2,"CellPos",m_cellposs);
00208    sizes_of_geom_clones(3,"CoilTube",m_coiltubes);
00209    sizes_of_geom_clones(4,"FLSParam",m_flsparams);
00210    sizes_of_geom_clones(5,"GAFKey",m_gafkeys);
00211    sizes_of_geom_clones(6,"GeomMisc",m_geommiscs);
00212    sizes_of_geom_clones(7,"MassDistrib",m_massdistribs);
00213    sizes_of_geom_clones(8,"Material",m_materials);
00214    sizes_of_geom_clones(9,"MdlOrg",m_mdlorgs);
00215    sizes_of_geom_clones(10,"Mixture",m_mixtures);
00216    sizes_of_geom_clones(11,"PlanePos",m_planeposs);
00217    sizes_of_geom_clones(12,"PlaneSpec",m_planespecs);
00218    sizes_of_geom_clones(13,"PlexusAdd",m_plexusadds);
00219    sizes_of_geom_clones(14,"Pln2Mux",m_pln2muxs);
00220    sizes_of_geom_clones(15,"Rotm",m_rotms);
00221    sizes_of_geom_clones(16,"SubVolPos",m_subvolposs);
00222    sizes_of_geom_clones(17,"SubVolSpec",m_subvolspecs);
00223    sizes_of_geom_clones(18,"SuperModule",m_supermodules);
00224    sizes_of_geom_clones(19,"TMedium",m_tmediums);
00225    sizes_of_geom_clones(20,"TPar",m_tpars);
00226    sizes_of_geom_clones(21,"TubePixelInfo",m_tubepixelinfos);
00227    sizes_of_geom_clones(22,"TubePixelMap",m_tubepixelmaps);
00228 }
00229 
00230 void REROOT_Geom::init()
00231 {
00232 }
00233 
00234 void REROOT_Geom::Clear(Option_t * /* option */)
00235 {
00236   if (m_availnucleis)  m_availnucleis->Clear();
00237   if (m_beamsystems)   m_beamsystems->Clear();
00238   if (m_cellposs)      m_cellposs->Clear();
00239   if (m_coiltubes)     m_coiltubes->Clear();
00240   if (m_flsparams)     m_flsparams->Clear();
00241   if (m_gafkeys)       m_gafkeys->Clear();
00242   if (m_geommiscs)     m_geommiscs->Clear();
00243   if (m_massdistribs)  m_massdistribs->Clear();
00244   if (m_materials)     m_materials->Clear();
00245   if (m_mdlorgs)       m_mdlorgs->Clear();
00246   if (m_mixtures)      m_mixtures->Clear();
00247   if (m_planeposs)     m_planeposs->Clear();
00248   if (m_planespecs)    m_planespecs->Clear();
00249   if (m_plexusadds)    m_plexusadds->Clear();
00250   if (m_pln2muxs)      m_pln2muxs->Clear();
00251   if (m_rotms)         m_rotms->Clear();
00252   if (m_subvolposs)    m_subvolposs->Clear();
00253   if (m_subvolspecs)   m_subvolspecs->Clear();
00254   if (m_supermodules)  m_supermodules->Clear();
00255   if (m_tmediums)      m_tmediums->Clear();
00256   if (m_tpars)         m_tpars->Clear();
00257   if (m_tubepixelinfos) m_tubepixelinfos->Clear();
00258   if (m_tubepixelmaps)  m_tubepixelmaps->Clear();
00259 }
00260 
00261 void REROOT_Geom::fill_objects_from_GAF(ADAMO_Shell* ads)
00262 {
00263   if (AvailNuclei_isWanted) {
00264 //gmi   if (m_availnucleis) m_availnucleis->Clear();
00265         int n_availnucleis = ads->coutab((AVAILNUCLEI_DEF *) 0);
00266         AVAILNUCLEI_DEF* nr;
00267         for (int i=0; i<n_availnucleis; i++) {
00268           nr=ads->gettab((AVAILNUCLEI_DEF *) 0,i+1);
00269           if (nr) new((*m_availnucleis)[i]) REROOT_AvailNuclei(nr);
00270   }     }
00271   if (BeamSystem_isWanted) {
00272 //gmi   if (m_beamsystems)  m_beamsystems->Clear();
00273         int n_beamsystems  = ads->coutab((BEAMSYSTEM_DEF *) 0);
00274         BEAMSYSTEM_DEF* nr;
00275         for (int i=0; i<n_beamsystems; i++) {
00276           nr = ads->gettab((BEAMSYSTEM_DEF *) 0,i+1);
00277           if (nr) new((*m_beamsystems)[i]) REROOT_BeamSystem(nr);
00278   }     }
00279   if (CellPos_isWanted) {
00280 //gmi   if (m_cellposs)     m_cellposs->Clear();
00281         int n_cellposs     = ads->coutab((CELLPOS_DEF *) 0);
00282         CELLPOS_DEF* nr;
00283         for (int i=0; i<n_cellposs; i++) {
00284           nr = ads->gettab((CELLPOS_DEF *) 0,i+1);
00285           if (nr) new((*m_cellposs)[i]) REROOT_CellPos(nr);
00286   }     }
00287   if (CoilTube_isWanted) {
00288 //gmi   if (m_coiltubes) m_coiltubes->Clear();
00289         int n_coiltubes = ads->coutab((COILTUBE_DEF *) 0);
00290         COILTUBE_DEF* nr;
00291         for (int i=0; i<n_coiltubes; i++) {
00292           nr=ads->gettab((COILTUBE_DEF *) 0,i+1);
00293           if (nr) new((*m_coiltubes)[i]) REROOT_CoilTube(nr);
00294   }     }
00295   if (FLSParam_isWanted) {
00296 //gmi   if (m_flsparams) m_flsparams->Clear();
00297         int n_flsparams = ads->coutab((FLSPARAM_DEF *) 0);
00298         FLSPARAM_DEF* nr;
00299         for (int i=0; i<n_flsparams; i++) {
00300           nr=ads->gettab((FLSPARAM_DEF *) 0,i+1);
00301           if (nr) new((*m_flsparams)[i]) REROOT_FLSParam(nr);
00302   }     }
00303   if (GAFKey_isWanted) {
00304 //gmi   if (m_gafkeys)      m_gafkeys->Clear();
00305         int n_gafkeys      = ads->coutab((GAFKEY_DEF *) 0);
00306         GAFKEY_DEF* nr;
00307         for (int i=0; i<n_gafkeys; i++) {
00308           nr = ads->gettab((GAFKEY_DEF *) 0,i+1);
00309           if (nr) new((*m_gafkeys)[i]) REROOT_GAFKey(nr);
00310   }     }
00311   if (GeomMisc_isWanted) {
00312 //gmi   if (m_geommiscs)    m_geommiscs->Clear();
00313         int n_geommiscs    = ads->coutab((GEOMMISC_DEF *) 0);
00314         GEOMMISC_DEF* nr;
00315         for (int i=0; i<n_geommiscs; i++) {
00316           nr = ads->gettab((GEOMMISC_DEF *) 0,i+1);
00317           if (nr) new((*m_geommiscs)[i]) REROOT_GeomMisc(nr);
00318   }     }
00319   if (MassDistrib_isWanted) {
00320 //gmi   if (m_massdistribs) m_massdistribs->Clear();
00321         int n_massdistribs = ads->coutab((MASSDISTRIB_DEF *) 0);
00322         MASSDISTRIB_DEF* nr;
00323         for (int i=0; i<n_massdistribs; i++) {
00324           nr=ads->gettab((MASSDISTRIB_DEF *) 0,i+1);
00325           if (nr) new((*m_massdistribs)[i]) REROOT_MassDistrib(nr);
00326   }     }
00327   if (Material_isWanted) {
00328 //gmi   if (m_materials)    m_materials->Clear();
00329         int n_materials    = ads->coutab((MATERIAL_DEF *) 0);
00330         MATERIAL_DEF* nr;
00331         for (int i=0; i<n_materials; i++) {
00332           nr = ads->gettab((MATERIAL_DEF *) 0,i+1);
00333           if (nr) new((*m_materials)[i]) REROOT_Material(nr);
00334   }     }
00335   if (MdlOrg_isWanted) {
00336 //gmi   if (m_mdlorgs)      m_mdlorgs->Clear();
00337         int n_mdlorgs      = ads->coutab((MDLORG_DEF *) 0);
00338         MDLORG_DEF* nr;
00339         for (int i=0; i<n_mdlorgs; i++) {
00340           nr = ads->gettab((MDLORG_DEF *) 0,i+1);
00341           if (nr) new((*m_mdlorgs)[i]) REROOT_MdlOrg(nr);
00342   }     }
00343   if (Mixture_isWanted) {
00344 //gmi   if (m_mixtures)     m_mixtures->Clear();
00345         int n_mixtures     = ads->coutab((MIXTURE_DEF *) 0);
00346         MIXTURE_DEF* nr;
00347         for (int i=0; i<n_mixtures; i++) {
00348           nr = ads->gettab((MIXTURE_DEF *) 0,i+1);
00349           if (nr) new((*m_mixtures)[i]) REROOT_Mixture(nr);
00350   }     }
00351   if (PlanePos_isWanted) {
00352 //gmi   if (m_planeposs)    m_planeposs->Clear();
00353         int n_planeposs    = ads->coutab((PLANEPOS_DEF *) 0);
00354         PLANEPOS_DEF* nr;
00355         for (int i=0; i<n_planeposs; i++) {
00356           nr = ads->gettab((PLANEPOS_DEF *) 0,i+1);
00357           if (nr) new((*m_planeposs)[i]) REROOT_PlanePos(nr);
00358   }
00359         }
00360   if (PlaneSpec_isWanted) {
00361 //gmi   if (m_planespecs)   m_planespecs->Clear();
00362         int n_planespecs   = ads->coutab((PLANESPEC_DEF *) 0);
00363         PLANESPEC_DEF* nr;
00364         for (int i=0; i<n_planespecs; i++) {
00365           nr = ads->gettab((PLANESPEC_DEF *) 0,i+1);
00366           if (nr) new((*m_planespecs)[i]) REROOT_PlaneSpec(nr);
00367   }     }
00368   if (PlexusAdd_isWanted) {
00369 //gmi   if (m_plexusadds) m_plexusadds->Clear();
00370         int n_plexusadds = ads->coutab((PLEXUSADD_DEF *) 0);
00371         PLEXUSADD_DEF* nr;
00372         for (int i=0; i<n_plexusadds; i++) {
00373           nr=ads->gettab((PLEXUSADD_DEF *) 0,i+1);
00374           if (nr) new((*m_plexusadds)[i]) REROOT_PlexusAdd(nr);
00375   }     }
00376   if (Pln2MUX_isWanted) {
00377 //gmi   if (m_pln2muxs) m_pln2muxs->Clear();
00378         int n_pln2muxs = ads->coutab((PLN2MUX_DEF *) 0);
00379         PLN2MUX_DEF* nr;
00380         for (int i=0; i<n_pln2muxs; i++) {
00381           nr=ads->gettab((PLN2MUX_DEF *) 0,i+1);
00382           if (nr) new((*m_pln2muxs)[i]) REROOT_Pln2MUX(nr);
00383   }     }
00384   if (Rotm_isWanted) {
00385 //gmi   if (m_rotms)        m_rotms->Clear();
00386         int n_rotms        = ads->coutab((ROTM_DEF *) 0);
00387         ROTM_DEF* nr;
00388         for (int i=0; i<n_rotms; i++) {
00389         nr = ads->gettab((ROTM_DEF *) 0,i+1);
00390           if (nr) new((*m_rotms)[i]) REROOT_Rotm(nr);
00391   }     }
00392   if (SubVolPos_isWanted) {
00393 //gmi   if (m_subvolposs)   m_subvolposs->Clear();
00394         int n_subvolposs   = ads->coutab((SUBVOLPOS_DEF *) 0);
00395         SUBVOLPOS_DEF* nr;
00396         for (int i=0; i<n_subvolposs; i++) {
00397         nr = ads->gettab((SUBVOLPOS_DEF *) 0,i+1);
00398           if (nr) new((*m_subvolposs)[i]) REROOT_SubVolPos(nr);
00399   }     }
00400   if (SubVolSpec_isWanted) {
00401 //gmi   if (m_subvolspecs)  m_subvolspecs->Clear();
00402         int n_subvolspecs  = ads->coutab((SUBVOLSPEC_DEF *) 0);
00403         SUBVOLSPEC_DEF* nr;
00404         for (int i=0; i<n_subvolspecs; i++) {
00405         nr = ads->gettab((SUBVOLSPEC_DEF *) 0,i+1);
00406           if (nr) new((*m_subvolspecs)[i]) REROOT_SubVolSpec(nr);
00407   }     }
00408   if (SuperModule_isWanted) {
00409 //gmi   if (m_supermodules) m_supermodules->Clear();
00410         int n_supermodules = ads->coutab((SUPERMODULE_DEF *) 0);
00411         SUPERMODULE_DEF* nr;
00412         for (int i=0; i<n_supermodules; i++) {
00413           nr=ads->gettab((SUPERMODULE_DEF *) 0,i+1);
00414           if (nr) new((*m_supermodules)[i]) REROOT_SuperModule(nr);
00415   }     }
00416   if (TMedium_isWanted) {
00417 //gmi   if (m_tmediums)     m_tmediums->Clear();
00418         int n_tmediums     = ads->coutab((TMEDIUM_DEF *) 0);
00419         TMEDIUM_DEF* nr;
00420         for (int i=0; i<n_tmediums; i++) {
00421           nr = ads->gettab((TMEDIUM_DEF *) 0,i+1);
00422           if (nr) new((*m_tmediums)[i]) REROOT_TMedium(nr);
00423   }     }
00424   if (TPar_isWanted) {
00425 //gmi   if (m_tpars)        m_tpars->Clear();
00426         int n_tpars        = ads->coutab((TPAR_DEF *) 0);
00427         TPAR_DEF* nr;
00428         for (int i=0; i<n_tpars; i++) {
00429           nr = ads->gettab((TPAR_DEF *) 0,i+1);
00430           if (nr) new((*m_tpars)[i]) REROOT_TPar(nr);
00431   }     }
00432   if (TubePixelInfo_isWanted) {
00433 //gmi   if (m_tubepixelinfos) m_tubepixelinfos->Clear();
00434         int n_tubepixelinfos = ads->coutab((TUBEPIXELINFO_DEF *) 0);
00435         TUBEPIXELINFO_DEF* nr;
00436         for (int i=0; i<n_tubepixelinfos; i++) {
00437           nr=ads->gettab((TUBEPIXELINFO_DEF *) 0,i+1);
00438           if (nr) new((*m_tubepixelinfos)[i]) REROOT_TubePixelInfo(nr);
00439   }     }
00440   if (TubePixelMap_isWanted) {
00441 //gmi   if (m_tubepixelmaps) m_tubepixelmaps->Clear();
00442         int n_tubepixelmaps = ads->coutab((TUBEPIXELMAP_DEF *) 0);
00443         TUBEPIXELMAP_DEF* nr;
00444         for (int i=0; i<n_tubepixelmaps; i++) {
00445           nr=ads->gettab((TUBEPIXELMAP_DEF *) 0,i+1);
00446           if (nr) new((*m_tubepixelmaps)[i]) REROOT_TubePixelMap(nr);
00447   }     }
00448 }
00449 
00450 REROOT_Geom::AvailNuclei_list_size_type 
00451                                      REROOT_Geom::n_availnucleis() const
00452 {
00453   if (!m_availnucleis) return 0;
00454   return m_availnucleis->GetLast() + 1;
00455 }
00456 REROOT_Geom::BeamSystem_list_size_type REROOT_Geom::n_beamsystems()const
00457 {
00458   if (!m_beamsystems) return 0;
00459   return m_beamsystems->GetLast() + 1;
00460 }
00461 REROOT_Geom::CellPos_list_size_type   REROOT_Geom::n_cellposs()    const
00462 {
00463   if (!m_cellposs) return 0;
00464   return m_cellposs->GetLast() + 1;
00465 }
00466 REROOT_Geom::CoilTube_list_size_type  REROOT_Geom::n_coiltubes()   const
00467 {
00468   if (!m_coiltubes) return 0;
00469   return m_coiltubes->GetLast() + 1;
00470 }
00471 REROOT_Geom::FLSParam_list_size_type  REROOT_Geom::n_flsparams()   const
00472 {
00473   if (!m_flsparams) return 0;
00474   return m_flsparams->GetLast() + 1;
00475 }
00476 REROOT_Geom::GAFKey_list_size_type    REROOT_Geom::n_gafkeys()     const
00477 {
00478   if (!m_gafkeys) return 0;
00479   return m_gafkeys->GetLast() + 1;
00480 }
00481 REROOT_Geom::GeomMisc_list_size_type  REROOT_Geom::n_geommiscs()   const
00482 {
00483   if (!m_geommiscs) return 0;
00484   return m_geommiscs->GetLast() + 1;
00485 }
00486 REROOT_Geom::MassDistrib_list_size_type 
00487                                      REROOT_Geom::n_massdistribs() const
00488 {
00489   if (!m_massdistribs) return 0;
00490   return m_massdistribs->GetLast() + 1;
00491 }
00492 REROOT_Geom::Material_list_size_type  REROOT_Geom::n_materials()   const
00493 {
00494   if (!m_materials) return 0;
00495   return m_materials->GetLast() + 1;
00496 }
00497 REROOT_Geom::MdlOrg_list_size_type    REROOT_Geom::n_mdlorgs()     const
00498 {
00499   if (!m_mdlorgs) return 0;
00500   return m_mdlorgs->GetLast() + 1;
00501 }
00502 REROOT_Geom::Mixture_list_size_type   REROOT_Geom::n_mixtures()    const
00503 {
00504   if (!m_mixtures) return 0;
00505   return m_mixtures->GetLast() + 1;
00506 }
00507 REROOT_Geom::PlanePos_list_size_type  REROOT_Geom::n_planeposs()   const
00508 {
00509   if (!m_planeposs) return 0;
00510   return m_planeposs->GetLast() + 1;
00511 }
00512 REROOT_Geom::PlaneSpec_list_size_type REROOT_Geom::n_planespecs()  const
00513 {
00514   if (!m_planespecs) return 0;
00515   return m_planespecs->GetLast() + 1;
00516 }
00517 REROOT_Geom::PlexusAdd_list_size_type REROOT_Geom::n_plexusadds()  const
00518 {
00519   if (!m_plexusadds) return 0;
00520   return m_plexusadds->GetLast() + 1;
00521 }
00522 REROOT_Geom::Pln2MUX_list_size_type   REROOT_Geom::n_pln2muxs()    const
00523 {
00524   if (!m_pln2muxs) return 0;
00525   return m_pln2muxs->GetLast() + 1;
00526 }
00527 REROOT_Geom::Rotm_list_size_type      REROOT_Geom::n_rotms()       const
00528 {
00529   if (!m_rotms) return 0;
00530   return m_rotms->GetLast() + 1;
00531 }
00532 REROOT_Geom::SubVolPos_list_size_type REROOT_Geom::n_subvolposs()  const
00533 {
00534   if (!m_subvolposs) return 0;
00535   return m_subvolposs->GetLast() + 1;
00536 }
00537 REROOT_Geom::SubVolSpec_list_size_type REROOT_Geom::n_subvolspecs()const
00538 {
00539   if (!m_subvolspecs) return 0;
00540   return m_subvolspecs->GetLast() + 1;
00541 }
00542 REROOT_Geom::SuperModule_list_size_type 
00543                                       REROOT_Geom::n_supermodules()const
00544 {
00545   if (!m_supermodules) return 0;
00546   return m_supermodules->GetLast() + 1;
00547 }
00548 REROOT_Geom::TMedium_list_size_type   REROOT_Geom::n_tmediums()    const
00549 {
00550   if (!m_tmediums) return 0;
00551   return m_tmediums->GetLast() + 1;
00552 }
00553 REROOT_Geom::TPar_list_size_type      REROOT_Geom::n_tpars()       const
00554 {
00555   if (!m_tpars) return 0;
00556   return m_tpars->GetLast() + 1;
00557 }
00558 REROOT_Geom::TubePixelInfo_list_size_type 
00559                                    REROOT_Geom::n_tubepixelinfos() const
00560 {
00561   if (!m_tubepixelinfos) return 0;
00562   return m_tubepixelinfos->GetLast() + 1;
00563 }
00564 REROOT_Geom::TubePixelMap_list_size_type 
00565                                     REROOT_Geom::n_tubepixelmaps() const
00566 {
00567   if (!m_tubepixelmaps) return 0;
00568   return m_tubepixelmaps->GetLast() + 1;
00569 }
00570 
00571 //___________________________________________________________________________
00572 
00573 void REROOT_Geom::FillGlobalZ0Shift(void)
00574 {
00575    // This is part of a hack used to reposition the REROOT objects
00576    // so that z=0 (global) is now at the front of the first plane
00577    // rather than a the front face of the hall
00578 
00579    REROOT_PlanePos *firstplane = 
00580         dynamic_cast<REROOT_PlanePos *>(m_planeposs->At(0));
00581    if ( ! firstplane ) {
00582      cout << " REROOT_Geom::FillGobalZ0Shift failed " << endl;
00583      return;
00584    }
00585 
00586    // !!!! Peek at the private data to bypass the methods
00587    // !!!! that would eventually call this one...
00588    fGlobalZ0Shift = -(firstplane->m_PairZmin);
00589 
00590 }

Generated on Fri Mar 28 15:39:14 2008 for loon by  doxygen 1.3.9.1