00001
00002 #include "LoadPlex.h"
00003
00004 #include "TSystem.h"
00005 #include "TFile.h"
00006
00007 #include "MessageService/MsgService.h"
00008 #include "MinosObjectMap/MomNavigator.h"
00009 #include "JobControl/JobCModuleRegistry.h"
00010 #include "Plex/PlexLoanPool.h"
00011 #include <string>
00012
00013 JOBMODULE(LoadPlex, "LoadPlex",
00014 "Load a dummy plex");
00015 CVSID("$Id: LoadPlex.cxx,v 1.4 2007/03/01 16:59:43 rhatcher Exp $");
00016
00017 ClassImp(LoadPlex)
00018
00019 JobCResult LoadPlex::Reco(MomNavigator* )
00020 {
00021 if(loaded==0) {
00022 loaded = 1;
00023
00024 MSG("LoadPlex",Msg::kInfo) << "***************************************" << endl;
00025 MSG("LoadPlex",Msg::kInfo) << "*** Loading Plexus info from file...***" << endl;
00026 MSG("LoadPlex",Msg::kInfo) << "*** Please Wait ***" << endl;
00027 MSG("LoadPlex",Msg::kInfo) << "***************************************" << endl;
00028
00029
00030
00031
00032
00033 const char* tridpath = gSystem->Getenv("TRID");
00034 std::string filename;
00035 if(tridpath) filename = string(tridpath) + "/";
00036 filename += "PlexData.root";
00037
00038 TFile f(filename.c_str());
00039 if(f.IsOpen()) {
00040 PlexLoanPool* plp = (PlexLoanPool*) f.Get("PlexLoanPool");
00041 plp->Print();
00042 f.Close();
00043 }
00044 }
00045 return JobCResult::kAOK;
00046 }
00047
00048
00049
00050