Public Member Functions | Public Attributes | List of all members
Acclaim::SumTreeReductionSelector Class Reference

An almost trivial proof of concept, for Tree merging with PROOF. More...

#include <SumTreeReductionSelector.h>

Public Member Functions

 SumTreeReductionSelector (const char *outFileName="reduced", const char *reducedSumTreeName="sumTree")
 
virtual void Begin (TTree *tree)
 
virtual void SlaveBegin (TTree *tree)
 
virtual Bool_t Process (Long64_t entry)
 Reads the AnitaEventSummary TTree entry and sets the fSum pointer. Cycles through the fCuts, applying each TCut in turn. More...
 
virtual void SlaveTerminate ()
 
virtual void Terminate ()
 
 ClassDef (SumTreeReductionSelector, 0)
 
- Public Member Functions inherited from Acclaim::SummarySelector
 SummarySelector (const char *sumBranchName="sum")
 Set this to true to generate and fill fDemoHist. More...
 
virtual ~SummarySelector ()
 
void addCut (const TCut *analysisCut)
 
virtual void Init (TTree *tree)
 
virtual Bool_t Notify ()
 
virtual Int_t Version () const
 From ROOT.
 
virtual Int_t GetEntry (Long64_t entry, Int_t getall=0)
 From ROOT, Gets the local tree entry.
 
virtual void SetOption (const char *option)
 From ROOT, set the option.
 
virtual void SetObject (TObject *obj)
 Set the current object, not sure what this does.
 
virtual void SetInputList (TList *input)
 Set the input list, not sure what this does.
 
virtual TList * GetOutputList () const
 Used to combine the objects.
 

Public Attributes

AnitaEventSummaryfOutSum
 
TTree * fOutTree
 
TProofOutputFile * fProofOutFile
 
TFile * fOut
 
TNamed fOutFileName
 
TNamed fReducedSumTreeName
 
- Public Attributes inherited from Acclaim::SummarySelector
TTree * fChain
 
Int_t fDirectionFormulaIndex
 The analyzed TTree or TChain.
 
TList * fCuts
 Which TTree formula determines the peak direction?
 
TList * fCutFormulas
 A list of TCut objects, for event selection (none means selecting all)
 
Int_t fMaxNdata
 A list of TTreeFormula objects, derived from the TCut objects.
 
std::vector< std::vector< Int_t > > fCutReturns
 Maximum size of the cut.
 
std::vector< Int_t > fCumulativeCutReturns
 Stores the results as the cuts are processed in sequence.
 
TTreeFormula * fDemoForm
 Stores the AND of cut results per iteration processed in sequence. More...
 
TH1D * fDemoHist
 TTree formula produced if making the demonstration histogram.
 
bool fDoDemoHist
 A histogram of peak[1][0].value.
 

Detailed Description

An almost trivial proof of concept, for Tree merging with PROOF.

May at some point be used to reduce to trees for clustering

Definition at line 17 of file SumTreeReductionSelector.h.

Inheritance diagram for Acclaim::SumTreeReductionSelector:
Inheritance graph
[legend]
Collaboration diagram for Acclaim::SumTreeReductionSelector:
Collaboration graph
[legend]

Constructor & Destructor Documentation

Acclaim::SumTreeReductionSelector::SumTreeReductionSelector ( const char *  outFileName = "reduced",
const char *  reducedSumTreeName = "sumTree" 
)

Default constructor

Parameters
outFileNameis the name to give the file containing the combined trees

Definition at line 9 of file SumTreeReductionSelector.cxx.

Member Function Documentation

void Acclaim::SumTreeReductionSelector::Begin ( TTree *  tree)
virtual

The Begin() function is called at the start of the query. When running with PROOF Begin() is only called on the client. The tree argument is deprecated (on PROOF 0 is passed).

Reimplemented from Acclaim::SummarySelector.

Definition at line 15 of file SumTreeReductionSelector.cxx.

Bool_t Acclaim::SumTreeReductionSelector::Process ( Long64_t  entry)
virtual

Reads the AnitaEventSummary TTree entry and sets the fSum pointer. Cycles through the fCuts, applying each TCut in turn.

The Process() function is called for each entry in the tree (or possibly keyed object in the case of PROOF) to be processed. The entry argument specifies which entry in the currently loaded tree is to be processed. When processing keyed objects with PROOF, the object is already loaded and is available via the fObject pointer.

This function should contain the "body" of the analysis. It can contain simple or elaborate selection criteria, run algorithms on the data of the event and typically fill histograms.

The processing can be stopped by calling Abort().

Use fStatus to set the return value of TTree::Process().

Parameters
entryin the currently loaded tree
Returns
true if the entry passes all the fCuts values

Reimplemented from Acclaim::SummarySelector.

Definition at line 43 of file SumTreeReductionSelector.cxx.

void Acclaim::SumTreeReductionSelector::SlaveBegin ( TTree *  tree)
virtual

The SlaveBegin() function is called after the Begin() function. When running with PROOF SlaveBegin() is called on each slave server. The tree argument is deprecated (on PROOF 0 is passed).

Reimplemented from Acclaim::SummarySelector.

Definition at line 24 of file SumTreeReductionSelector.cxx.

void Acclaim::SumTreeReductionSelector::SlaveTerminate ( )
virtual

The SlaveTerminate() function is called after all entries or objects have been processed. When running with PROOF SlaveTerminate() is called on each slave server.

Reimplemented from Acclaim::SummarySelector.

Definition at line 53 of file SumTreeReductionSelector.cxx.

void Acclaim::SumTreeReductionSelector::Terminate ( )
virtual

The Terminate() function is the last function to be called during a query. It always runs on the client, it can be used to present the results graphically or save the results to file.

Reimplemented from Acclaim::SummarySelector.

Definition at line 62 of file SumTreeReductionSelector.cxx.


The documentation for this class was generated from the following files: