Hi Claus and others,
Your last message message makes me think that I have already written and
used such a class since last summer. I called it BrDataHandler and I wrote
it so that the user wouldn't have to bother with data sequences.
The scheme in a macro using it is:
------------------------------------
gROOT->Reset();
// loading libraries
gROOT->LoadClass("BrDataHandler", "libBrDataHandler");
gROOT->LoadClass("RawTrack", "libRawTrack"); // user module based class
gROOT->LoadClass("TpcTof", "libTpcTof"); // idem
// initial parameters
Int_t maxevt = 50000; // number of events to analyze
Int_t run = 2535; // initial run number (note: should exist!).
Int_t nrun = 1; // number of runs
Int_t trigger = 6; // collision events
// creating data handler
BrDataHandler* hndl = new BrDataHandler(run, nrun, maxevt);
hndl->SetGeoFile("/home/nuc/ouerdane/Disk2/Brahms/Runs/run2535.geo");
hndl->SetMagFile("/home/nuc/ouerdane/Disk2/Brahms/Runs/run2535.mag");
hndl->SetParamFile("DetectorParameters.txt");
hndl->SetDataDir("/home/nuc/ouerdane/Disk2/../DATA/");
hndl->SetTrigger(trigger);
hndl->Init();
// user analysis modules
RawTrack* rt = new RawTrack("rt", "rt");
rt->Book();
rt->Init();
TpcTof* ttm = new TpcTof("TPM2", "TOFW");
TpcTof* ttf = new TpcTof("T2", "TOF1");
ttm->Book();
ttf->Book();
ttm->Init();
ttf->Init();
// adding modules in the data handler:
hndl->Add(rt);
hndl->Add(ttm);
hndl->Add(ttf);
// analyzing events
do {
hndl->Event();
} while (hndl->NextRawEvent());
// the loop will stop if maxevt is reached _OR_ nrun is reached.
-------------------------------------------------------------
I only used it for my own needs since I thought people had their own
methods or codes to do that. But it may be a good idea to have a standard
class to deal with data sequences so that the user only has to write some
analysis modules which could be handled by such a class.
Christian Holm wrote some nice classes (cf previous mails about
BrMainModule and so on) which could serve as a base for that.
But if you wish to have a look at the stuff I'm using, I need someone to
tell me how and where I can check it in.
Cheers,
Djam
This archive was generated by hypermail 2b29 : Wed Oct 18 2000 - 06:28:12 EDT