Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

WCSimNtupleFactory Class Reference

#include "WCSimNtupleFactory.hh"

List of all members.

Public Member Functions

WCSimNtupleMakeNtuple (const char *name="default")

Static Public Member Functions

static WCSimNtupleFactoryInstance ()

Private Member Functions

 WCSimNtupleFactory ()
 ~WCSimNtupleFactory ()

Private Attributes

WCSimNtuplefRecoNtuple
WCSimNtuplefVertexNtuple
WCSimNtuplefVertexSeedNtuple

Detailed Description

Definition at line 8 of file WCSimNtupleFactory.hh.


Constructor & Destructor Documentation

WCSimNtupleFactory::WCSimNtupleFactory (  )  [private]

Definition at line 73 of file WCSimNtupleFactory.cc.

References fRecoNtuple, fVertexNtuple, and fVertexSeedNtuple.

{
  // list of possible displays
  fRecoNtuple = 0;
  fVertexNtuple = 0;
  fVertexSeedNtuple = 0;
}

WCSimNtupleFactory::~WCSimNtupleFactory (  )  [private]

Definition at line 81 of file WCSimNtupleFactory.cc.

References fRecoNtuple, fVertexNtuple, and fVertexSeedNtuple.


Member Function Documentation

WCSimNtupleFactory * WCSimNtupleFactory::Instance (  )  [static]

Definition at line 16 of file WCSimNtupleFactory.cc.

Referenced by WCSimNtupleWriter::BuildNtuple().

{
  if(!fgNtupleFactory){
    fgNtupleFactory = new WCSimNtupleFactory();
  }

  // die if finder hasn't actually been created
  if(!fgNtupleFactory){
    assert(fgNtupleFactory);
  }

  // can do re-setting here
  if(fgNtupleFactory){

  }

  return fgNtupleFactory;
}

WCSimNtuple * WCSimNtupleFactory::MakeNtuple ( const char *  name = "default"  ) 

Definition at line 35 of file WCSimNtupleFactory.cc.

References fRecoNtuple, fVertexNtuple, and fVertexSeedNtuple.

Referenced by WCSimNtupleWriter::BuildNtuple().

{
  std::cout << " *** WCSimNtupleFactory::MakeNtuple(...) *** " << std::endl;

  if( strcmp(name,"Reco")==0 ) {
    if( fRecoNtuple==0 ){
      std::cout << "   Building Ntuple: " << name << std::endl;
      fRecoNtuple = new WCSimRecoNtuple();
    }
    std::cout << "   Returning Ntuple: " << name << std::endl;
    return fRecoNtuple;
  }

  else if( strcmp(name,"Vertex")==0 ) { 
    if( fVertexNtuple==0 ){
      std::cout << "   Building Ntuple: " << name << std::endl;
      fVertexNtuple = new WCSimVertexNtuple();
    }
    std::cout << "   Returning Ntuple: " << name << std::endl;
    return fVertexNtuple;
  }

  else if( strcmp(name,"VertexSeed")==0 ) { 
    if( fVertexSeedNtuple==0 ){
      std::cout << "   Building Ntuple: " << name << std::endl;
      fVertexSeedNtuple = new WCSimVertexSeedNtuple();
    }
    std::cout << "   Returning Ntuple: " << name << std::endl;
    return fVertexSeedNtuple;
  }

  else {
    std::cout << "   <warning> unknown ntuple: " << name << std::endl;
  }

  return 0;
}


Member Data Documentation

Definition at line 21 of file WCSimNtupleFactory.hh.

Referenced by MakeNtuple(), WCSimNtupleFactory(), and ~WCSimNtupleFactory().

Definition at line 22 of file WCSimNtupleFactory.hh.

Referenced by MakeNtuple(), WCSimNtupleFactory(), and ~WCSimNtupleFactory().

Definition at line 23 of file WCSimNtupleFactory.hh.

Referenced by MakeNtuple(), WCSimNtupleFactory(), and ~WCSimNtupleFactory().


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