![]() |
![]() |
#include <Validation/Geometry/interface/MonitorElementMgr.h>
Public Member Functions | |
bool | addME (MonitorElement *ime) |
MonitorElement * | getME (int ime) |
MonitorElement * | getMEFromSecondFile (const char *hnam) |
MonitorElementMgr () | |
void | openSecondFile (const std::string &name) |
void | printComparisonResult (int ime) |
void | save (const std::string &name) |
~MonitorElementMgr () | |
Private Attributes | |
TFile * | theFileRef |
mime | theMonitorElements |
Definition at line 11 of file MonitorElementMgr.h.
MonitorElementMgr::MonitorElementMgr | ( | ) |
MonitorElementMgr::~MonitorElementMgr | ( | ) |
Definition at line 21 of file MonitorElementMgr.cc.
00022 { 00023 //~MonitorElement is protected => delete doesnt work... 00024 /* 00025 mime::const_iterator iter; 00026 for( iter = theMonitorElements.begin(); iter != theMonitorElements.end(); iter++ ){ 00027 delete (*iter).second; 00028 } 00029 */ 00030 }
bool MonitorElementMgr::addME | ( | MonitorElement * | ime | ) |
Definition at line 68 of file MonitorElementMgr.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), MonitorElement::getName(), and theMonitorElements.
00069 { 00070 const char* str = const_cast<char *>((sih->getName()).c_str()); 00071 int ih = atoi(str); 00072 theMonitorElements[ih] = sih; 00073 std::cout << " addME " << sih->getName() << " = " << ih << std::endl; 00074 00075 return true; 00076 }
MonitorElement * MonitorElementMgr::getME | ( | int | ime | ) |
Definition at line 78 of file MonitorElementMgr.cc.
References TestMuL1L2Filter_cff::cerr, lat::endl(), exception, me, and theMonitorElements.
00079 { 00080 MonitorElement* me = 0; 00081 mime::const_iterator ite = theMonitorElements.find( ime ); 00082 if( ite != theMonitorElements.end() ) { 00083 me = (*ite).second; 00084 } else { 00085 std::cerr << "!!!! FATAL ERROR MonitorElement does not exist " << ime << std::endl; 00086 std::exception(); 00087 } 00088 return me; 00089 }
MonitorElement * MonitorElementMgr::getMEFromSecondFile | ( | const char * | hnam | ) |
Definition at line 91 of file MonitorElementMgr.cc.
References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), exception, and me.
00092 { 00093 std::cout << "still to be added for ME" << std::endl; 00094 MonitorElement* me = 0; 00095 std::cerr << "!!!! FATAL ERROR MonitorElement does not exist " << std::endl; 00096 std::exception(); 00097 return me; 00098 }
void MonitorElementMgr::openSecondFile | ( | const std::string & | name | ) |
Definition at line 48 of file MonitorElementMgr.cc.
References theFileRef.
00049 { 00050 00051 theFileRef = new TFile(name.c_str()); 00052 00053 /* std::vector<std::string> objectNames = theStoreIn->listObjectNames(); 00054 std::vector<std::string> objectTypes = theStoreIn->listObjectTypes(); 00055 uint siz = objectNames.size(); 00056 for( uint ii = 0; ii < siz; ii++ ) { 00057 // std::cout << " HISTOS IN FILE " << std::endl; 00058 00059 // std::cout << " HISTO: " << objectNames[ii] << " " << objectTypes[ii] << std::endl; 00060 }*/ 00061 }
void MonitorElementMgr::save | ( | const std::string & | name | ) |
Definition at line 33 of file MonitorElementMgr.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), iter, and theMonitorElements.
00034 { 00035 00036 std::cout << "=== save user histos ===" << std::endl; 00037 TFile fout(name.c_str(),"recreate"); 00038 // write out the histos 00039 mime::const_iterator iter; 00040 std::cout << "Should save " << theMonitorElements.size() << " MEs" << std::endl; 00041 /* 00042 for( iter = theMonitorElements.begin(); iter != theMonitorElements.end(); iter++ ){ 00043 delete (*iter).second; 00044 } 00045 */ 00046 }
TFile* MonitorElementMgr::theFileRef [private] |
mime MonitorElementMgr::theMonitorElements [private] |