Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77559
b: "refs/heads/CMSSW_7_1_X"
c: e1db9a0
h: "refs/heads/CMSSW_7_1_X"
i:
  77557: 0820138
  77555: 4eae78c
  77551: ec454a3
v: v3
  • Loading branch information
Suchandra Dutta committed Nov 10, 2009
1 parent 397a8ab commit f3e2e5d
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 120 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": 1489a5dde9eb0b511875f1904019091c4e40ce91
"refs/heads/CMSSW_7_1_X": e1db9a0c452bc18e0e1d88daa242c4d241b87e80
2 changes: 2 additions & 0 deletions trunk/DQM/TrackerCommon/BuildFile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<use name=DQMServices/Core>
<use name=DataFormats/Scalers>
<use name=rootgraphics>
<use name=xdaq>
<flags EDM_PLUGIN=1>
<export>
<use name=DQMServices/Core>
<use name=rootgraphics>
Expand Down
19 changes: 3 additions & 16 deletions trunk/DQM/TrackerCommon/interface/WebInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <string>
#include <map>

class DQMOldReceiver;
class WebInterface
{

Expand All @@ -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()
{
}
Expand Down
130 changes: 33 additions & 97 deletions trunk/DQM/TrackerCommon/src/WebInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<DQMStore>().operator->();
}


std::string WebInterface::get_from_multimap(std::multimap<std::string, std::string> &mymap, std::string key)
{
std::multimap<std::string, std::string>::iterator it;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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<std::string, std::string> 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<std::string, std::string> 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;
Expand All @@ -206,8 +147,7 @@ void WebInterface::printNavigatorXML(std::string current, xgi::Output * out)

*out << "<current>" << current << "</current>" << endl;

DQMStore * myBei = (*mui_p)->getBEInterface();
ContentReader reader(myBei);
ContentReader reader(dqmStore_);

std::list<std::string>::iterator it;

Expand Down Expand Up @@ -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;
Expand All @@ -314,8 +253,7 @@ void WebInterface::printContentViewerXML(std::string current, xgi::Output * out)

*out << "<current>" << current << "</current>" << endl;

DQMStore * myBei = (*mui_p)->getBEInterface();
ContentReader reader(myBei);
ContentReader reader(dqmStore_);

std::list<std::string>::iterator it;

Expand Down Expand Up @@ -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<string,string>::iterator lower = view_multimap.lower_bound("View");
multimap<string,string>::iterator upper = view_multimap.upper_bound("View");
multimap<string,string>::iterator it;
Expand Down
6 changes: 3 additions & 3 deletions trunk/DQM/TrackerCommon/test/DQM_Tier0_HarvestTest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions trunk/DQM/TrackerCommon/test/DQM_Tier0_Test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 &

###

0 comments on commit f3e2e5d

Please sign in to comment.