AliRunLoader* rl = AliRunLoader::Open("galiceNewIO.root","Event","recreate");
rl->SetCompressionLevel(2);
-
+ rl->SetNumberOfEventsPerFile(100);
+
AliRun* outAliRun;
if (gAlice == 0x0)
}
TIter next(modules);
AliModule* module;
- while ((module = (AliModule*)next()))
+ TObject * object;
+ while ((object = next()))
{
+ module = dynamic_cast<AliModule*>(object);
+ if (module == 0x0) {
+ ::Error("ConvertToNewIO.C","Can not cast module %#x ",object);
+ object->Dump();
+ continue;
+ }
+
outAliRun->AddModule(module);
TClass* modclass = module->IsA();
if (treeTR->GetEntries() > 0)
{
next.Reset();
- while ((module = (AliModule*)next()))
+ TObject * object;
+ while ((object = next()))
{
+ module = dynamic_cast<AliModule*>(object);
+ if (module == 0x0) {
+ ::Error("ConvertToNewIO.C","Can not cast module %#x ",object);
+ object->Dump();
+ continue;
+ }
TClass* modclass = module->IsA();
AliDetector *det = (AliDetector*)(modclass->DynamicCast(detclass,module));
if (det)
else
{
TClass* bcl = gROOT->GetClass(branch->GetClassName());
+ if (bcl == 0x0)
+ {
+ ::Error("ConvertToNewIO.C","Can not get TClass object of class named %s",branch->GetClassName());
+ continue;
+ }
pbuf[nbranches] = bcl->New();
::Info("ConvertToNewIO.C","Dumping buffer:");
((TObject*)pbuf[nbranches])->Dump();
else
{
TClass* bcl = gROOT->GetClass(branch->GetClassName());
+ if (bcl == 0x0)
+ {
+ ::Error("ConvertToNewIO.C","Can not get TClass object of class named %s",branch->GetClassName());
+ continue;
+ }
pbuf[nbranches] = bcl->New();
::Info("ConvertToNewIO.C","Dumping buffer:");
((TObject*)pbuf[nbranches])->Dump();
}
else //tree has any entries
{
- Info("ConvertToNewIO.C","S Digits Tree is Empty");
+ ::Info("ConvertToNewIO.C","S Digits Tree is Empty");
}
}
else //treeS
{
- ::Warning("ConvertToNewIO.C","Could not get TreeS from in AliRun.");
+ ::Warning("ConvertToNewIO.C","Could not get TreeS from AliRun.");
}
delete treeS;
else
{
TClass* bcl = gROOT->GetClass(branch->GetClassName());
+ if (bcl == 0x0)
+ {
+ ::Error("ConvertToNewIO.C","Can not get TClass object of class named %s",branch->GetClassName());
+ continue;
+ }
pbuf[nbranches] = bcl->New();
::Info("ConvertToNewIO.C","Dumping buffer:");
((TObject*)pbuf[nbranches])->Dump();
else
{
TClass* bcl = gROOT->GetClass(branch->GetClassName());
+ if (bcl == 0x0)
+ {
+ ::Error("ConvertToNewIO.C","Can not get TClass object of class named %s",branch->GetClassName());
+ continue;
+ }
pbuf[nbranches] = bcl->New();
::Info("ConvertToNewIO.C","Dumping buffer:");
((TObject*)pbuf[nbranches])->Dump();