Annotated AppUserBuild.cc
//--------------------------------------------------------------------------
// File and Version Information:
// $Id: AppUserBuildBase.cc,v 1.1 2005/08/29 19:27:10 jtinslay Exp $
//
// Description:
// Class AppUserBuildBase implementation for the BetaMiniUser package.
//
// Environment:
// Software developed for the BaBar Detector at the SLAC B-Factory.
//
// Author List:
// Bill Lockman
// Akbar Mokhtarani
// Jane Tinslay Move common database technology neutral
// sequences and modules here
// from AppUserBuild
// Sheila Mclachlin Workbook version
//
// Copyright Information:
// Copyright (C) 2002 UC Santa Cruz, LBL
//
//------------------------------------------------------------------------
#include "BaBar/BaBar.hh"
//-----------------------
// This Class's Header --
//-----------------------
#include "BetaMiniUser/AppUserBuildBase.hh"
//-------------------------------
// Collaborating Class Headers --
//-------------------------------
C++ syntax and code organization requires that
the header file (.hh file) for any externally-defined code needs to be
#included in the implementation file. These are the header file
for BetaMiniUser's modules.
#include "BetaMiniQA/BetaMiniQaSequence.hh"
The BetaMiniUser package comes with
four example analysis modules: MyMiniAnalysis,
MyDstarAnalysis, MyK0Analysis, and MyTimePointAnalysis.
You are using MyMiniAnalysis, so you don't need the others.
However, instead of removing them from AppUserBuild.cc, it
is better to disable them at run time in a tcl file. That
way, if you decide to use a different example later,
all you have to do is change the tcl files --- you
do not have to relink or recompile your code.
#include "BetaMiniUser/MyDstarAnalysis.hh"
#include "BetaMiniUser/MyK0Analysis.hh"
Now the header file for MyMiniAnalysis.
Once snippet.tcl is finished its initial setup, it passes
job control to this module.
#include "BetaMiniUser/MyMiniAnalysis.hh"
Next comes the header file for the
NTrkExample module. This module does not come with the
BetaMiniUser package. It is the module that you added
yourself when you copied files from the NewExamples
directory in the Quicktour.
#include "BetaMiniUser/NTrkExample.hh"
#include "BetaMiniUser/MyReadList.hh"
#include "BetaMiniUser/MyTimePointAnalysis.hh"
Now, the header files for some basic physics sequences.
#include "BetaMiniSequences/BetaMiniActions.hh"
#include "BetaMiniSequences/BetaMiniPhysicsSequence.hh"
#include "BetaMiniSequences/BetaMiniSequence.hh"
#include "BetaMiniSequences/BetaMiniWriteSequence.hh"
#include "BetaPid/PidPionMicroSequence.hh"
#include "Framework/AppFramework.hh"
#include "Framework/AppUserBuild.hh"
#include "TagModules/TagInspector.hh"
#include "UsrTools/UsrMakerTools.hh"
void AppUserBuildBase(AppUserBuild* theBuild, AppFramework* theFramework)
{
The next lines create an object of each module
class, add these objects to the framework with the framework add command.
The two arguments of the module, in quotes, are the name and description
you will see from a 'module list' command in the framework.
The syntax here is a bit different than the syntax used in
most AppUserBuild files. That is because BetaMiniUser uses
three AppUserBuild files, and the coding rules for this file -
AppUserBuildBase.cc - are a bit different than for an ordinary
AppUserBuild file.
To see the more common AppUserBuild.cc syntax, you can look at
AppUserBuild from analysis-26, when BetaMiniUser used only one AppUserBuild file.
//Core sequence
BetaMiniSequence(theBuild);
BetaMiniActions(theFramework);
BetaMiniQaSequence(theBuild);
BetaMiniPhysicsSequence(theBuild);
//Reskimming sequences and modules ( De Nardo May 12 2004 )
BetaMiniWriteSequence(theBuild);
UsrMakerTools(theBuild); // add modules for writing user data
//Analysis modules
theBuild->add(new MyMiniAnalysis("MyMiniAnalysis", "MyMiniAnalysis"));
theBuild->add(new MyDstarAnalysis("MyDstarAnalysis", "Dstar analysis module"));
theBuild->add(new MyK0Analysis( "MyK0Analysis", "K0 analysis module"));
theBuild->add(new NTrkExample("NTrkExample", "Workbook example module"));
PidPionMicroSequence(theBuild);
theBuild->add(new MyTimePointAnalysis());
theBuild->add (new TagInspector("TagInspector","A module to histogram tag bits"));
theBuild->add (new MyReadList("MyReadList", "read a list of composite candidates"));
}
Return to Workbook Beta page
|