From f3e2e5d77e8216a85451025b2866a08f761ee767 Mon Sep 17 00:00:00 2001 From: Suchandra Dutta Date: Tue, 10 Nov 2009 15:41:02 +0000 Subject: [PATCH] --- yaml --- r: 77559 b: "refs/heads/CMSSW_7_1_X" c: e1db9a0c452bc18e0e1d88daa242c4d241b87e80 h: "refs/heads/CMSSW_7_1_X" i: 77557: 08201385500f920a14a106aade8ec1962f4cb294 77555: 4eae78c00fae88f5646eb614aff7724223a585fa 77551: ec454a3b1e750af5f03e7769a08b8ccbc22e3e20 v: v3 --- [refs] | 2 +- trunk/DQM/TrackerCommon/BuildFile | 2 + .../TrackerCommon/interface/WebInterface.h | 19 +-- trunk/DQM/TrackerCommon/src/WebInterface.cc | 130 +++++------------- .../test/DQM_Tier0_HarvestTest.txt | 6 +- .../DQM/TrackerCommon/test/DQM_Tier0_Test.txt | 6 +- 6 files changed, 45 insertions(+), 120 deletions(-) diff --git a/[refs] b/[refs] index 66e4f8e57ebb6..c1ea2557f1614 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": 1489a5dde9eb0b511875f1904019091c4e40ce91 +"refs/heads/CMSSW_7_1_X": e1db9a0c452bc18e0e1d88daa242c4d241b87e80 diff --git a/trunk/DQM/TrackerCommon/BuildFile b/trunk/DQM/TrackerCommon/BuildFile index 8d170833c56d9..0013e556b248c 100644 --- a/trunk/DQM/TrackerCommon/BuildFile +++ b/trunk/DQM/TrackerCommon/BuildFile @@ -1,6 +1,8 @@ + + diff --git a/trunk/DQM/TrackerCommon/interface/WebInterface.h b/trunk/DQM/TrackerCommon/interface/WebInterface.h index 4295d3ec587ee..250d632d2d5cb 100644 --- a/trunk/DQM/TrackerCommon/interface/WebInterface.h +++ b/trunk/DQM/TrackerCommon/interface/WebInterface.h @@ -16,7 +16,6 @@ #include #include -class DQMOldReceiver; class WebInterface { @@ -30,24 +29,12 @@ class WebInterface protected: - DQMOldReceiver ** mui_p; + DQMStore* dqmStore_; WebPage * page_p; public: - - WebInterface(std::string _exeURL, - std::string _appURL, - DQMOldReceiver ** _mui_p) - { - exeURL = _exeURL; - appURL = _appURL; - mui_p = _mui_p; - - - std::cout << "created a WebInterface for the DQMClient, the url = " << appURL << std::endl; - std::cout << "within context = " << exeURL << std::endl; - } - + + WebInterface(std::string _exeURL, std::string _appURL); virtual ~WebInterface() { } diff --git a/trunk/DQM/TrackerCommon/src/WebInterface.cc b/trunk/DQM/TrackerCommon/src/WebInterface.cc index 02bbbfe8dc4d9..5842f0f06fc08 100644 --- a/trunk/DQM/TrackerCommon/src/WebInterface.cc +++ b/trunk/DQM/TrackerCommon/src/WebInterface.cc @@ -2,10 +2,23 @@ #include "DQM/TrackerCommon/interface/CgiReader.h" #include "DQM/TrackerCommon/interface/CgiWriter.h" #include "DQM/TrackerCommon/interface/ContentReader.h" -#include "DQMServices/Core/interface/DQMOldReceiver.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "DQMServices/Core/interface/DQMStore.h" using namespace std; +WebInterface::WebInterface(string _exeURL, string _appURL) +{ + exeURL = _exeURL; + appURL = _appURL; + + std::cout << "created a WebInterface for the DQMClient, the url = " << appURL << std::endl; + std::cout << "within context = " << exeURL << std::endl; + + dqmStore_ = edm::Service().operator->(); +} + + std::string WebInterface::get_from_multimap(std::multimap &mymap, std::string key) { std::multimap::iterator it; @@ -66,23 +79,6 @@ void WebInterface::Configure(xgi::Input * in, xgi::Output * out) throw (xgi::exc std::string port = get_from_multimap(conf_map, "Port"); std::string clientname = get_from_multimap(conf_map, "Clientname"); -// std::cout << "will try to connect to host : " << host << std::endl; -// std::cout << "listening to port : " << port << std::endl; -// std::cout << "using name : " << clientname << std::endl; - /* - if (*mui_p == 0) - { - *mui_p = new DQMOldReceiver(host, atoi(port.c_str()), clientname); - } - else - { - if (*mui_p->isConnected()) - { - *mui_p->disconnect(); - } - *mui_p->connect(host, atoi(port.c_str())); - } - */ } void WebInterface::Open(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception) @@ -110,89 +106,34 @@ void WebInterface::Open(xgi::Input * in, xgi::Output * out) throw (xgi::exceptio } } - DQMStore * myBei = (*mui_p)->getBEInterface(); std::cout << "will try to open " << to_open << std::endl; - if (*mui_p) + if (dqmStore_) { if (to_open == "top") { - myBei->setCurrentFolder("/"); + dqmStore_->setCurrentFolder("/"); } else if (to_open == "..") { - myBei->goUp(); + dqmStore_->goUp(); } else { - myBei->setCurrentFolder(to_open); + dqmStore_->setCurrentFolder(to_open); } + printNavigatorXML(dqmStore_->pwd(), out); } else { - std::cout << "no MUI object, subscription to " << to_open << " failed!" << std::endl; + std::cout << "no DQMStore object, subscription to " << to_open << " failed!" << std::endl; } - printNavigatorXML(myBei->pwd(), out); -} -/*void WebInterface::Subscribe(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception) -{ - std::multimap nav_map; - - CgiReader reader(in); - reader.read_form(nav_map); - - std::string to_subscribe = get_from_multimap(nav_map, "SubscribeTo"); - if ((*mui_p)) - { - std::cout << "will try to subscribe to " << to_subscribe << std::endl; - (*mui_p)->subscribe(to_subscribe); - log4cplus::helpers::sleep(2); // delay for the subscription to be made - } - else - { - std::cout << "no MUI object, subscription to " << to_subscribe << " failed!" << std::endl; - } - - std::string current = get_from_multimap(nav_map, "Current"); - if (current == "") - { - current = "top"; - } - printNavigatorXML(current, out); } -void WebInterface::Unsubscribe(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception) -{ - std::multimap nav_map; - - CgiReader reader(in); - reader.read_form(nav_map); - - std::string to_unsubscribe = get_from_multimap(nav_map, "UnsubscribeFrom"); - - if ((*mui_p)) - { - std::cout << "will try to unsubscribe from " << to_unsubscribe << std::endl; - (*mui_p)->unsubscribe(to_unsubscribe); - log4cplus::helpers::sleep(2); // delay for the unsubscription to be made - } - else - { - std::cout << "no MUI object, unsubscription from" << to_unsubscribe << " failed!" << std::endl; - } - - std::string current = get_from_multimap(nav_map, "Current"); - if (current == "") - { - current = "top"; - } - printNavigatorXML(current, out); -}*/ - void WebInterface::printNavigatorXML(std::string current, xgi::Output * out) { - if (!(*mui_p)) + if (!dqmStore_) { cout << "NO GUI!!!" << endl; return; @@ -206,8 +147,7 @@ void WebInterface::printNavigatorXML(std::string current, xgi::Output * out) *out << "" << current << "" << endl; - DQMStore * myBei = (*mui_p)->getBEInterface(); - ContentReader reader(myBei); + ContentReader reader(dqmStore_); std::list::iterator it; @@ -273,34 +213,33 @@ void WebInterface::ContentsOpen(xgi::Input * in, xgi::Output * out) throw (xgi:: } } - DQMStore * myBei = (*mui_p)->getBEInterface(); std::cout << "will try to open " << to_open << std::endl; - if (*mui_p) + if (dqmStore_) { if (to_open == "top") { - myBei->cd(); + dqmStore_->cd(); } else if (to_open == "..") { - myBei->goUp(); + dqmStore_->goUp(); } else { - myBei->setCurrentFolder(to_open); + dqmStore_->setCurrentFolder(to_open); } + printContentViewerXML(dqmStore_->pwd(), out); } else { - std::cout << "no MUI object, subscription to " << to_open << " failed!" << std::endl; + std::cout << "no DQMStore object, subscription to " << to_open << " failed!" << std::endl; } - printContentViewerXML(myBei->pwd(), out); } void WebInterface::printContentViewerXML(std::string current, xgi::Output * out) { - if (!(*mui_p)) + if (!(dqmStore_)) { cout << "NO GUI!!!" << endl; return; @@ -314,8 +253,7 @@ void WebInterface::printContentViewerXML(std::string current, xgi::Output * out) *out << "" << current << "" << endl; - DQMStore * myBei = (*mui_p)->getBEInterface(); - ContentReader reader(myBei); + ContentReader reader(dqmStore_); std::list::iterator it; @@ -344,15 +282,13 @@ void WebInterface::DrawGif(xgi::Input * in, xgi::Output * out) throw (xgi::excep std::string current = get_from_multimap(view_multimap, "Current"); - if (!(*mui_p)) + if (dqmStore_) { - std::cout << "The mui pointer is empty!" << std::endl; + std::cout << "The DQMStore pointer is empty!" << std::endl; return; } - DQMStore * myBei = (*mui_p)->getBEInterface(); - - ContentReader con_reader(myBei); + ContentReader con_reader(dqmStore_); multimap::iterator lower = view_multimap.lower_bound("View"); multimap::iterator upper = view_multimap.upper_bound("View"); multimap::iterator it; diff --git a/trunk/DQM/TrackerCommon/test/DQM_Tier0_HarvestTest.txt b/trunk/DQM/TrackerCommon/test/DQM_Tier0_HarvestTest.txt index af88e748dbf65..89e457aa199b3 100644 --- a/trunk/DQM/TrackerCommon/test/DQM_Tier0_HarvestTest.txt +++ b/trunk/DQM/TrackerCommon/test/DQM_Tier0_HarvestTest.txt @@ -4,11 +4,11 @@ eval `scramv1 r -csh` ### -cmsDriver.py step3_DT2_1 -s HARVESTING:dqmHarvesting --conditions FrontierConditions_GlobalTag,CRAFT09_R_V3::All --filein file:step2_DT2_1_RAW2DIGI_RECO_DQM.root --data --scenario=cosmics >& q2.1.log ; mv DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO.root DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO_1.root +cmsDriver.py step3_DT2_1 -s HARVESTING:dqmHarvesting --conditions FrontierConditions_GlobalTag,CRAFT09_R_V8::All --filein file:step2_DT2_1_RAW2DIGI_RECO_DQM.root --data --scenario=cosmics >& q2.1.log ; mv DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO.root DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO_1.root -cmsDriver.py step3_DT2_2 -s HARVESTING:dqmHarvesting --conditions FrontierConditions_GlobalTag,CRAFT09_R_V3::All --filein file:step2_DT2_2_RAW2DIGI_RECO_DQM.root --data --scenario=cosmics >& q2.2.log ; mv DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO.root DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO_2.root +cmsDriver.py step3_DT2_2 -s HARVESTING:dqmHarvesting --conditions FrontierConditions_GlobalTag,CRAFT09_R_V8::All --filein file:step2_DT2_2_RAW2DIGI_RECO_DQM.root --data --scenario=cosmics >& q2.2.log ; mv DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO.root DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO_2.root -cmsDriver.py step3_DT2_3 -s HARVESTING:dqmHarvesting --conditions FrontierConditions_GlobalTag,CRAFT09_R_V3::All --filein file:step2_DT2_3_RAW2DIGI_RECO_DQM.root --data --scenario=cosmics >& q2.3.log ; mv DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO.root DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO_3.root +cmsDriver.py step3_DT2_3 -s HARVESTING:dqmHarvesting --conditions FrontierConditions_GlobalTag,CRAFT09_R_V8::All --filein file:step2_DT2_3_RAW2DIGI_RECO_DQM.root --data --scenario=cosmics >& q2.3.log ; mv DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO.root DQM_V0001_R000110998__Global__CMSSW_X_Y_Z__RECO_3.root sed -e "s/'file:step2_DT2_1_RAW2DIGI_RECO_DQM.root'/'file:step2_DT2_1_RAW2DIGI_RECO_DQM.root','file:step2_DT2_2_RAW2DIGI_RECO_DQM.root'/" step3_DT2_1_HARVESTING_CRAFT09.py > step3_DT2_12_HARVESTING_CRAFT09.py diff --git a/trunk/DQM/TrackerCommon/test/DQM_Tier0_Test.txt b/trunk/DQM/TrackerCommon/test/DQM_Tier0_Test.txt index f7431986af4db..6d0af05a9ecb4 100644 --- a/trunk/DQM/TrackerCommon/test/DQM_Tier0_Test.txt +++ b/trunk/DQM/TrackerCommon/test/DQM_Tier0_Test.txt @@ -2,10 +2,10 @@ eval `scramv1 r -csh` -cmsDriver.py step2_DT2_1 -s RAW2DIGI,RECO:reconstructionCosmics,DQM -n 1000 --eventcontent RECO --conditions FrontierConditions_GlobalTag,CRAFT09_R_V3::All --geometry Ideal --filein /store/data/CRAFT09/Cosmics/RAW/v1/000/110/998/001404E1-0F8A-DE11-ADB3-000423D99EEE.root --data --scenario cosmics >& p2.1.log & +cmsDriver.py step2_DT2_1 -s RAW2DIGI,RECO:reconstructionCosmics,DQM -n 1000 --eventcontent RECO --conditions FrontierConditions_GlobalTag,CRAFT09_R_V8::All --geometry Ideal --filein /store/data/CRAFT09/Cosmics/RAW/v1/000/110/998/001404E1-0F8A-DE11-ADB3-000423D99EEE.root --data --scenario cosmics >& p2.1.log & -cmsDriver.py step2_DT2_2 -s RAW2DIGI,RECO:reconstructionCosmics,DQM -n 1000 --eventcontent RECO --conditions FrontierConditions_GlobalTag,CRAFT09_R_V3::All --geometry Ideal --filein /store/data/CRAFT09/Cosmics/RAW/v1/000/110/998/002174A8-E989-DE11-8B4D-000423D6CA42.root --data --scenario cosmics >& p2.2.log & +cmsDriver.py step2_DT2_2 -s RAW2DIGI,RECO:reconstructionCosmics,DQM -n 1000 --eventcontent RECO --conditions FrontierConditions_GlobalTag,CRAFT09_R_V8::All --geometry Ideal --filein /store/data/CRAFT09/Cosmics/RAW/v1/000/110/998/002174A8-E989-DE11-8B4D-000423D6CA42.root --data --scenario cosmics >& p2.2.log & -cmsDriver.py step2_DT2_3 -s RAW2DIGI,RECO:reconstructionCosmics,DQM -n 1000 --eventcontent RECO --conditions FrontierConditions_GlobalTag,CRAFT09_R_V3::All --geometry Ideal --filein /store/data/CRAFT09/Cosmics/RAW/v1/000/110/998/0053DAF7-E889-DE11-B3D7-000423D98834.root --data --scenario cosmics >& p2.3.log & +cmsDriver.py step2_DT2_3 -s RAW2DIGI,RECO:reconstructionCosmics,DQM -n 1000 --eventcontent RECO --conditions FrontierConditions_GlobalTag,CRAFT09_R_V8::All --geometry Ideal --filein /store/data/CRAFT09/Cosmics/RAW/v1/000/110/998/0053DAF7-E889-DE11-B3D7-000423D98834.root --data --scenario cosmics >& p2.3.log & ###