A++ » INC » AtlAppAnalysisTask

class AtlAppAnalysisTask: public AtlTask



Customised base class for A++ tasks

Description:

Tasks provide a folder-like structure for running analysis jobs, drawing plots etc. For a general description see the parent class TTask. The AtlAPPAnalysiTask class is especially designed for running A++ analysis jobs made of analysis selectors inheriting from AtlSelector (like the AtlExampleAnalysis). The common case is that the same analysis is run several times. First over DATA and afterwards over various Monte Carlo samples (signal and background). Often the MC samples are grouped into different processes (ttbar production, W+jets etc.) With the help of the AtlAppAnalysisTask class this probem can be easily solved.

Execution of analysis tasks is possible on a local machine (interactive running), on a batch system or on the GRID via the PANDA distributed analysis system. Details are described below.

Two things are needed for running analysis tasks:

  1. A task class inheriting from this class. Here, the implementation of the InitSelector() routine is mandatory. In this routine the analysis selector is created and configured, i.e. analysis cuts can be set (via the routine SetCut() and analysis tools (see class AtlAnalysisTool) can be added and configured as well (via SetToolCut()). The advantage of this method is that the cuts and configurations given here apply likewise to each of the analyses managed by this task. As an example, the analysis task for the single-top t-channel analysis is shown.
    Atl_tChannelTask.C:
     //____________________________________________________________________
     //
     // Single-top t-channel analysis task
     // 
     //  
     // Author: Oliver Maria Kind 
     // Update: $Id: AtlAppAnalysisTask.cxx,v 1.77 2017/08/08 11:32:07 kaphle Exp $
     // Copyright: 2009 (C) Oliver Maria Kind
     //
     #ifndef SINGLETOP_Atl_tChannelTask
     #define SINGLETOP_Atl_tChannelTask
     #ifndef ATLAS_AtlAppAnalysisTask
     #include 
     #endif
     #ifndef ATLAS_AtlOverlapRemoval
     #include 
     #endif
     #ifndef ATLAS_AtlSgTop_tChannelFinder
     #include 
     #endif
     #include 
     class Atl_tChannelTask : public AtlAppAnalysisTask {
        
     public:
         Atl_tChannelTask(const char* name, const char* title);
         virtual ~Atl_tChannelTask();
         virtual void InitSelector();
        
         ClassDef(Atl_tChannelTask,0) // Single-top t-channel analysis task
     };
     #endif
     #ifndef __CINT__
     ClassImp(Atl_tChannelTask);
     #endif
     //____________________________________________________________________
     Atl_tChannelTask::Atl_tChannelTask(const char* name,
     				   const char* title) :
         AtlAppAnalysisTask(name, title) {
         //
         // Normal constructor
         //
         SetInputTreeName("t_app");
         AddUserEnv("LIBSINGLETOP");
     }
     //____________________________________________________________________
     Atl_tChannelTask::~Atl_tChannelTask() {
         //
         // Default destructor
         //
     }
     //____________________________________________________________________
     void Atl_tChannelTask::InitSelector() {
         //
         // Initialise the t-channel analysis selector
         //
         // Create single-top t-channel analysis selector
         fSelector = new Atl_tChannelAnalysis(fOutputFileName->Data());
         // ============================    
         // Definition of selection cuts  
         // ============================
      
         //
         // Leptons
         // -------
         // Electrons
         SetCut("fSignalElectronAuthor",        "AtlEMShower::kHighPtElectron");// | AtlEMShower::kSoftElectron");
         SetCut("fSignalElectronIsEM",          "AtlEMShower::kElectronTight");
         SetCut("fSignalElectron_Pt_min",       "10.");
         SetCut("fSignalElectron_Pt_max",       "10.e10");
         SetCut("fSignalElectron_Eta_min",      "-2.5");
         SetCut("fSignalElectron_Eta_max",      "2.5");
         SetCut("fSignalElectron_EtCone20_max", "6.");
         ...
         // Add overlap removal procedure
         AtlOverlapRemoval *overlap = new AtlOverlapRemoval("overlap_removal",
      						       "Overlap Removal Single-Top t-Channel");
         SetToolCut("overlap_removal","fFindWorkingPoint", "kFALSE");
         SetToolCut("overlap_removal","fElDeltaRMax",      "0.2");
         ...
         fSelector->AddTool(overlap);
        
         // Add single-top t-channel kinematic fitter
         AtlSgTop_tChannelFinder *kinfit =
     	new AtlSgTop_tChannelFinder("sgtop_finder_kinfitter",
     	    "Single-Top t-Channel Reconstruction by KinFitter");
         SetToolCut("sgtop_finder_kinfitter", "fMode", "AtlSgTop_tChannelFinder::kKinFit");
         ...
         fSelector->AddTool(kinfit);
     }
     
  2. A task script which defines the task folder structure. Note that such a script can contain different taks, e.g. analysis and plotting. For example the script corresponding to the single-top task above, given below.
    task_tChannelAnalysis.C:
     // {
         gROOT->LoadMacro("Atl_tChannelTask.C+");
         // ===============================  
         // Luminosities of the MC samples
         // ===============================
         //-----------
         // single top
         //-----------
         Float_t Lumi_singletop_tchannel_enu = (19750/14.46);
         Float_t Lumi_singletop_tchannel_munu = (19999/14.46);
         Float_t Lumi_singletop_tchannel_taunu = (19500/14.46) ;
         ...
        
         // Main task
         TTask *tChannel = new TTask("tChannel", "Single-top t-Channel Analysis");
         //////////////////////////////////////////////////////////////////////
         //
         // Single-top production
         //
         //////////////////////////////////////////////////////////////////////
         TTask *sgtop = new TTask("single-top", "Single-top production");
         tChannel->Add(sgtop);
      
         // =========
         // t-channel
         // =========
         TTask *sgtop_tchannel = new TTask("t_channel", "t-channel");
         sgtop->Add(sgtop_tchannel);
         // e-nu
         Atl_tChannelTask *sgtop_tchannel_enu
     	= new Atl_tChannelTask("sgtop_tchannel_enu", "e-nu decay");
         sgtop_tchannel_enu->AddInputFiles("/dats3/atlas/mandry/user10.RoccoMandrysch.mc09_7TeV.108340.st_tchan_enu_McAtNlo_Jimmy.merge.AOD.e508_s765_s767_r1250_r1260.22.05.2010.app.test_2/user10.RoccoMandrysch.mc09_7TeV.108340.st_tchan_enu_McAtNlo_Jimmy.merge.AOD.e508_s765_s767_r1250_r1260.22.05.2010.app.test_2*.root");
         sgtop_tchannel_enu->SetOutputFile("$LIBSINGLETOP/hist/tChannelAnalysis/tchannel_enu.root");
         sgtop_tchannel->Add(sgtop_tchannel_enu);
      
         // mu-nu
         Atl_tChannelTask *sgtop_tchannel_munu
     	= new Atl_tChannelTask("sgtop_tchannel_munu", "mu-nu decay");
         sgtop_tchannel_munu->AddInputFiles("/dats3/atlas/mandry/user10.RoccoMandrysch.mc09_7TeV.108341.st_tchan_munu_McAtNlo_Jimmy.merge.AOD.e508_s765_s767_r1250_r1260.22.05.2010.app.test/user10.RoccoMandrysch.mc09_7TeV.108341.st_tchan_munu_McAtNlo_Jimmy.merge.AOD.e508_s765_s767_r1250_r1260.22.05.2010.app.test*.root");
         sgtop_tchannel_munu->SetOutputFile("$LIBSINGLETOP/hist/tChannelAnalysis/tchannel_munu.root");
         sgtop_tchannel->Add(sgtop_tchannel_munu);
      
         // tau-nu
         Atl_tChannelTask *sgtop_tchannel_taunu
     	= new Atl_tChannelTask("sgtop_tchannel_taunu", "tau-nu decay");
         sgtop_tchannel_taunu->AddInputFiles("/dats3/atlas/mandry/app_20_02_2010/user09.RoccoMandrysch.ganga.mc08.108342.st_tchan_taunu_McAtNlo_Jimmy.merge.AOD.e405_s495_s520_r808_r838.app.test_20.02.2010.WUPPERTALPROD_SCRATCHDISK/user09.RoccoMandrysch.ganga.mc08.108342.st_tchan_taunu_McAtNlo_Jimmy.merge.AOD.e405_s495_s520_r808_r838.app.test_*.root");
         sgtop_tchannel_taunu->AddInputFiles("/dats3/atlas/mandry/user10.RoccoMandrysch.mc09_7TeV.108342.st_tchan_taunu_McAtNlo_Jimmy.merge.AOD.e508_s765_s767_r1250_r1260.22.05.2010.app.test/user10.RoccoMandrysch.mc09_7TeV.108342.st_tchan_taunu_McAtNlo_Jimmy.merge.AOD.e508_s765_s767_r1250_r1260.22.05.2010.app.test*.root");
         sgtop_tchannel_taunu->SetOutputFile("$LIBSINGLETOP/hist/tChannelAnalysis/tchannel_taunu.root");
         sgtop_tchannel->Add(sgtop_tchannel_taunu);
         // =========
         // s-channel
         // =========
         TTask *sgtop_schannel = new TTask("s_channel", "s-channel");
         sgtop->Add(sgtop_schannel);
      
         // e-nu
         Atl_tChannelTask *sgtop_schannel_enu
     	= new Atl_tChannelTask("sgtop_schannel_enu", "e-nu decay");
         sgtop_schannel_enu->AddInputFiles("/dats3/atlas/mandry/user10.RoccoMandrysch.mc09_7TeV.108343.st_schan_enu_McAtNlo_Jimmy.merge.AOD.e534_s765_s767_r1250_r1260.22.05.2010.app.test/user10.RoccoMandrysch.mc09_7TeV.108343.st_schan_enu_McAtNlo_Jimmy.merge.AOD.e534_s765_s767_r1250_r1260.22.05.2010.app.test*.root");
         sgtop_schannel_enu->SetOutputFile("$LIBSINGLETOP/hist/tChannelAnalysis/schannel_enu.root");
         sgtop_schannel->Add(sgtop_schannel_enu);
         ...  
        
         //////////////////////////////////////////////////////////////////////
         //
         // W + jets production
         //
         //////////////////////////////////////////////////////////////////////
         TTask *WplusJets = new TTask("WplusJets", "W + Jets production");
         tChannel->Add(WplusJets);
      
         // ============
         // e-nu channel
         // ============
         TTask *WplusJets_enu = new TTask("WplusJets_enu", "W+Jets, enu channel");
         WplusJets->Add(WplusJets_enu);
      
         // Np0
         Atl_tChannelTask *WplusJets_enu_Np0
     	= new Atl_tChannelTask("WplusJets_enu_Np0", "W+Jets, enu channel, Np0");
         WplusJets_enu_Np0->AddInputFiles("/dats5/atlas/mandry/user10.RoccoMandrysch.mc09_7TeV.107680.AlpgenJimmyWenuNp0_pt20.merge.AOD.e511_s765_s767_r1250_r1260.22.05.2010.app.test_2/user10.RoccoMandrysch.mc09_7TeV.107680.AlpgenJimmyWenuNp0_pt20.merge.AOD.e511_s765_s767_r1250_r1260.22.05.2010.app.test_2*.root");   
         WplusJets_enu_Np0->SetOutputFile("$LIBSINGLETOP/hist/tChannelAnalysis/Wjets_enu_np0.root");
         WplusJets_enu->Add(WplusJets_enu_Np0);
         ...
         //////////////////////////////////////////////////////////////////////
         //
         // DATA
         //
         //////////////////////////////////////////////////////////////////////
         // L1Calo Trigger Stream (new)
         Atl_tChannelTask *data_l1calo = new Atl_tChannelTask("data-l1-calo", "Data from L1Calo trigger stream");
         data_l1calo->AddInputFiles("/dats2/atlas/mandry/user10.RoccoMandrysch.data10_7TeV.00154813.physics_L1Calo.merge.AOD.f255_m471.22.05.2010.app.test/user10.RoccoMandrysch.data10_7TeV.00154813.physics_L1Calo.merge.AOD.f255_m471.22.05.2010.app.test*.root");
         data_l1calo->SetOutputFile("$LIBSINGLETOP/hist/tChannelAnalysis/data_l1calo.root");
         tChannel->Add(data_l1calo);
         ...  
         //////////////////////////////////////////////////////////////////////
         //
         // Draw all MC-DATA plots
         //
         //////////////////////////////////////////////////////////////////////
         HepDataMCPlotter *pl_sgtop = new HepDataMCPlotter("DATA-MC plotter", "Create all Data-MC plots");
         pl_sgtop->SetWorkingDir("$LIBSINGLETOP/hist/tChannelAnalysis/plots_datamc/");
         pl_sgtop->SetLumiDATA(0.003260);
         // Enable/disable grouping of histograms
         Bool_t group_histograms = kTRUE;
         // ==========
         // Single-top
         // ==========
         //Set grouping of histograms
         pl_sgtop->SetGroupHistograms(group_histograms);
         pl_sgtop->AddMCFolder("sgtop", "sgtop incl", kRed);
         pl_sgtop->AddMCSample("sgtop","$LIBSINGLETOP/hist/tChannelAnalysis/tchannel_enu.root",
                         "MC single-top t-channel e#nu", Lumi_singletop_tchannel_enu, kRed);
         pl_sgtop->AddMCSample("sgtop","$LIBSINGLETOP/hist/tChannelAnalysis/tchannel_munu.root",
                         "MC single-top t-channel #mu#nu", Lumi_singletop_tchannel_munu, kRed-4);
         pl_sgtop->AddMCSample("sgtop","$LIBSINGLETOP/hist/tChannelAnalysis/tchannel_taunu.root",
                         "MC single-top t-channel #tau#nu", Lumi_singletop_tchannel_taunu, kRed-7);
         ...
         tChannel->Add(pl_sgtop);
         // Open task folder in Root's TObject browser
         gROOT->GetListOfTasks()->Add(tChannel);
         gROOT->GetListOfBrowsables()->Add(tChannel);
         new TBrowser;
     }
     
