Skip to content

Instantly share code, notes, and snippets.

@f-ilic
Last active September 26, 2017 10:45
Show Gist options
  • Save f-ilic/6a2f510e95ffe52161b04c4ef592b808 to your computer and use it in GitHub Desktop.
Save f-ilic/6a2f510e95ffe52161b04c4ef592b808 to your computer and use it in GitHub Desktop.
Davix, Alessandro share
void test() {
TString configfeatures = gROOT->GetConfigFeatures();
if (configfeatures.Contains("davix"))
cout << "[ OK ] compiled correctly" << endl;
string cert = "/afs/cern.ch/user/f/filic/.globus/usercert.pem";
string key = "/afs/cern.ch/user/f/filic/.globus/userkey.pem";
gEnv->SetValue("Davix.GSI.UserCert",cert.c_str());
gEnv->SetValue("Davix.GSI.UserKey",key.c_str());
// gEnv->SetValue("Davix.Debug",4);
gEnv->SetValue("Davix.GSI.GridMode", true);
gEnv->SetValue("Davix.GSI.CACheck", false);
cout << gEnv->GetValue("Davix.GSI.UserCert", (int)0) << endl; // weird but maybe ok?
gEnv->PrintEnv();
// string url = "https://cmsweb.cern.ch/dqm/online/data/browse/Original/";
string url = "https://cmsweb.cern.ch/dqm/online/data/browse/Original/00030xxxx/0003038xx/DQM_V0001_TrackingHLTBeamspotStream_R000303838.root";
TFile* f= TFile::Open(url.c_str());
if(f)
cout << "file alive" << endl;
else
cout << "file dead" << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment