Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SpillFunctions.cxx File Reference

#include "SpillFunctions.h"
#include "RawData/RawDaqHeader.h"
#include <iostream>
#include <cmath>
#include "TString.h"

Go to the source code of this file.

Functions

const char * SpillWindowSelectionString (bool useTrigger, double window)
bool CloseToSpillAtFar (int sec1000, int sec, int nsec1000, int nsec, double window)


Function Documentation

bool CloseToSpillAtFar int  sec1000,
int  sec,
int  nsec1000,
int  nsec,
double  window
 

Definition at line 23 of file SpillFunctions.cxx.

References SpillTimeFinder::GetTimeToNearestSpill(), and SpillTimeFinder::Instance().

00024 {
00025   sec += sec1000*1000;
00026   nsec += nsec1000*1000;
00027   VldContext cx(Detector::kFar,SimFlag::kData,VldTimeStamp(sec,nsec));
00028   double dt = SpillTimeFinder::Instance().GetTimeToNearestSpill(cx);
00029   //std::cout << "CloseToSpill: " << sec << "\t" << nsec << "\t" << dt*1e6 << "us" << std::endl;    
00030   if(fabs(dt)<window) return true;
00031   return false;
00032 }

const char* SpillWindowSelectionString bool  useTrigger,
double  window
 

Definition at line 8 of file SpillFunctions.cxx.

References Form().

00009 {
00010   return Form("%s"
00011               "CloseToSpillAtFar("
00012               "fHeader->GetVldContext().GetTimeStamp().GetSec()/1000,"
00013               "fHeader->GetVldContext().GetTimeStamp().GetSec()%1000,"
00014               "fHeader->GetVldContext().GetTimeStamp().GetNanoSec()/1000,"
00015               "fHeader->GetVldContext().GetTimeStamp().GetNanoSec()%1000,"
00016               "%lf)",
00017               (useTrigger)?"(((RawDaqSnarlHeader*)fHeader)->GetTrigSrc()>65000)&&" : "",
00018               window);
00019 }


Generated on Mon Feb 15 11:08:13 2010 for loon by  doxygen 1.3.9.1