> Could somebody please give me a boost?
no need to shout into the void, it is pretty easy to identify the author of manalyzer and ask me directly.
> we are planning to migrate from mana to manalyzer. I started to have a look into it and realized that I have some lose ends.
> Is there a clear migration docu somewhere?
README.md and examples in the manalyzer git repository.
If something is missing, or unclear, please ask.
> Currently I understand it the following way (which might be wrong):
> The class TARunObject is used to write analyzer modules which are registered by TAFactory. I hope this is right?
Please read the README file. It explains what is going on there.
Design of manalyzer had 2 main goals:
a) lifetime of all c++ objects (and ROOT objects) is well defined (to fix a design defect in rootana)
b) event flow and data flow are documentable (problem in mfe.c frontends, etc)
> However, in mana there is an analyzer implemented by the user which binds the modules and has additional routines:
> analyzer_init(), analyzer_exit(), analyzer_loop()
> ana_begin_of_run(), ana_end_of_run(), ana_pause_run(), ana_resume_run()
> which we are using.
I have never used the mana analyzer, I wrote the c++ rootana analyzer very early on (first commit in 2006).
But the basic steps should all be there for you:
- initialization (create histograms, open files) can be done in the module constructor or in BeginRun()
- finalization (fit histograms, close files) should be done in EndRun()
- event processing (obviously) in Analyze()
- pause run, resume run and switch to next subrun file have corresponding methods
- all the "flow" and multithreading stuff you can ignore to first order.
To start the migration, I recommend you take manalyzer_example_root.cxx and start stuffing it with your code.
If you run into any problems, I am happy to help with them. Ask here or contact me directly.
> This part I somehow miss in manalyzer, most probably due to lack of understanding, and missing documentation.
True, I wrote a migration guide for the frontend mfe.c to c++ tmfe, because we do this migration
quite often. But I never wrote a migration guide from mana.c analyzer, because we never did such
migration. Most experiments at TRIUMF are post-2006 and use rootana in it's different incarnations.
P.S. I designed the C++ TMFe frontend after manalyzer and I think it came out quite better, I especially
value the design input from Stefan, Thomas, Pierre, Joseph and Ben.
P.P.S. Be free to ignore all this manalyzer business and write your own analyzer based
on the midasio library:
int main()
{
TMReaderInteraface* f = TMNewReader(file.mid.gz");
while (1) {
TMEvent* e = TMReadEvent(f);
dwim(e);
delete e;
}
delete f;
}
For online processing I use the TMFe class, it has enough bits to be a frontend and an analyzer,
or you can use the older TMidasOnline from rootana.
Access to ODB is via the mvodb library, which is new in midas, but has been part of rootana
and my frontend toolkit since at least 2011 or earlier, inspired by Peter Green's even
older "myload" ODB access library.
K.O. |