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

LoadPlex.cxx

Go to the documentation of this file.
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" // For JOBMODULE macro
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     // Delete existing loan pool, just in case.
00030     //PlexLoanPool* plp = PlexLoanPool::Instance();
00031     //delete plp;
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 

Generated on Mon Feb 15 11:06:53 2010 for loon by  doxygen 1.3.9.1