Fork me on GitHub

Changes between Initial Version and Version 1 of WorkBook/LibraryInterface


Ignore:
Timestamp:
Jun 20, 2012, 12:39:16 PM (12 years ago)
Author:
Pavel Demin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkBook/LibraryInterface

    v1 v1  
     1{{{
     2  // Declaration of variables
     3  ExRootConfReader *confReader;
     4  ExRootAnalysis *modularDelphes;
     5  ExRootFactory *factory;
     6  TObjArray *outputArray;
     7
     8  try
     9  {
     10    // Initialization
     11    confReader = new ExRootConfReader;
     12    confReader->ReadFile("delphes_card.tcl");
     13
     14    modularDelphes = new ExRootAnalysis("Delphes");
     15    modularDelphes->SetConfReader(confReader);
     16    modularDelphes->SetTreeWriter(treeWriter);
     17   
     18    factory = modularDelphes->GetFactory();
     19    outputArray = modularDelphes->NewArray("candidates");
     20
     21    modularDelphes->InitTask();
     22
     23    // Event loop
     24    while(ReadEvent())
     25    {
     26      modularDelphes->Clear();
     27      ConvertEvent();         
     28      modularDelphes->ProcessTask();
     29    }
     30
     31    // Finalisation
     32    modularDelphes->FinishTask();
     33    delete modularDelphes;
     34    delete confReader;
     35  }
     36  catch(runtime_error &e)
     37  {
     38    if(outputFile) delete outputFile;
     39    cerr << "** ERROR: " << e.what() << endl;
     40    return 1;
     41  }
     42}}}