TNeSel.cxx 1.14 KB
Newer Older
Pavel Sharov's avatar
Pavel Sharov committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
//===================================================================
//== TNeSel.cxx: exp0211
//== Version: 2011-03-01
//===================================================================
using namespace std;

#include "TNeSel.h"

#include <stdio.h>
#include "Riostream.h"


//***********************************************************
TNeSel::TNeSel(const char* name)
	:TGo4Parameter(name)
	,lval(0.)
	,uval(4096.)
{
;
} //----------------------------------------------------------------

TNeSel::~TNeSel()
{
} //-----------------------------------------------------------------

Bool_t TNeSel::UpdateFrom(TGo4Parameter *source)
{
	cout << "**** TNeDet1 " << GetName() 
		<< " updated from auto save file" << endl;

	TNeSel * from = dynamic_cast<TNeSel *>(source);

	if(from==0) 
	{
		cout << "Wrong parameter class: " 
			<< source->ClassName() << endl;
		return kFALSE;
	}


	lval = from->lval;
	uval = from->uval;
	return kTRUE;
} //-----------------------------------------------------------------


int TNeSel::CheckValue(double val)
{
	if(val > lval && val < uval) return 1;
	return 0;
} //-----------------------------------------------------------------