Created
September 9, 2013 13:53
-
-
Save pgjones/6495876 to your computer and use it in GitHub Desktop.
Load the ratdb in root. .L RatDB.cc+ RatDB();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <RAT/DB.hh> | |
#include <RAT/Log.hh> | |
#include <iostream> | |
using namespace std; | |
void RatDB() | |
{ | |
RAT::Log::Init("/dev/null"); | |
RAT::DB* db = RAT::DB::Get(); | |
assert(db); | |
char* glg4data = getenv("GLG4DATA"); | |
if (glg4data == static_cast<char*>(NULL)) { | |
std::cerr << "ratzdab::ratdb: Environment variable $GLG4DATA must be set" << std::endl; | |
assert(glg4data); | |
} | |
std::string data = std::string(glg4data); | |
assert(data != ""); | |
db->LoadDefaults(); | |
cout << db->GetLink( "PMT", "r1408" )->GetS( "photocathode_surface" ) << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment