BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
///////////////////////////////////////////////////////////////////////	
//
//  Digitized BrDataObject for C1 Cherenkov Detector.
//  The object is a simple structure just holding all
//  ADC values in an internal array.
//
//  Example of Usage
//    if((BrC1Dig*) digc1 = (BrC1Dig*) event->GetDataObject("DigC1")){
//
//    for(int k=1; k<=32;k++){
//      adc = digc1->GetAdc(k);
//      if(adc > pedstal){
//      ...
//
//  

//
// $Id: BrC1Dig.cxx,v 1.2 2001/08/09 08:57:39 ekman Exp $
// $Author: ekman $
// $Date: 2001/08/09 08:57:39 $
// $Copyright: (c) 2001 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
//
#include "BrC1Dig.h"
#ifndef __IOSTREAM__
#include <iostream>
#endif
#ifndef __IOMANIP__
#include <iomanip>
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

//____________________________________________________________________
ClassImp(BrC1Dig);

//________________________________________________________________
 Int_t BrC1Dig::GetAdc(const Int_t i) const 
{
  // Returns -1 if i is out of bounds
  if( i >= 1 && i <= kNumC1Chan)
    return fAdc[i-1];
  return -1;
}

//____________________________________________________________________
 void BrC1Dig::SetAdc(const Int_t itube,const Int_t adc) 
{
  if( itube >= 1 && itube <= kNumC1Chan) 
    fAdc[itube-1] = adc;
}

//____________________________________________________________________
 void BrC1Dig::Print(Option_t* option) const 
{
  // List the content of an object on cout
  // Options: 
  //   R          Print ADC values for all tubes 
  // 
  cout << "BrC1Dig: " << GetName() 
       << "(" << GetTitle() << ")" << endl;

  TString opt(option);
  opt.ToLower();

  if (opt.Contains("r")) {
    for (Int_t i = 0 ; i < kNumC1Chan; i++) 
      cout << "  Tube # " << setw(3) << i+1 
	   << " ADC: " << setw(8) << fAdc[i];
  }
}

//////////////////////////////////////////////////////////////////////////////////////
//
//	$Log: BrC1Dig.cxx,v $
//	Revision 1.2  2001/08/09 08:57:39  ekman
//	Changed tube numbering - start at 1.
//	
//	Revision 1.1  2001/06/22 17:32:19  cholm
//	Change names so that every data class has the same format so that
//	we have that down from the very beginning, so that we will not have to
//	worry about that later on.  The
//	affected classes are:
//	
//	        BrDigBB             ->        BrBbDig
//	        BrDigZDC            ->        BrZdcDig
//	        BrDigRHIC           ->        BrRichDig
//	        BrDigDC             ->        BrDcDig
//	        BrDigC1             ->        BrDcC1
//		BrDigHit            ->	      BrHitDig
//		BrDigTof	    ->	      BrTofDig
//		BrTPCSequence	    ->	      BrTpcSequence
//	
//	Revision 1.1.1.1  2001/06/21 14:55:01  hagel
//	Initial revision of brat2
//	
//	Revision 1.4  2000/10/17 20:49:11  videbaek
//	Modified class description. Moved cvs log to end.
//	No code change
//	
//	Revision 1.3  2000/06/08 06:29:01  videbaek
//	Fixed the error introduced by using kDigC1 name w/o change in Monitor. Took the opprotunity to
//	make BrC1Dig a BrDataObject rather than a TObject that belongs to a table.
//	
//	Revision 1.2  2000/03/21 21:21:49  cholm
//	Several changes: A few hacks where needed to compile on Digital Unix, noticably in my - Christian Holm - classes for the DB and Exceptions. Proberly still need to do something to some of Konstantins stuff. Also, I removed a lot of warnings fromt the compiler, by teddying up the code. Several places, old C-style indecies in for loops were assumed. Corrected. Unused variables have been commented out.
//	
//	Revision 1.1  1999/06/22 00:06:38  hagel
//	Initial revision of C1 structures and monitoring code

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