+
+//_______________________________________________________________________
+const TString& AliRunDigitizer::GetInputFolderName(Int_t i) const
+{
+ //
+ // Get the input Folder Name
+ //
+ AliStream* stream = dynamic_cast<AliStream*>(fInputStreams->At(i));
+ if (stream == 0x0)
+ AliFatal(Form("Can not get the input stream. Index = %d. Exiting",i));
+ return stream->GetFolderName();
+}
+//_______________________________________________________________________
+
+const char* AliRunDigitizer::GetOutputFolderName()
+{
+ //
+ // Get output folder name
+ //
+ return GetOutRunLoader()->GetEventFolder()->GetName();
+}
+//_______________________________________________________________________
+
+AliRunLoader* AliRunDigitizer::GetOutRunLoader()
+{
+ //
+ // Returns Run Loader
+ //
+ if (fOutRunLoader) return fOutRunLoader;
+
+ if ( fOutputFileName.IsNull() )
+ {//guard that sombody calls it without settting file name
+ AliDebug(1,"Output file name is empty. Using Input 0 for output");
+ return AliRunLoader::GetRunLoader(GetInputFolderName(0));
+ }
+// InitOutputGlobal();
+ return fOutRunLoader;
+}
+//_______________________________________________________________________
+
+TString AliRunDigitizer::GetInputFileName(Int_t input, Int_t order) const
+{
+// returns file name of the order-th file in the input stream input
+// returns empty string if such file does not exist
+// first input stream is 0
+// first file in the input stream is 0
+ TString fileName("");
+ if (input >= fNinputs) return fileName;
+ AliStream * stream = static_cast<AliStream*>(fInputStreams->At(input));
+ if (order > stream->GetNInputFiles()) return fileName;
+ fileName = stream->GetFileName(order);
+ return fileName;
+}