//------------------------------------------------------------------------ // File and Version Information: // $Id: AppUserBuild.cc,v 1.48 2004/08/31 23:48:58 lockman Exp $ // // Description: // Class AppUserBuild. This class must be provided by the user of // the framework in order to build an application. It must define // the modules that are to form the basis of the application. // // Environment: // Software developed for the BaBar Detector at the SLAC B-Factory. // // Author List: // Anders Ryd // Abi Soffer // // Copyright Information: // N.A. // //------------------------------------------------------------------------ //--------------- // BaBAr Headers: //--------------- #include "BaBar/BaBar.hh" //------------- // C++ Headers: //------------- #include //----------------------- // This Class's Header -- //----------------------- #include "Framework/AppFramework.hh" #include "Framework/AppUserBuild.hh" //------------------------------- // Collaborating Class Headers -- //------------------------------- #include "RecoUtils/PdtInit.hh" #include "TruthTools/BtaLoadMcCandidates.hh" #include "GenEnv/GenBuildEnv.hh" #include "HbkTupleEnv/HbkTupleEnv.hh" #include "RooTupleEnv/RooTupleEnv.hh" #include "ErrLogger/ErrLog.hh" #include "RandControl/RacTestInput.hh" #include "RandControl/RacRandomControl.hh" #include "BdbCondModules/CdbBdbInit.hh" // Actions: #include "RecoUtils/AppActionSumTime.hh" #include "RecoUtils/AppActionHistoDir.hh" #include "FrameLogger/AppActionErrLogger.hh" // If writing to the database: #ifdef GQA_DATABASE #include "BdbSequences/BdbSequence.hh" #endif // USE_DATABASE //StdHep loading #include "StdHepData/StdHepLoad.hh" #include "StdHepData/StdHepAsciiDump.hh" // GenFwkInt sequence: #include "GenFwkInt/GfiSequence.hh" // GeneratorsQA modules: #include "GeneratorsQA/GqaMCAnalysis.hh" #include "GeneratorsQA/GqaGfiTest.hh" #include "GeneratorsQA/GqaRandCheck.hh" #include "GeneratorsQA/GqaBkqedHisto.hh" #include "GeneratorsQA/GqaBhwideHisto.hh" #include "GeneratorsQA/GqaGamGamHist.hh" #include "GeneratorsQA/GqaAfkQedHisto.hh" #include "GeneratorsQA/GqaPhokharaHisto.hh" #include "GeneratorsQA/GqaTauHisto.hh" #include "GeneratorsQA/GqaAfkQedHisto.hh" #include "GeneratorsQA/GqaBrmBbbremHisto.hh" #include "GeneratorsQA/GqaSemileptonic.hh" //----------------------------------------------------------------------- // Local Macros, Typedefs, Structures, Unions and Forward Declarations -- //----------------------------------------------------------------------- // Since exceptions in fortran code often result in terminating the // program, trap them here: extern "C" { void myHandler(int) {assert(0);} } //---------------- // Constructors -- //---------------- AppUserBuild::AppUserBuild( AppFramework* theFramework ) : AppBuild( theFramework ) { add(new GenBuildEnv( "GenBuildEnv", "Build General Environment" )); add(new RooTupleEnv( "RooTupleEnv", "root" )); //add(new HbkTupleEnv( "HbkTupleEnv", "Hbook" )); add(new PdtInit("PdtInit", "PdtInit")); // initialize PDT table add(new CdbBdbInit("CdbBdbInit", "Initialize CDB" )); // Input module provided by RandControl: add(new RacTestInput); // Random control module: add(new RacRandomControl); // create generator modules and other needed stuff. GfiSequence(this); // Dump the generated events to a file: add(new StdHepAsciiDump("StdHepAsciiDump", "Write stdhep to a file")); // A module to test GenFwkInt: add (new GqaGfiTest("GqaGfiTest", "GqaGfiTest")); // Load BtaCandidates: add (new BtaLoadMcCandidates("BtaLoadMcCandidates", "Load BtaCandidates from StdHepMC")); // Analysis modules: //add (new GqaMCAnalysis("GqaMCAnalysis", "MC truth Beta analysis")); //add (new GqaBhwideHisto("GqaBhwideHisto", "MC truth analysis for bhwide")); //add (new GqaBrmBbbremHisto("GqaBrmBbbremHisto", "MC truth analysis for BrmBbbrem")); //add (new GqaBkqedHisto("GqaBkqedHisto", "MC truth analysis for bkqed")); //add (new GqaGamGamHist("GqaGamGamHist", "MC truth analysis for gamgam")); //add (new GqaAfkQedHisto("GqaAfkqedHisto", "MC truth analysis for AfkQed")); //add (new GqaPhokharaHisto("GqaPhokharaHisto", "Phokhara truth analysis")); add (new GqaTauHisto("GqaTauHisto", "Test for KK")); //add (new GqaAfkQedHisto("GqaAfkQedHisto", "MC truth analysis for AwfQed")); add (new GqaSemileptonic("GqaSemileptonic", "MC truth analysis for Semileptonic")); // Write to the event store: HepString environment(getenv("GQA_DATABASE")); #ifdef GQA_DATABASE BdbSequence(this); #endif // A module to check random seeds: add (new GqaRandCheck("GqaRandCheck", "test random seeds")); // Framework actions: theFramework->actions()->append(new AppActionSumTime); theFramework->actions()->append(new AppActionHistoDir); theFramework->actions()->append(new AppActionErrLogger); // Trap exceptions: signal(SIGFPE, myHandler); } //-------------- // Destructor -- //-------------- AppUserBuild::~AppUserBuild( ) { }