Selection cuts are defined by calling the member function SetCut().

Job submission (at HU cluster):

Use SetBatchNodeAll(), SetBatchNode() or SetBatchNodeAutomatic() to set the type of batch job submssion. For details see AtlTask.cxx.

Project libraries:

User-defined project libraries beside the standard libraries libHepEvent, libAtlasRun, ... must be made known to the task object. The environment variable containing the path to each such library has to be given by the AddUserEnv() function in the ctor of the derived class, eg
    Atl_tChannelTask::Atl_tChannelTask(const char* name,
                                    const char* title) :
        AtlAppAnalysisTask(name, title) {
        //
        // Normal constructor
        //
        SetInputTreeName("t_app");
        AddUserEnv("LIBSINGLETOP");
    }
 

Entry lists:

You can apply a TEntryList onto your chain, previously created by the AtlSelector. Your chain and the trees have to be the same. Just use task->AddInputEntryLists("elist.root") and set task->SetLoadEntryList(1) to get the list applied to your chain. Your analysis will now run only on the events stored in this list. If the flag fUseAntiList is set, the analysis will run on events which are not stored in the lists (events stored in the lists will be skipped).

 Author: Oliver Maria Kind <mailto: kind@mail.desy.de>
 Update: $Id: AtlAppAnalysisTask.cxx,v 1.77 2017/08/08 11:32:07 kaphle Exp $
 Copyright: 2009 (C) Oliver Maria Kind

