BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
//____________________________________________________________________
// 
// This package can process the raw Tpc data (BrTpcSequence) to
// produce tpc hits (BrTpcHit)
// 
// It contains the following modules :
// BrTPCPreProcess
// BrTpcClusterModule
// BrTpcDeconvoluteClusterModule
// BrTpcHitModule
//

//____________________________________________________________________
//
// $Id: BrTpcHitPackage.cxx,v 1.7 2002/01/03 19:54:13 cholm Exp $
// $Author: cholm $
// $Date: 2002/01/03 19:54:13 $
// $Copyright: (C) 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov>
//
#ifndef BRAT_BrTpcHitPackage
#include "BrTpcHitPackage.h"
#endif
#ifndef ROOT_TDirectory
#include "TDirectory.h"
#endif
#ifndef BRAT_BrTableNames
#include "BrTableNames.h"
#endif
#ifndef WIN32
#include <iostream>
#else
#include <iostream.h>
#endif

//____________________________________________________________________

ClassImp(BrTpcHitPackage);

//____________________________________________________________________
 BrTpcHitPackage::BrTpcHitPackage()
{
  // Default constructor. DO NOT USE
  SetState(kSetup);

  fTpcSequencePPModule = 0;
  fTpcClusterModule = 0;
  fTpcDeconvoluteClusterModule = 0;
  fTpcHitModule = 0;
  fSwitcher = 0;
  fCleanModule = 0;

  // Set default values
  SetClustersInOutput();
}

//____________________________________________________________________
 BrTpcHitPackage::BrTpcHitPackage(const Char_t* name, const Char_t* title)
  : BrModuleContainer(name, title)
{
  // Named Constructor
  SetState(kSetup);

  // Preprocessor 
  fTpcSequencePPModule = 
    new BrTpcSequencePPModule(name, "Tpc Seq Preprocess Module");
  AddModule(fTpcSequencePPModule);

  // Module for finding clusters 
  fTpcClusterModule = new BrTpcClusterModule(name, "Tpc Cluster Module"); 
  AddModule(fTpcClusterModule);

  // Switcher 
  fSwitcher = new BrSwitchContainer("tpcHitSwitcher",
				    "Switcher for TPC hit modules");
  AddModule(fSwitcher);
  
  // Cluster deconvolution
  fTpcDeconvoluteClusterModule = 
    new BrTpcDeconvoluteClusterModule(name, "Tpc Deconvolute Module");
  fSwitcher->AddModule(fTpcDeconvoluteClusterModule);
  
  // Cluster to hit conversion 
  fTpcHitModule = 
    new BrTpcHitModule(name, "Tpc Hit Module");
  fSwitcher->AddModule(fTpcHitModule);

  // Cleaner module added last!
  fCleanModule = 
    new BrCleanupNodesModule(name, "Cleaner for TPC hit package");
  fSwitcher->AddModule(fCleanModule);

  // Set default values
  SetClustersInOutput();
}

//____________________________________________________________________
 void BrTpcHitPackage::Init()
{
  // This is where we add the tables deselected to the cleanupcontainer
  BrModuleContainer::Init();
  
  if(!fClustersInOutput)
    fCleanModule->AddTable(Form("%s %s", BRTABLENAMES kTPCCluster, GetName()));
}

//____________________________________________________________________
 void BrTpcHitPackage::Book() 
{
  // Make a directory for global data and let the modules do the
  // rest. 
  TDirectory* saveDir = gDirectory; 
  TDirectory* glbDir  = saveDir->mkdir(GetName());
  glbDir->cd();
  
  BrModuleContainer::Book();
  
  gDirectory = saveDir;
}

//____________________________________________________________________
 void BrTpcHitPackage::Print(Option_t* option) const
{
  // Print module information
  // See BrModule::Print for options.
  // In addition this module defines the Option:
  // <fill in here>
  
  TString opt(option);
  opt.ToLower(); 
  
  BrModuleContainer::Print(option); 

  cout << "Clusters in output : ";
  if (fClustersInOutput)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;

  if (opt.Contains("d")) 
   cout << endl 
         << "  Original author: Peter H.L. Christiansen" << endl
         << "  Last Modifications: " << endl 
         << "    $Author: cholm $" << endl  
         << "    $Date: 2002/01/03 19:54:13 $"   << endl 
         << "    $Revision: 1.7 $ " << endl  
         << endl 
         << "-------------------------------------------------" << endl;
}

//____________________________________________________________________
//
// $Log: BrTpcHitPackage.cxx,v $
// Revision 1.7  2002/01/03 19:54:13  cholm
// Prepared to use BrTableNames class (or perhaps BrDetectorList) for table names
//
// Revision 1.6  2001/11/02 14:05:47  pchristi
// Made a global directory for all histograms.
//
// Revision 1.5  2001/08/14 20:10:33  pchristi
// Fixed small Print thing.
//
// Revision 1.4  2001/08/14 19:33:43  pchristi
// Added new tpctrackpackage derived from BrTpcHitPackage and updated
// BrTpcHitPackage to include the new BrCleanupNodesModule. The default is
// now to remove cluster table and in the tracking package the
// hit table as well.
//
// Revision 1.3  2001/07/06 10:27:28  pchristi
// Chaged to the new preprocessor in the hit packages and moved the cluster module
// before the switch container.
//
// Revision 1.2  2001/06/27 16:29:30  videbaek
// Move the TpcCluster to the switcher container, otherwise it will use the
// original TpcSequences, and not the preprocessed ones.
// error introduced by C.Holm when modified Peter's original code
// which had an overwritten Event entry.
//
// Revision 1.1  2001/06/22 17:52:08  cholm
// Added new directory for packages, and added three packages here.
//
// Revision 1.1  2001/05/29 14:20:47  pchristi
// Initial import of new Tpc classes
//
//

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on by

Validate HTML
Validate CSS