not passed (or OCDB default-storage is already set).
The OCDB URI is now the first argument of alieve_init.C and
visscan_init.C.
To simplify standard usage, several wrapper macros have been added:
visscan_raw.C - SetDefaultStorage("raw://");
visscan_mcideal.C - SetDefaultStorage("MC, "Ideal");
visscan_mcresidual.C - SetDefaultStorage("MC, "Residual");
visscan_mcfull.C - SetDefaultStorage("MC, "Full");
visscan_local.C - SetDefaultStorage("local://$ALICE_ROOT/OCDB");
TString AliEveEventManager::fgESDFileName("AliESDs.root");
TString AliEveEventManager::fgAODFileName("AliAOD.root");
TString AliEveEventManager::fgRawFileName("raw.root");
-TString AliEveEventManager::fgCdbUri("local://$ALICE_ROOT/OCDB");
+TString AliEveEventManager::fgCdbUri;
TList* AliEveEventManager::fgAODfriends = 0;
void AliEveEventManager::SetCdbUri(const TString& cdb)
{
- // Set path to CDB, default "local://$ALICE_ROOT/OCDB".
+ // Set path to CDB, there is no default.
if ( ! cdb.IsNull()) fgCdbUri = cdb;
}
}
else
{
- cdb->SetDefaultStorage(fgCdbUri);
+ if (fgCdbUri.IsNull())
+ {
+ gEnv->SetValue("Root.Stacktrace", "no");
+ Fatal("Open()", "OCDB path was not specified.");
+ }
+
+ // Handle some special cases for MC (should be in OCDBManager).
+ if (fgCdbUri == "mcideal://")
+ cdb->SetDefaultStorage("MC", "Ideal");
+ else if (fgCdbUri == "mcresidual://")
+ cdb->SetDefaultStorage("MC", "Residual");
+ else if (fgCdbUri == "mcfull://")
+ cdb->SetDefaultStorage("MC", "Full");
+ else if (fgCdbUri == "local://") {
+ fgCdbUri = "local://$ALICE_ROOT/OCDB";
+ cdb->SetDefaultStorage(fgCdbUri);
+ } else
+ cdb->SetDefaultStorage(fgCdbUri);
if (cdb->IsDefaultStorageSet() == kFALSE)
- throw (kEH + "CDB initialization failed.");
+ throw kEH + "CDB initialization failed.";
}
- TString expCDB(fgCdbUri);
- gSystem->ExpandPathName(expCDB);
- if (cdb->GetDefaultStorage()->GetURI() == expCDB)
+ if (fgCdbUri.BeginsWith("local://"))
{
TString grp = "GRP/GRP/Data";
TString grppath = fPath + "/" + grp;
* full copyright notice. *
**************************************************************************/
-void alieve_init(const TString& path = ".", Int_t event=0,
+void alieve_init(const TString& cdburi = "",
+ const TString& path = ".", Int_t event=0,
const Text_t* esdfile = 0,
const Text_t* aodfile = 0,
const Text_t* rawfile = 0,
- const Text_t* cdburi = 0,
Bool_t assert_runloader = kFALSE,
Bool_t assert_esd = kFALSE,
Bool_t assert_aod = kFALSE,
Bool_t assert_raw = kFALSE)
{
+ if (cdburi.IsNull() && ! AliCDBManager::Instance()->IsDefaultStorageSet())
+ {
+ gEnv->SetValue("Root.Stacktrace", "no");
+ Fatal("alieve_init.C", "OCDB path MUST be specified as the first argument.");
+ }
+
Info("alieve_init", "Adding standard macros.");
TString hack = gSystem->pwd(); // Problem with TGFileBrowser cding
alieve_init_import_macros();
assert_aod, assert_raw);
// Open event
- if (path.BeginsWith("alien:"))
+ if (path.BeginsWith("alien:") || ! cdburi.BeginsWith("local:"))
{
if (gGrid != 0)
{
Bool_t gCenterProjectionsAtPrimaryVertex = kFALSE;
-void visscan_init(const TString& path=".", Bool_t show_extra_geo=kFALSE)
+
+void visscan_init(const TString& cdburi = "",
+ const TString& path = ".", Bool_t show_extra_geo = kFALSE)
{
+ if (cdburi.IsNull() && ! AliCDBManager::Instance()->IsDefaultStorageSet())
+ {
+ gEnv->SetValue("Root.Stacktrace", "no");
+ Fatal("visscan_init.C", "OCDB path MUST be specified as the first argument.");
+ }
+
if (!show_extra_geo)
{
gShowTRD = gShowMUON = gShowMUONRPhi = gShowMUONRhoZ = kFALSE;
AliEveEventManager::AddAODfriend("AliAOD.VertexingHF.root");
TEveUtil::LoadMacro("alieve_init.C");
- alieve_init(path, -1);
+ alieve_init(cdburi, path, -1);
// TEveLine::SetDefaultSmooth(1);
--- /dev/null
+void visscan_local(const TString& path = ".", Bool_t show_extra_geo = kFALSE)
+{
+ gROOT->ProcessLine(TString::Format(".x visscan_init.C(\"local://$ALICE_ROOT/OCDB\", \"%s\", %d)",
+ path.Data(), show_extra_geo));
+}
--- /dev/null
+void visscan_mc(const TString& path = ".", Bool_t show_extra_geo = kFALSE)
+{
+ gROOT->ProcessLine(TString::Format(".x visscan_init.C(\"mcideal://\", \"%s\", %d)",
+ path.Data(), show_extra_geo));
+}
--- /dev/null
+void visscan_mcfull(const TString& path = ".", Bool_t show_extra_geo = kFALSE)
+{
+ gROOT->ProcessLine(TString::Format(".x visscan_init.C(\"mcfull://\", \"%s\", %d)",
+ path.Data(), show_extra_geo));
+}
--- /dev/null
+void visscan_mcideal(const TString& path = ".", Bool_t show_extra_geo = kFALSE)
+{
+ gROOT->ProcessLine(TString::Format(".x visscan_init.C(\"mcideal://\", \"%s\", %d)",
+ path.Data(), show_extra_geo));
+}
--- /dev/null
+void visscan_mcresidual(const TString& path = ".", Bool_t show_extra_geo = kFALSE)
+{
+ gROOT->ProcessLine(TString::Format(".x visscan_init.C(\"mcresidual://\", \"%s\", %d)",
+ path.Data(), show_extra_geo));
+}
--- /dev/null
+void visscan_raw(const TString& path = ".", Bool_t show_extra_geo = kFALSE)
+{
+ gROOT->ProcessLine(TString::Format(".x visscan_init.C(\"raw://\", \"%s\", %d)",
+ path.Data(), show_extra_geo));
+}