r1 - 11 Mar 2009 - 08:53:54 - GunmoRyuYou are here: KoreaCmsWiki >  Sandbox Web > TWikiUsers > GunmoRyu > GunmoRyuSandbox > 2009March > SourceOfExtractUsingRootAndEDM
{
    gSystem->Load("libFWCoreFWLite.so");
    AutoLibraryLoader::enable();
    gSystem->Load("libDataFormatsFWLite.so");
    #include "DataFormats/FWLite/interface/Handle.h"
    TFile file("H190ZZ4mu_RECO.root");
    fwlite::Event ev(&file);
    for( ev.toBegin();  ! ev.atEnd(); ++ev)
    {
        fwlite::Handle<std::vector<reco::Muon> > objs;
        objs.getByLabel(ev,"muons");
        //now can access data
        std::cout <<"size "<<objs.ptr()->size()<<std::endl;
    }
}

-- GunmoRyu - 11 Mar 2009

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
KOREA-CMS
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding KoreaCmsWiki? Send feedback