00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #include "RerootExodus/ExodusValidate.h"
00013 #include "RerootExodus/RerootExodus.h"
00014
00015 #include "Plex/PlexStripEndId.h"
00016 #include "Plex/PlexSEIdAltL.h"
00017 #include "Plex/PlexHandle.h"
00018
00019 #include "Plex/PlexLoanPool.h"
00020
00021 #include "Validity/VldContext.h"
00022
00023 #include "MessageService/MsgService.h"
00024 CVSID("$Id: ExodusValidate.cxx,v 1.5 2001/03/13 19:50:24 rhatcher Exp $");
00025
00026 ClassImp(ExodusValidate)
00027
00028
00029 ExodusValidate::ExodusValidate()
00030 {
00031
00032
00033
00034 MsgService* msvc = MsgService::Instance();
00035 MsgStream* mstr = msvc->GetStream("Exodus");
00036
00037 mstr->SetLogLevel(Msg::kVerbose);
00038 mstr->SetFormat(Msg::kVerbose,0xffff);
00039
00040 }
00041
00042
00043 ExodusValidate::~ExodusValidate()
00044 {
00045
00046
00047 }
00048
00049
00050 void ExodusValidate::TestPlexHandle(void)
00051 {
00052
00053
00054 VldContext vldc = RerootExodus::BuildVldContext();
00055 MSG("Exodus",Msg::kVerbose) <<
00056 "TestPlexHandle dump VldContext " << endl << flush;
00057 vldc.Print("");
00058
00059 PlexHandle ph(vldc);
00060
00061 PlexLoanPool* plp = PlexLoanPool::Instance();
00062 plp->Print("");
00063
00064 }
00065
00066
00067 void ExodusValidate::TestSteelPlane(void)
00068 {
00069
00070
00071 MSG("Exodus",Msg::kVerbose) << "TestSteelPlane " << endl;
00072
00073 const int n = 21;
00074 int listpln[n] = { -1, 0, 1,
00075 118, 119, 120, 121,
00076 238, 239, 240, 241, 242, 243,
00077 478, 479, 480, 481, 482, 483, 484, 485 };
00078
00079 for (Int_t i = 0; i < n ; i++) {
00080 Int_t ipln = listpln[i];
00081 Int_t spln = RerootExodus::RerootToSteelPlane(ipln);
00082 Int_t rpln = RerootExodus::SteelToRerootPlane(spln);
00083
00084 MSG("Exodus",Msg::kVerbose) << " reroot " << ipln <<
00085 " steel " << spln << " reroot " << rpln << endl;
00086 }
00087
00088
00089 #ifdef PLANENUMBERINGTEST
00090 Int_t nactive = RerootExodus::NumberOfPlanes(kTRUE);
00091 Int_t npassive = RerootExodus::NumberOfPlanes(kFALSE);
00092 Int_t nplanes = TMath::Max(nactive,npassive);
00093 Int_t testends = 0;
00094 printf(" this detector has %d active (%d passive) planes\n",nactive,npassive);
00095 for (Int_t ipln_f77 = 1-testends; ipln_f77<=nplanes+testends; ipln_f77++) {
00096 if (ipln_f77<10 || (ipln_f77>238 && ipln_f77<250) || ipln_f77>476) {
00097 Int_t ipln_reroot = ipln_f77-1;
00098 Int_t steel = RerootExodus::RerootToSteelPlane(ipln_reroot,kFALSE);
00099 Int_t active = RerootExodus::RerootToSteelPlane(ipln_reroot,kTRUE);
00100 Int_t r_steel = RerootExodus::SteelToRerootPlane(steel,kFALSE);
00101 Int_t r_active = RerootExodus::SteelToRerootPlane(active,kTRUE);
00102 printf(" plane f77=%3d reroot=%3d steel=%3d active=%3d reroot %3d %3d\n",ipln_f77,ipln_reroot,steel,active,r_steel,r_active);
00103 }
00104 }
00105 #endif
00106
00107 }
00108
00109
00110 void ExodusValidate::TestStripCount(void)
00111 {
00112
00113
00114 for (Int_t rpln = 0; rpln < 11; rpln++) {
00115 MSG("Exodus",Msg::kInfo) << " REROOT plane " << rpln <<
00116 " is type '" << RerootExodus::ActvPlaneName(rpln) <<
00117 "' and has " << RerootExodus::NStripsNonZero(rpln) <<
00118 " non-zero length strips" << endl;
00119 }
00120
00121 }
00122
00123