Skip to content
Snippets Groups Projects
Commit fb7f7615 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Added default DB_DIR

- added default DB_DIR
- Fixed Scandalizer due to change in codaversion -> dataversion
parent f1044b96
No related branches found
No related tags found
No related merge requests found
...@@ -23,9 +23,9 @@ Int_t Scandalizer::ReadOneEvent() ...@@ -23,9 +23,9 @@ Int_t Scandalizer::ReadOneEvent()
// there may be a better place to do this, but this works // there may be a better place to do this, but this works
if (fWantCodaVers > 0) { if (fWantCodaVers > 0) {
fEvData->SetCodaVersion(fWantCodaVers); fEvData->SetDataVersion(fWantCodaVers);
} else { } else {
fEvData->SetCodaVersion(fRun->GetCodaVersion()); fEvData->SetDataVersion(fRun->GetDataVersion());
} }
switch( status ) { switch( status ) {
......
...@@ -7,12 +7,26 @@ ...@@ -7,12 +7,26 @@
#include "THcInterface.h" #include "THcInterface.h"
#include <iostream> #include <iostream>
#include <cstring> #include <cstring>
#include <string>
#include <cstdlib>
using namespace std; using namespace std;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
// Create a ROOT-style interactive interface // Create a ROOT-style interactive interface
//
if (const char* env_p = std::getenv("DB_DIR")) {
std::cout << "Your DB_DIR is: " << env_p << '\n';
} else {
std::string db_dir_env = "DBASE";
if (setenv("DB_DIR", db_dir_env.c_str(), 1)) {
std::cout << "Failed to set env var DB_DIR\n";
std::exit(EXIT_FAILURE);
}
std::cout << "DB_DIR set to DBASE\n";
}
// Handle convenience command line options // Handle convenience command line options
bool print_version = false, no_logo = false; bool print_version = false, no_logo = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment