Fermilab


Go to Notes and Further References, Exercises, top,

Running with libMidad, simple example

Command line:

      loon simple_midad.C F2536.digits.mdaq.root

Details of simple_midad.C:

// simple_midad.C:
class JobC;
class Mint;

JobC *jc = 0;
Mint *mint = 0;

void load_libs(void);
void do_it(void);

void test ()
{
    load_libs();
    do_it();
}

void load_libs(void)
{
    const char* lib[] = {
        "libBubbleSpeak.so",
        "libCandStripSR.so",
        "libCandSliceSR.so",
        "libCandTrackSR.so",
        "libCandClusterSR.so",
        "libMidadMultiPage.so",
        0
    };
    int l;
    for (l=0; lib[l]; ++l) {
        gSystem->Load(lib[l]);
    }
}

void do_it(void)
{
     jc = new JobC;
     mint = new Mint(*jc);
     PageDisplay* pd = mint->SpawnDisplay();
     pd->AddPage("Multi");
//     pd->SpawnSinglePage("Multi");

     jc->Path.Create("default","");
     jc->Input.Set("Streams=DaqSnarl,Cand");

     jc->Path("default").Run(1);
 }

     


Notes and Further References

Do not use the "-q" nor the "-b" command line options here.

This gives a very basic configuration. See this example for other ways to use libMidad including running the example display created in the context of a job module.

See the Midad documentation for more info.


Exercises

Try it using the file created in configuring jobs examples.

      loon simple_midad.C $ROOT_DATA/tutorial/F2536.digits.mdaq.root

The next exercise has more details on what can be done with this library.


Contact: Nick West <n.west1@physics.ox.ac.uk>
Fermilab
Security, Privacy, Legal Fermi National Accelerator Laboratory