I like this idea. There are several times in BRAT where this functionality is brute forced and this would clean those things up. One thing I would suggest (perhaps already done) would be to make it so that it can different forms of sequence files could be specified, not just the ones for the raw files. One might use different forms of sequence files later. The default could easily be runxxxxseqyyy.dat, but allow to specify the different format of the file. Further more, perhaps one could specify how many sequences to get from the list. Only some thoughts. I have also heard concerns about a proliferation of managers and this goes in the wrong direction, but as it is there, one could always choose not to use it in the "framework". But I like it. Kris "Claus O. E. Jorgensen" wrote: > I've made a new managerclass, that makes it easy to > get events from sequential sequence files from a specific > run. > > Here is an example on how it can be used: > > { > input = new BrRawDataInput("data input"); > > BrSequenceManager* seqMan = BrSequenceManager::Instance(); > seqMan->SetDataDirectory("foo/"); > seqMan->SetRunNumber(4711); > > //sequence loop > while(1) { > > if (!input->Open(seqMan->GetNextSequenceFile(),"DISKFILE")) > break; > > //event loop > while(!input->Eof()) { > BrEvent* event = new BrEvent("event", 1, 1); > > input->Event(event); > > //... > > delete event; > } > input->Close(); > } > } > > Is this a bad idea, or should it be done different? If I > don't hear from you, I will commit it one of these days. > > Cheers, > Claus > > ------------------------------ > Claus Jorgensen > > Phone : (+45) 33 32 49 49 > Office : (+45) 35 32 53 05 > E-mail : ekman@nbi.dk
This archive was generated by hypermail 2b29 : Tue Oct 10 2000 - 11:15:10 EDT