//*-- Author : Damir Buskulic 13/07/00
//////////////////////////////////////////////////////////////////////////
// //
// VGroupInfo //
// //
// Information on a group of frames. //
// A group of frames is defined as a set of frames that follow //
// each other in time, without any "holes" or spaces. It is much easier //
// and faster to search for information in that case. //
// //
//////////////////////////////////////////////////////////////////////////
#include "VGroupInfo.h"
ClassImp(VGroupInfo)
//______________________________________________________________________________
VGroupInfo::VGroupInfo () : TObject()
{
// Group info default constructor
mFirstIndex = 0;
mLastIndex = 0;
mBeginTime = 0;
mEndTime = 0;
mAverageLength = 0;
}
//______________________________________________________________________________
VGroupInfo::VGroupInfo (Int_t firstIndex, Int_t lastIndex, Double_t beginTime,
Double_t endTime, Float_t averageLength) : TObject()
{
// Group info constructor
mFirstIndex = firstIndex;
mLastIndex = lastIndex;
mBeginTime = beginTime;
mEndTime = endTime;
mAverageLength = averageLength;
}
//______________________________________________________________________________
void VGroupInfo::Copy (TObject& obj)
{
// Copy this into obj
TObject::Copy (obj);
((VGroupInfo &)obj).mFirstIndex = mFirstIndex ;
((VGroupInfo &)obj).mLastIndex = mLastIndex ;
((VGroupInfo &)obj).mBeginTime = mBeginTime ;
((VGroupInfo &)obj).mEndTime = mEndTime ;
((VGroupInfo &)obj).mAverageLength = mAverageLength ;
}
//______________________________________________________________________________
void VGroupInfo::Increment (Double_t endtime, Double_t length)
{
// Increments and updates the group information
// Recalculates the average length of frames
if (mBeginTime !=0 || mEndTime !=0) {
mAverageLength = (length+(mLastIndex -mFirstIndex +1)*mAverageLength )/(mLastIndex -mFirstIndex +2);
mLastIndex ++;
} else {
mAverageLength = length;
}
mEndTime = endtime;
}
//______________________________________________________________________________
void VGroupInfo::Reset ()
{
// Resets the group info.
mFirstIndex = 0;
mLastIndex = 0;
mBeginTime = 0;
mEndTime = 0;
mAverageLength = 0;
}
- ROOT page - VEGA page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions
about the page layout send a mail to
JavaScript must be enabled to display this email address.
, or
contact
JavaScript must be enabled to display this email address.
with any questions or problems regarding ROOT or VEGA.