99 #include <Riostream.h> 125 fNrOfEventsToWrite(0),
126 fNrOfEventsWritten(0),
127 fCopyTreesFromInput(0),
130 fRegionOfInterest(kFALSE),
133 fOutputInitialized(kFALSE),
136 fCombinationFileName(0)
146 TNamed(
"AliDigitizationInput",
"The manager for Merging"),
147 fkMASKSTEP(10000000),
151 fNrOfEventsToWrite(-1),
152 fNrOfEventsWritten(0),
153 fCopyTreesFromInput(-1),
154 fNinputs(nInputStreams),
156 fRegionOfInterest(kFALSE),
157 fInputStreams(new TClonesArray(
"AliStream",nInputStreams)),
159 fOutputInitialized(kFALSE),
162 fCombinationFileName(0)
169 if (nInputStreams == 0)
171 AliFatal(
"Specify nr of input streams");
186 for (i=1;i<nInputStreams;i++) {
219 AliError(
"Input stream number too high");
223 if ( !foldername.IsNull() ) {
246 else if (delta[i] != 0)
248 AliError(
"Only delta 0 or 1 is implemented");
266 AliInfo(Form(
"Setting Output File Name %s ",fn.Data()));
293 AliError(
"Can not get Run Loader Input 0. Maybe yet not initialized?");
296 AliDebug(2, Form(
" 2 %p = ", inrl)) ;
300 TIter next(inloaders);
355 if (inheader == 0x0)
AliFatal(
"Can not get header from input 0");
370 AliWarning(
"Copy trees from input: Copy or link files manually");
384 AliError(
"Can not get RunLoader from Output Stream folder");
388 this->Write(NULL, TObject::kOverwrite);
394 if (outfolder == 0x0)
396 AliError(
"Can not get Event Folder");
420 for (Int_t i = 0; i <
fNinputs; i++) {
422 if (sumI < 0)
return -1;
449 for (Int_t i = 0; i <
fNinputs; i++) {
494 AliFatal(Form(
"Can not get the input stream. Index = %d. Exiting",i));
517 AliDebug(1,
"Output file name is empty. Using Input 0 for output");
Int_t GetNInputFiles() const
void AddLoader(AliLoader *loader)
Int_t WriteRunLoader(Option_t *opt="")
Bool_t NextEventInStream()
void SetFolderName(const TString name)
Int_t WriteAliRun(Option_t *opt="")
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
#define AliWarning(message)
static AliRunLoader * Open(const char *filename="galice.root", const char *eventfoldername=AliConfig::GetDefaultEventFolderName(), Option_t *option="READ")
Bool_t Combination(Int_t evNumber[], Int_t delta[])
void MakeTree(Option_t *option)
AliHeader * GetHeader() const
Int_t WriteHeader(Option_t *opt="")
const TString & GetFolderName() const
#define AliFatal(message)
TFolder * GetEventFolder() const
#define AliDebug(logLevel, message)
TString GetFileName(Int_t order) const
#define AliError(message)
for(Int_t itree=0;itree< arrInputTreesDistortionCalib->GetEntriesFast();++itree)
static AliRunLoader * GetRunLoader(const char *eventfoldername)
Int_t Register(TFolder *eventFolder)
const TObjArray * GetArrayOfLoaders() const
void AddFile(const char *fileName)
AliRun * GetAliRun() const