#include "THaHelicityDet.h"
using namespace std;
THaHelicityDet::THaHelicityDet( const char* name, const char* description ,
THaApparatus* apparatus )
: THaDetector( name, description, apparatus ), fHelicity(kUnknown), fSign(1)
{
}
THaHelicityDet::~THaHelicityDet()
{
}
Int_t THaHelicityDet::DefineVariables( EMode mode )
{
if( mode == kDefine && fIsSetup ) return kOK;
fIsSetup = ( mode == kDefine );
const RVarDef var[] = {
{ "helicity", "Beam helicity", "fHelicity" },
{ 0 }
};
return DefineVarsFromList( var, mode );
}
const char* THaHelicityDet::GetDBFileName() const
{
return "hel.";
}
void THaHelicityDet::MakePrefix()
{
THaDetectorBase::MakePrefix( 0 );
}
Int_t THaHelicityDet::ReadDatabase( const TDatime& date )
{
FILE* file = OpenFile( date );
if( !file ) return kFileError;
fSign = 1;
const DBRequest request[] = {
{ "helicity_sign", &fSign, kInt, 0, 1, -2 },
{ 0 }
};
Int_t err = LoadDB( file, date, request, fPrefix );
fclose(file);
if( err )
return kInitError;
return kOK;
}
ClassImp(THaHelicityDet)
Last change: Sat Nov 7 21:26:48 2009
Last generated: 2009-11-07 21:26
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.