Function Members (Methods)

public:
virtual~AtlAppAnalysisTask()
virtual voidTTask::Abort()MENU
voidTObject::AbstractMethod(const char* method) const
virtual voidTTask::Add(TTask* task)
voidAddCuts(TList* cuts)
voidAtlTask::AddInputEntryLists(const char* InputFile)
voidAtlTask::AddInputFiles(const char* InputFiles)
voidAddSubselectionCuts(TList* subselectionCuts)
voidAddTool(AtlAnalysisTool* tool)
voidAddToolCuts(TList* toolcuts)
voidAddTools(TList* tools)
voidAddUserEnv(const char* env)MENU
voidAddUserEnvs(TList* envs)
virtual voidTObject::AppendPad(Option_t* option = "")
AtlAppAnalysisTask(const AtlAppAnalysisTask&)
AtlAppAnalysisTask(const char* name, const char* title)
virtual voidTTask::Browse(TBrowser* b)
voidCheckInputChain()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTTask::CleanTasks()
virtual voidTTask::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTTask::Continue()MENU
virtual voidTNamed::Copy(TObject& named) const
static voidAtlTask::CopyFolder(TDirectory* SrcDir, TDirectory* DestDir, Float_t scale)
virtual voidCreateGridRunScript()
virtual voidAtlTask::CreateJobHome()
voidAtlTask::CreateLogFilePath()
virtual voidCreateNAFBatchRootScript(Option_t* option)
virtual voidCreateNAFBatchRunScript()
voidAtlTask::CreateOutFilePath()
virtual voidCreateRootScript(Option_t* option)
virtual voidCreateRunScript(Option_t* option = "")
voidAtlTask::CreateRunScriptPath()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidAtlTask::Exec(Option_t* option = "")
virtual Bool_tExecBatchJob(Option_t* option)
virtual voidExecGridJob(Option_t* option)
virtual voidExecInteractiveJob(Option_t* option)
virtual voidExecNAFBatchJob(Option_t* option)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidAtlTask::ExecuteTask(Option_t* option = "")MENU
virtual voidTTask::ExecuteTasks(Option_t* option)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
AtlCut*FindCut(const char* var)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
AtlToolCut*FindToolCut(const char* tool, const char* var)
Bool_tAtlTask::GetBatchJob()
Bool_tAtlTask::GetBatchNodeAll()
Bool_tAtlTask::GetBatchNodeAutomatic()
Char_tAtlTask::GetBatchNodeFromPath(const char* path)
Int_tTTask::GetBreakin() const
Int_tTTask::GetBreakout() const
Bool_tGetCtrlPlots()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tAtlTask::GetGridJob()
virtual const char*TObject::GetIconName() const
Bool_tAtlTask::GetInteractiveJob()
TList*GetListOfCuts()
TList*GetListOfSubselectionCuts()
TList*TTask::GetListOfTasks() const
TList*GetListOfToolCuts()
Bool_tGetLoadEntryList() const
Bool_tAtlTask::GetLogFile()
Bool_tAtlTask::GetNAFBatchJob()
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Bool_tGetPrintEvent() const
Bool_tGetPrintObjectTable() const
TString*GetSelector()
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Bool_tGetUseAntiList() const
Bool_tGetWriteEntryList() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidInitSelector()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTTask::IsActive() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTTask::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTTask::ls(Option_t* option = "*") constMENU
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AtlAppAnalysisTask&operator=(const AtlAppAnalysisTask&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") constMENU
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTTask::SetActive(Bool_t active = kTRUE)TOGGLE
voidSetAthenaTag(TString* AthenaTag)
virtual voidAtlTask::SetBatchJob(Bool_t BatchJob)TOGGLE
voidAtlTask::SetBatchNode(const char* BatchNode)MENU
voidAtlTask::SetBatchNodeAll(Bool_t BatchNodeAll)TOGGLE
voidAtlTask::SetBatchNodeAutomatic(Bool_t BatchNodeAutomatic)TOGGLE
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTTask::SetBreakin(Int_t breakin = 1)TOGGLE
voidTTask::SetBreakout(Int_t breakout = 1)TOGGLE
virtual voidSetCtrlPlots(Bool_t CtrlPlots)TOGGLE
voidSetCut(const char* var, const char* val)
voidAtlTask::SetDebug(Int_t level)
voidAtlTask::SetDebugBuild(Int_t level)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEvtReader(const char* readerClass, const char* readerArgs = 0)
voidSetExcludedSites(TString* ExcludedSites)
voidAtlTask::SetFirstEntry(Int_t FirstEntry)MENU
voidSetGridAnalysisName(TString* GridAnalysisName)
voidAtlTask::SetGridCmtVersion(const char* CmtVersion)MENU
virtual voidAtlTask::SetGridJob(Bool_t GridJob)TOGGLE
voidAtlTask::SetGridRootVersion(const char* RootVersion)MENU
voidSetGridSuffix(TString* GridSuffix)
voidSetGridUser(TString* GridUser)
voidAtlTask::SetGridUserName(const char* UserName)MENU
voidSetInputTreeName(const char* TreeName)
virtual voidAtlTask::SetInteractiveJob(Bool_t InteractiveJob)TOGGLE
voidAtlTask::SetJobHome(const char* JobHome)MENU
voidSetLoadEntryList(Bool_t LoadEntryList)TOGGLE
voidAtlTask::SetLogFile(Bool_t LogFile)TOGGLE
virtual voidAtlTask::SetNAFBatchJob(Bool_t NAFBatchJob)TOGGLE
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidAtlTask::SetNEvents(Int_t NEvents)MENU
static voidTObject::SetObjectStat(Bool_t stat)
voidAtlTask::SetOutputFile(const char* OutputFile)
voidAtlTask::SetOutputTree(const char* name, const char* title)MENU
voidSetPrintEvent(Bool_t PrintEvent)TOGGLE
voidSetPrintObjectTable(Bool_t PrintObjectTable)TOGGLE
voidSetSelector(const char* Selector)
voidSetSingleSite(TString* SingleSite)
voidAtlTask::SetTempOutputFile(const char* OutputFile)
voidAtlTask::SetTempOutputPath(const char* OutputPath)
virtual voidTNamed::SetTitle(const char* title = "")MENU
voidSetToolCut(const char* tool, const char* var, const char* val)
voidSetToolVariable(const char* tool, const char* var, const char* val)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetUseAntiList(Bool_t UseAntiList)TOGGLE
voidSetWriteEntryList(Bool_t WriteEntryList)TOGGLE
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual Bool_tAtlTask::SubmitBatchJob()
virtual voidAtlTask::SubmitGridJob()
virtual voidAtlTask::SubmitNAFBatchJob()
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual Bool_tAtlTask::WriteEnvSetup(ofstream& out) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
TDataMember*FindDataMember(TClass* cl, const char* DMName) const

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
Bool_tTTask::fActivetrue if task is active
TString*fAthenaTagAthena version used for grid analysis
Bool_tAtlTask::fBatchJobBatch job execution
TStringAtlTask::fBatchNodeNode on which to run the job
Bool_tAtlTask::fBatchNodeAllSubmit batch job to all nodes
Bool_tAtlTask::fBatchNodeAutomaticSubmit batch job to node automatically set
Int_tTTask::fBreakin=1 if a break point set at task extry
Int_tTTask::fBreakout=1 if a break point set at task exit
Bool_tfCtrlPlotsSwitch on/off filling of ctrl plots
Int_tAtlTask::fDebugDebug flag for derived tasks
Int_tAtlTask::fDebugBuildDebug flag for derived tasks (during build)
TString*fExcludedSitesExcluded grid sites (separated by comma)
Long64_tAtlTask::fFirstEntrySkip FirstEntry-1 events
TString*fGridAnalysisNameName of analysis run on the grid
TString*AtlTask::fGridCmtVersionCmt version for Grid submission
Bool_tAtlTask::fGridJobGrid job execution
TString*AtlTask::fGridRootVersionRoot version for Grid submission
TString*fGridSuffixSuffix for naming of grid analysis files
TString*AtlTask::fGridSuffixSuffix for grid dataset names
TString*fGridUserGrid user name
TString*AtlTask::fGridUserNameGrid user name
Bool_tTTask::fHasExecutedTrue if task has executed
TList*AtlTask::fInputEntryListsInput entry lists file names
TList*AtlTask::fInputFilesInput file names
TString*fInputTreeNameName of the input tree
Bool_tAtlTask::fInteractiveJobInteractive job execution
Bool_tAtlTask::fIsTestIs test job ?
TString*AtlTask::fJobHomeJob working directory
TList*fListOfCutsList of cut objects
TList*fListOfSubselectionCutsList of subselection objects
TList*fListOfToolCutsList of cuts for analysis tools
TList*fListOfToolsList of tools used in the analysis
TList*fListOfUserEnvsList of user environment variables
Bool_tfLoadEntryListSwitch for reading from entry list
Bool_tAtlTask::fLogFileWrite output to logfile
TString*AtlTask::fLogFilePathLogfile path
Bool_tAtlTask::fNAFBatchJobNAF Batch job execution
Long64_tAtlTask::fNEventsNo. of events to process
TStringTNamed::fNameobject identifier
Char_tAtlTask::fNodeNode on which to run the jpb
TStringTTask::fOptionOption specified in ExecuteTask
TString*AtlTask::fOutputFileNameName of the output file
TNamed*AtlTask::fOutputTreeNameName and title of the output tree (if any)
Bool_tfPrintEventSwitch for printing every event
Bool_tfPrintObjectTableSwitch for printing Root's object table
TString*fReaderArgsadditional arguments to be passed to the reader's constructor
TString*fReaderClassuser-defined reader class
TString*fRootScriptPath to Root script used for job submission
TString*AtlTask::fRunScriptRunscript path
TString*fSelectorName of Analysis selector
TString*fSingleSiteSingle site for job
TList*TTask::fTasksList of Tasks
TString*AtlTask::fTempLogFilePathTemporarily logfile path
TString*AtlTask::fTempOutputFileNameTemporarily output file name
TString*AtlTask::fTempOutputPathTemporarily output path (must start with "/")
TStringTNamed::fTitleobject title
Bool_tfUseAntiListSwitch for excluding events stored in an entry list
Bool_tfWriteEntryListSwitch for writing an entry list
static TTask*TTask::fgBeginTaskpointer to task initiator
static TTask*TTask::fgBreakPointpointer to current break point

Class Charts

Inheritance Chart:
TObject
TNamed
TTask
AtlTask
AtlAppAnalysisTask
AtlBDTAnalysisTask

Function documentation

AtlAppAnalysisTask(const char* name, const char* title)
 Default constructor

~AtlAppAnalysisTask()
 Default destructor

void SetInputTreeName(const char* TreeName)
 Set input tree name

void SetSelector(const char* Selector)
 Set Analysis Selector name

void ExecInteractiveJob(Option_t* option)
 Interactive execution

 The interactive execution is done via an intermediate step of
 an analysis run .C script in the same manner as for batch
 jobs. Thus only a single way of job execution has to be
 defined. In particular all selection cuts are set in the same
 way.

Bool_t ExecBatchJob(Option_t* option)
 Batch job submission

 Returns kFALSE in case of error.

void ExecNAFBatchJob(Option_t* option)
 Batch job submission

void ExecGridJob(Option_t* option)
 Grid job submission

void CreateRootScript(Option_t* option)
 Create Root script for A++ analysis job execution

void CreateNAFBatchRootScript(Option_t* option)
 Create Root script for A++ analysis job execution

void CreateRunScript(Option_t* option = "")
 Create run script for job submission

void CreateNAFBatchRunScript()
 Create run script for job submission

void CreateGridRunScript()
 Create run script for grid job submission

void CheckInputChain()
 Check the input chain

void SetCut(const char* var, const char* val)
 Set cut value for analysis selector.

 The variable name must be a valid data member of the underlying
 analysis selector class (see AtlSelector). This function can
 also be used in order to change the value for an already
 existing cut

void SetToolCut(const char* tool, const char* var, const char* val)
 Set cut value for an A++ selector tool.

 The variable name must be a valid data member of the given A++
 analysis tool class (see AtlAnalysisTool). This function can
 also be used in order to change the value for an already
 existing cut

 Cut already in list ? Otherwise add new object
AtlToolCut* FindToolCut(const char* tool, const char* var)
 Find A++ analysis tool cut

AtlCut* FindCut(const char* var)
 Find A++ analysis selector cut

void AddUserEnv(const char* env)
 Add user-defined environment variable for shared library search
 paths

void Print(Option_t* option = "") const
 Print config

void SetEvtReader(const char* readerClass, const char* readerArgs = 0)
TDataMember* FindDataMember(TClass* cl, const char* DMName) const
 Find data nember of given namen in the given class. If it's not
 found inside the given class, all parent classes are searched
 recursively.

 Test given class
AtlAppAnalysisTask(const char* name, const char* title)
void InitSelector()
{;}
void AddCuts(TList* cuts)
{ fListOfCuts->AddAll(cuts); }
void AddSubselectionCuts(TList* subselectionCuts)
{ fListOfSubselectionCuts->AddAll(subselectionCuts); }
void AddTools(TList* tools)
{ fListOfTools->AddAll(tools); }
void AddToolCuts(TList* toolcuts)
{ fListOfToolCuts->AddAll(toolcuts); }
void AddUserEnvs(TList* envs)
void AddTool(AtlAnalysisTool* tool)
 Add analysis tool
Bool_t GetCtrlPlots()
{ return fCtrlPlots; }
void SetCtrlPlots(Bool_t CtrlPlots)
{ fCtrlPlots = CtrlPlots; }
TString* GetSelector()
{ return fSelector; }
TList* GetListOfCuts()
{ return fListOfCuts; }
TList* GetListOfSubselectionCuts()
TList* GetListOfToolCuts()
{ return fListOfToolCuts; }
Bool_t GetWriteEntryList() const
{ return fWriteEntryList; }
Bool_t GetLoadEntryList() const
{ return fLoadEntryList; }
Bool_t GetUseAntiList() const
{ return fUseAntiList; }
Bool_t GetPrintEvent() const
{ return fPrintEvent; }
Bool_t GetPrintObjectTable() const
{ return fPrintObjectTable; }
void SetToolVariable(const char* tool, const char* var, const char* val)
 Set public data member of a tool (same as SetToolCut())


 CAUTION!

 First argument "tool" must be the class name of the tool!

void SetWriteEntryList(Bool_t WriteEntryList)
{ fWriteEntryList = WriteEntryList; }
void SetLoadEntryList(Bool_t LoadEntryList)
{ fLoadEntryList = LoadEntryList; }
void SetUseAntiList(Bool_t UseAntiList)
{ fUseAntiList = UseAntiList; }
void SetPrintEvent(Bool_t PrintEvent)
{ fPrintEvent = PrintEvent; }
void SetPrintObjectTable(Bool_t PrintObjectTable)
{ fPrintObjectTable = PrintObjectTable; }
void SetGridSuffix(TString* GridSuffix)
{ fGridSuffix = GridSuffix; }
void SetGridUser(TString* GridUser)
{ fGridUser = GridUser; }
void SetGridAnalysisName(TString* GridAnalysisName)
{ fGridAnalysisName = GridAnalysisName; }
void SetAthenaTag(TString* AthenaTag)
{ fAthenaTag = AthenaTag; }
void SetExcludedSites(TString* ExcludedSites)
{ fExcludedSites = ExcludedSites; }
void SetSingleSite(TString* SingleSite)
{ fSingleSite = SingleSite; }