Fork me on GitHub

Version 1 (modified by Pavel Demin, 12 years ago) ( diff )

--

  // Declaration of variables
  ExRootConfReader *confReader;
  ExRootAnalysis *modularDelphes;
  ExRootFactory *factory;
  TObjArray *outputArray;

  try
  {
    // Initialization
    confReader = new ExRootConfReader;
    confReader->ReadFile("delphes_card.tcl");

    modularDelphes = new ExRootAnalysis("Delphes");
    modularDelphes->SetConfReader(confReader);
    modularDelphes->SetTreeWriter(treeWriter);
    
    factory = modularDelphes->GetFactory();
    outputArray = modularDelphes->NewArray("candidates");

    modularDelphes->InitTask();

    // Event loop
    while(ReadEvent())
    {
      modularDelphes->Clear();
      ConvertEvent();         
      modularDelphes->ProcessTask();
    }

    // Finalisation
    modularDelphes->FinishTask();
    delete modularDelphes;
    delete confReader;
  }
  catch(runtime_error &e)
  {
    if(outputFile) delete outputFile;
    cerr << "** ERROR: " << e.what() << endl;
    return 1;
  }
Note: See TracWiki for help on using the wiki.