EvtOverlaySingleton Class Reference

#include <EvtOverlaySingleton.h>

List of all members.

Classes

struct  Cleaner
 sub-class Cleaner struct is used to clean up singleton at the end of job. More...

Public Types

typedef std::pair
< VldTimeStamp, Long64_t > 
pairTsL64_t
typedef std::map< VldTimeStamp,
Long64_t > 
mapTsL64_t
typedef std::map< VldTimeStamp,
Long64_t >::const_iterator 
mapTsL64citr_t

Public Member Functions

std::vector< std::string > TokenizeString (std::string values, std::string sepchar, int verbose=0)
 Handy helper functions.
std::vector< std::string > ExpandFileList (std::string pattern, std::string prefixes, int verbose=0)
int ReadSpillTimesFiles (std::string fname, std::string searchpaths="", int verbose=0)
size_t NumUserTimes () const
 How many user times do we have.
VldTimeStamp GetUserTime (size_t indx) const
 Nth user time ... no protection for over/under indexing.
double GetUserTmin (size_t indx) const
double GetUserTmax (size_t indx) const
int GetTriggerMask () const
void SetTriggerMask (int mask)
int AddDaqFile (std::string fname)
 add file(s) to TChains
void MapDaqFiles (int verbose=0)
 fill mapping (after all files added)
int FindClosestDaqSnarl (const VldTimeStamp &ts, int verbose=0)
int FindLowerBoundDaqMonitor (const VldTimeStamp &ts, int verbose=0)
bool IsValidSnarl ()
bool IsValidMonitor ()
VldTimeStamp GetClosestSnarlVldTimeStamp ()
VldTimeStamp GetLowerBoundMonitorVldTimeStamp ()
double GetSnarlTimeDifference ()
double GetMonitorTimeDifference ()
Long64_t GetClosestSnarlEntry ()
Long64_t GetLowerBoundMonitorEntry ()
const RawRecordGetClosestSnarlRawRecord ()
const RawRecordGetLowerBoundMonitorRawRecord ()
const RawDaqSnarlHeaderGetClosestRawDaqSnarlHeader ()
const RawDigitDataBlockGetClosestRawDigitDataBlock ()
 assume this has been unpacked at some point
const RawVtmTimeInfoBlockGetLowerBoundRawVtmTimeInfoBlock ()
std::set< VldTimeStampGetClosestCrateT0s ()
std::set< VldTimeStampGetCrateT0s (const RawDigitDataBlock *rddb, VldContext vldc)
 general code
double GetClosestSpillPOTs (bool requireIsGoodSpill=true)
const BeamMonSpillGetClosestBeamMonSpill ()

Static Public Member Functions

static EvtOverlaySingletonInstance ()
 No public ctor for singleton, all user access is through Instance().

Private Member Functions

int ReadOneSpillTimesFile (std::string fname, int verbose=0)
 EvtOverlaySingleton ()
 Private ctor, users access via Instance().
virtual ~EvtOverlaySingleton ()
 EvtOverlaySingleton (const EvtOverlaySingleton &)
 Method private and not implement, declared to prevent copying.
void operator= (const EvtOverlaySingleton &)
 Method private and not implement, declared to prevent assignment.

Private Attributes

std::vector< VldTimeStampfUserTimes
 UTC times for spills.
std::vector< double > fUserTmin
std::vector< double > fUserTmax
int fTriggerMask
 only accept DaqSnarls that have 1 of these bits on
mapTsL64_t fMapSnarlTime2Entry
size_t fMapSnarlTime2EntrySize
mapTsL64_t fMapMonitorTime2Entry
 not including sentinels
size_t fMapMonitorTime2EntrySize
VldTimeStamp fTimeRequested
 not including sentinels
mapTsL64citr_t fCurrentSnarlMatch
 iterator for latest
mapTsL64citr_t fCurrentMonitorMatch
 iterator for latest
bool fValidSnarlMatch
bool fValidMonitorMatch
TChain * fRawDaqSnarlChain
RawRecordfRawDaqSnarlRec
TChain * fRawDaqMonitorChain
RawRecordfRawDaqMonitorRec
bool fMapped
VldTimeStamp fSpillTimeND
 only valid for use with BeamMonSpill & POTs

Static Private Attributes

static EvtOverlaySingletonfgTheInstance
 The one-and-only instance.

Friends

struct Cleaner

Detailed Description

Definition at line 39 of file EvtOverlaySingleton.h.


Member Typedef Documentation

typedef std::map<VldTimeStamp,Long64_t> EvtOverlaySingleton::mapTsL64_t

Definition at line 130 of file EvtOverlaySingleton.h.

typedef std::map<VldTimeStamp,Long64_t>::const_iterator EvtOverlaySingleton::mapTsL64citr_t

Definition at line 131 of file EvtOverlaySingleton.h.

typedef std::pair<VldTimeStamp,Long64_t> EvtOverlaySingleton::pairTsL64_t

Definition at line 129 of file EvtOverlaySingleton.h.


Constructor & Destructor Documentation

EvtOverlaySingleton::EvtOverlaySingleton (  )  [private]

Private ctor, users access via Instance().

private ctor

Definition at line 60 of file EvtOverlaySingleton.cxx.

Referenced by Instance().

00061   : fTriggerMask(TRIGGER_BIT_SPILL)   
00062   , fMapSnarlTime2EntrySize(0)
00063   , fMapMonitorTime2EntrySize(0)
00064   , fTimeRequested(VldTimeStamp::GetEOT())
00065   , fValidSnarlMatch(false)
00066   , fValidMonitorMatch(false)
00067   , fRawDaqSnarlChain(new TChain("DaqSnarl"))
00068   , fRawDaqSnarlRec(new RawRecord())
00069   , fRawDaqMonitorChain(new TChain("DaqMonitor"))
00070   , fRawDaqMonitorRec(new RawRecord())
00071   , fMapped(false)  // not yet scanned
00072 {
00074 }

EvtOverlaySingleton::~EvtOverlaySingleton (  )  [private, virtual]

Definition at line 76 of file EvtOverlaySingleton.cxx.

References fgTheInstance.

00077 {
00078   fgTheInstance = 0;
00079 }

EvtOverlaySingleton::EvtOverlaySingleton ( const EvtOverlaySingleton  )  [private]

Method private and not implement, declared to prevent copying.


Member Function Documentation

int EvtOverlaySingleton::AddDaqFile ( std::string  fname  ) 

add file(s) to TChains

Definition at line 190 of file EvtOverlaySingleton.cxx.

References fMapped, fRawDaqMonitorChain, and fRawDaqSnarlChain.

Referenced by EvtInfoInjectorModule::BeginJob().

00191 {
00192   fMapped = false;
00193   int ret1 = fRawDaqSnarlChain->Add(fname.c_str());
00194   int ret2 = fRawDaqMonitorChain->Add(fname.c_str());
00195 
00196   if ( ret1 > 0 && ret2 > 0 ) return 1;
00197   return 0;
00198 }

std::vector< std::string > EvtOverlaySingleton::ExpandFileList ( std::string  pattern,
std::string  prefixes,
int  verbose = 0 
)

find list of all files

all the places they could be

all the individual patterns

Definition at line 795 of file EvtOverlaySingleton.cxx.

References Munits::g, len, and TokenizeString().

Referenced by EvtInfoInjectorModule::BeginJob(), and ReadSpillTimesFiles().

00798 {
00800   std::vector<std::string> allfiles;
00801 
00803   std::vector<std::string> prefixes = TokenizeString(prefixPaths,":");
00804   bool hasnull = false;
00805   for (size_t i=0; i<prefixes.size(); ++i) {
00806     if ( prefixes[i] == "" ) hasnull = true;
00807   }
00808   // to try a pattern without any prefix we need "" as one of the tests
00809   if ( ! hasnull ) prefixes.push_back("");
00810 
00812   std::vector<std::string> patterns = TokenizeString(patternList,":;,");
00813 
00814   glob_t g;
00815   g.gl_pathc = 0;  // initialize in case no actual globbing is done
00816   int flags = GLOB_TILDE;  // expand ~ home directories
00817 
00818   for (size_t iprefix=0; iprefix < prefixes.size(); ++iprefix) {
00819     for (size_t ipattern=0; ipattern < patterns.size(); ++ipattern) {
00820 
00821       std::string diralt = prefixes[iprefix];
00822       size_t len = diralt.size();
00823       // if non-null, does it end with a "/"?  if not add one
00824       if ( len > 0 && diralt.rfind('/') != len-1 ) diralt.append("/");
00825 
00826       std::string fullpattern = diralt + patterns[ipattern];
00827       if ( verbose > 1 ) {
00828         std::cout << "try file pattern \"" << fullpattern << "\"" << std::endl;
00829       }
00830 
00831       glob(fullpattern.c_str(),flags,NULL,&g);
00832       // next glob() will append to list
00833       if ( g.gl_pathc > 0 ) flags |= GLOB_APPEND; 
00834 
00835     }
00836   }
00837 
00838   size_t nfiles = g.gl_pathc;
00839   for (size_t i=0; i<nfiles; ++i) {
00840     std::string afile(g.gl_pathv[i]);
00841     allfiles.push_back(afile);
00842     if ( verbose > 0 ) {
00843       std::cout << "[" << std::setw(4) << "] " << afile << std::endl;
00844     }
00845   }
00846 
00847   return allfiles;
00848 }

int EvtOverlaySingleton::FindClosestDaqSnarl ( const VldTimeStamp ts,
int  verbose = 0 
)

find the closest entry (in time), then use Get functions to retrieve info non-zero return indicates an error (avoid getters)

Definition at line 350 of file EvtOverlaySingleton.cxx.

References VldTimeStamp::AsString(), fCurrentSnarlMatch, fMapped, fMapSnarlTime2Entry, fMapSnarlTime2EntrySize, fTimeRequested, fValidSnarlMatch, kBOT, kEOT, and MapDaqFiles().

Referenced by EvtInfoInjectorModule::Ana(), and EvtAddRawDigitBlockModule::Reco().

00352 {
00353   fValidSnarlMatch = false;
00354   fTimeRequested   = ts;
00355 
00356   if ( ! fMapped ) {
00357     std::cout << "EvtOverlaySingleton::FindClosestDaqSnarl forcing "
00358               << "MapDaqFiles" << std::endl;
00359     MapDaqFiles();
00360   }
00361 
00362   if ( fMapSnarlTime2EntrySize == 0 ) {
00363     // can't use .empty() because we've added sentinel entris
00364     // we don't want to do the slow count, so count during MapDaqFiles()
00365     std::cerr << "EvtOverlaySingleton::FindClosestDaqSnarl" 
00366               << " attempted on empty map " << std::endl;
00367     return -3;
00368   }
00369 
00370   mapTsL64citr_t mitrLB, mitrPrev, mitrBest;
00371   pairTsL64_t tspair(ts,0); // lower_bound needs the same type as the container
00372 
00373   // let <algorithm>'s lower_bound do most of the work binary tree finding
00374   // in place sentinel values (NBOT & EOT) protect going beyond ends
00375   // lower_bound is first element larger (or equal) to what we want
00376   mitrLB = std::lower_bound(fMapSnarlTime2Entry.begin(),
00377                             fMapSnarlTime2Entry.end(),tspair);
00378   if ( verbose > 0 ) {
00379     std::cout << "EvtOverlaySingleton::FindClosestDaqSnarl" 
00380               << std::endl;
00381   }
00382   if ( verbose > 1 ) {
00383     std::cout << "lower_bound " << mitrLB->first.AsString("c") << " "
00384               << mitrLB->second << std::endl;
00385   }
00386 
00387   double dtLB     = (double)(ts - mitrLB->first);
00388   double dtPrev   = -99999999;
00389 
00390   mitrBest        = mitrLB;
00391   double dtBest   = dtLB;
00392   string best     = "LB";
00393 
00394   // could be the LB entry or the previous entry
00395   if ( mitrLB->first != ts ) {
00396     // not an exact match on LB, need to check previous
00397     mitrPrev = mitrLB;
00398     if ( mitrPrev != fMapSnarlTime2Entry.begin() ) {
00399       mitrPrev--;
00400     } else {
00401       std:: cerr << "EvtOverlaySingleton::FindClosestDaqSnarl" 
00402                  << "mitrPrev was begin() ...should never happen" 
00403                  << ", input time " << ts.AsString("c")
00404                  << std::endl;
00405     }
00406     // okay, which is closer?
00407     dtPrev = (double)(ts - mitrPrev->first);
00408     if ( TMath::Abs(dtPrev) < TMath::Abs(dtLB) ) {
00409       mitrBest = mitrPrev;
00410       dtBest   = dtPrev;
00411       best     = "Prev";
00412     } else {
00413     }
00414   }
00415 
00416   // don't return sentinels ... they're not real entries
00417   if ( mitrBest->second == kBOT ) {
00418     best += "BOT++";
00419     mitrBest++;
00420     dtBest = (double)(ts - mitrBest->first);
00421   }
00422   if ( mitrBest->second == kEOT ) {
00423     best += "EOT--";
00424     mitrBest--;
00425     dtBest = (double)(ts - mitrBest->first);
00426   }
00427 
00428   if ( verbose > 1 ) {
00429     std::cout << "test for    " << ts.AsString("c")
00430               << " best = " << std::setw(5) << best
00431               << " dt " << dtBest << std::endl;
00432     std::cout << "     Prev   " << mitrPrev->first.AsString("c")
00433               << " dt " << dtPrev << std::endl;
00434     std::cout << "     LB     " << mitrLB->first.AsString("c")
00435               << " dt " << dtLB << std::endl;
00436     std::cout << "     Best   " << mitrBest->first.AsString("c")
00437               << " dt " << dtBest << std::endl;
00438   }
00439 
00440   fCurrentSnarlMatch  = mitrBest;
00441   fValidSnarlMatch    = true;
00442   return 0;
00443 
00444 }

int EvtOverlaySingleton::FindLowerBoundDaqMonitor ( const VldTimeStamp ts,
int  verbose = 0 
)

find the DaqMonitor record that preceeds the desired time then use Get functions to retrieve info

Definition at line 448 of file EvtOverlaySingleton.cxx.

References VldTimeStamp::AsString(), fCurrentMonitorMatch, fMapMonitorTime2Entry, fMapMonitorTime2EntrySize, fMapped, fTimeRequested, fValidMonitorMatch, kBOT, kEOT, and MapDaqFiles().

Referenced by EvtAddRawDigitBlockModule::Reco().

00450 {
00451   fValidMonitorMatch = false;
00452   fTimeRequested     = ts;
00453 
00454   if ( ! fMapped ) {
00455     std::cout << "EvtOverlaySingleton::FindLowerBoundDaqMonitor forcing "
00456               << "MapDaqFiles" << std::endl;
00457     MapDaqFiles();
00458   }
00459 
00460   if ( fMapMonitorTime2EntrySize == 0 ) {
00461     // can't use .empty() because we've added sentinel entris
00462     // we don't want to do the slow count, so count during MapDaqFiles()
00463     std::cerr << "EvtOverlaySingleton::FindLowerBoundDaqMonitor" 
00464               << " attempted on empty map " << std::endl;
00465     return -3;
00466   }
00467 
00468   mapTsL64citr_t mitrLB, mitrPrev, mitrBest;
00469   pairTsL64_t tspair(ts,0); // lower_bound needs the same type as the container
00470 
00471   // let <algorithm>'s lower_bound do most of the work binary tree finding
00472   // in place sentinel values (NBOT & EOT) protect going beyond ends
00473   // lower_bound is first element larger (or equal) to what we want
00474   mitrLB = std::lower_bound(fMapMonitorTime2Entry.begin(),
00475                             fMapMonitorTime2Entry.end(),tspair);
00476   if ( verbose > 0 ) {
00477     std::cout << "EvtOverlaySingleton::FindClosestDaqSnarl" 
00478               << std::endl;
00479   }
00480   if ( verbose > 1 ) {
00481     std::cout << "lower_bound " << mitrLB->first.AsString("c") << " "
00482               << mitrLB->second << std::endl;
00483   }
00484 
00485   double dtLB     = (double)(ts - mitrLB->first);
00486   double dtPrev   = -99999999;
00487 
00488   mitrBest        = mitrLB;
00489   double dtBest   = dtLB;
00490   string best     = "LB";
00491 
00492   // could be the LB entry or the previous entry
00493   if ( mitrLB->first != ts ) {
00494     // not an exact match on LB, need to check previous
00495     mitrPrev = mitrLB;
00496     if ( mitrPrev != fMapMonitorTime2Entry.begin() ) {
00497       mitrPrev--;
00498     } else {
00499       std:: cerr << "EvtOverlaySingleton::FindLowerBoundDaqMonitor" 
00500                  << "mitrPrev was begin() ...should never happen" 
00501                  << ", input time " << ts.AsString("c")
00502                  << std::endl;
00503     }
00504     // okay, which is just below desired time
00505     // "dt" time should be the smallest *positive* value
00506     // (if dt = ts_request - ts_found )
00507     // negative value would mean time after request
00508     dtPrev = (double)(ts - mitrPrev->first);
00509     if ( dtPrev < 0 ) {
00510       best     = "Prev<0 broken!";
00511       std:: cerr << "EvtOverlaySingleton::FindLowerBoundDaqMonitor " 
00512                  << "mitrPrev was after current time" << std::endl
00513                  << " current: " << ts.AsString("c")  << std::endl
00514                  << " prev:    " << mitrPrev->first.AsString("c") << std::endl
00515                  << " LB:      " << mitrLB->first.AsString("c") << std::endl   
00516                  << std::endl;
00517       // something is seriously broken
00518     } else if ( dtLB < 0 ) {
00519       // LB shouldn't be it, so we have to take Prev
00520       //std:: cerr << "EvtOverlaySingleton::FindLowerBoundDaqMonitor " 
00521       //           << "mitrLB was after current time" << std::endl;
00522       mitrBest = mitrPrev;
00523       dtBest   = dtPrev;
00524       best     = "Prev";
00525     } else if ( TMath::Abs(dtPrev) < TMath::Abs(dtLB) ) {
00526       //std:: cerr << "EvtOverlaySingleton::FindLowerBoundDaqMonitor " 
00527       //           << "dtPrev better than dtLB" << std::endl;
00528       mitrBest = mitrPrev;
00529       dtBest   = dtPrev;
00530       best     = "Prev as best";
00531     } else {
00532       // leave it as dtLB
00533       //std:: cerr << "EvtOverlaySingleton::FindLowerBoundDaqMonitor " 
00534       //           << "left as dtLB" << std::endl;
00535       best     = "LB as fallthrough";
00536     }
00537   }
00538 
00539   // don't return sentinels ... they're not real entries
00540   if ( mitrBest->second == kBOT ) {
00541     best += "BOT++";
00542     mitrBest++;
00543     dtBest = (double)(ts - mitrBest->first);
00544   }
00545   if ( mitrBest->second == kEOT ) {
00546     best += "EOT--";
00547     mitrBest--;
00548     dtBest = (double)(ts - mitrBest->first);
00549   }
00550 
00551   if ( verbose > 1 ) {
00552     std::cout << "test for    " << ts.AsString("c")
00553               << " best = " << std::setw(5) << best
00554               << " dt " << dtBest << std::endl;
00555     std::cout << "     Prev   " << mitrPrev->first.AsString("c")
00556               << " dt " << dtPrev << std::endl;
00557     std::cout << "     LB     " << mitrLB->first.AsString("c")
00558               << " dt " << dtLB << std::endl;
00559     std::cout << "     Best   " << mitrBest->first.AsString("c")
00560               << " dt " << dtBest << std::endl;
00561   }
00562 
00563   fCurrentMonitorMatch  = mitrBest;
00564   fValidMonitorMatch    = true;
00565   return 0;
00566 
00567 }

const BeamMonSpill * EvtOverlaySingleton::GetClosestBeamMonSpill (  ) 

use the MINOS database to look up the POTs for this spill

haven't found the closest match or there is none ... well no hope there

Definition at line 721 of file EvtOverlaySingleton.cxx.

References fSpillTimeND, fValidSnarlMatch, BDSpillAccessor::Get(), GetClosestSnarlVldTimeStamp(), Instance(), SimFlag::kData, Detector::kNear, and BDSpillAccessor::LoadSpill().

Referenced by EvtAddRawDigitBlockModule::Ana(), and GetClosestSpillPOTs().

00722 {
00724 
00726   if ( ! fValidSnarlMatch ) return 0;
00727 
00728   VldContext vldc(Detector::kNear,SimFlag::kData,GetClosestSnarlVldTimeStamp());
00729 
00730   fSpillTimeND =
00731     SpillTimeFinder::Instance().GetTimeOfNearestSpill(vldc);
00732 
00733   const BeamMonSpill* bms = BDSpillAccessor::Get().LoadSpill(fSpillTimeND);
00734   return bms;
00735 }

std::set< VldTimeStamp > EvtOverlaySingleton::GetClosestCrateT0s (  ) 

Definition at line 658 of file EvtOverlaySingleton.cxx.

References GetClosestRawDaqSnarlHeader(), GetClosestRawDigitDataBlock(), GetCrateT0s(), and RecMinosHdr::GetVldContext().

Referenced by EvtInfoInjectorModule::Ana().

00659 {
00660   std::set<VldTimeStamp> crateT0set;
00661 
00662   const RawDigitDataBlock* rddb = GetClosestRawDigitDataBlock();
00663   if ( ! rddb ) return crateT0set;
00664 
00665   VldContext vldc = GetClosestRawDaqSnarlHeader()->GetVldContext();
00666   return GetCrateT0s(rddb,vldc);
00667 }

const RawDaqSnarlHeader * EvtOverlaySingleton::GetClosestRawDaqSnarlHeader (  ) 

Definition at line 623 of file EvtOverlaySingleton.cxx.

References fRawDaqSnarlRec, fValidSnarlMatch, GetClosestSnarlRawRecord(), and RecMinos::GetHeader().

Referenced by GetClosestCrateT0s().

00624 {
00625   if ( ! fValidSnarlMatch ) return 0;
00626   GetClosestSnarlRawRecord();
00627 
00628   const RawDaqSnarlHeader* rawSnarlHeader =
00629     dynamic_cast<const RawDaqSnarlHeader*>(fRawDaqSnarlRec->GetHeader());
00630   return rawSnarlHeader;
00631 
00632 }

const RawDigitDataBlock * EvtOverlaySingleton::GetClosestRawDigitDataBlock (  ) 

assume this has been unpacked at some point

Definition at line 634 of file EvtOverlaySingleton.cxx.

References RawRecord::FindRawBlock(), fRawDaqSnarlRec, fValidSnarlMatch, and GetClosestSnarlRawRecord().

Referenced by GetClosestCrateT0s(), and EvtAddRawDigitBlockModule::Reco().

00635 {
00636   if ( ! fValidSnarlMatch ) return 0;
00637   GetClosestSnarlRawRecord();
00638 
00639   const RawDigitDataBlock* rddb =
00640     dynamic_cast<const RawDigitDataBlock*>(fRawDaqSnarlRec->FindRawBlock("RawDigitDataBlock"));
00641   return rddb;
00642 }

Long64_t EvtOverlaySingleton::GetClosestSnarlEntry (  ) 

Definition at line 593 of file EvtOverlaySingleton.cxx.

References fCurrentSnarlMatch, and fValidSnarlMatch.

Referenced by GetClosestSnarlRawRecord().

00594 {
00595   if ( ! fValidSnarlMatch ) return -1;
00596   return fCurrentSnarlMatch->second;
00597 }

const RawRecord * EvtOverlaySingleton::GetClosestSnarlRawRecord (  ) 

Definition at line 607 of file EvtOverlaySingleton.cxx.

References fRawDaqSnarlChain, fRawDaqSnarlRec, fValidSnarlMatch, and GetClosestSnarlEntry().

Referenced by GetClosestRawDaqSnarlHeader(), and GetClosestRawDigitDataBlock().

00608 {
00609   if ( ! fValidSnarlMatch ) return 0;
00610   fRawDaqSnarlChain->GetEntry(GetClosestSnarlEntry());
00611   return fRawDaqSnarlRec;
00612 }

VldTimeStamp EvtOverlaySingleton::GetClosestSnarlVldTimeStamp (  ) 
double EvtOverlaySingleton::GetClosestSpillPOTs ( bool  requireIsGoodSpill = true  ) 

use MINOS DB to look up POT info for spill return negative number if error if requireIsGoodSpill is true, then return 0 if it doesn't pass

Definition at line 737 of file EvtOverlaySingleton.cxx.

References fSpillTimeND, BeamMonSpill::fTrtgtd, GetClosestBeamMonSpill(), BMSpillAna::SelectSpill(), BMSpillAna::SetSpill(), BMSpillAna::SetTimeDiff(), and BeamMonSpill::SpillTime().

Referenced by EvtAddRawDigitBlockModule::Ana().

00738 {
00739 
00740   const BeamMonSpill* bms = GetClosestBeamMonSpill();
00741   if ( ! bms ) return -1;
00742 
00743   static BMSpillAna* fBMSpillAna = new BMSpillAna();
00744 
00745   fBMSpillAna->SetSpill(*bms);
00746   VldTimeStamp bms_ts = bms->SpillTime();
00747   double deltat = (double)(fSpillTimeND - bms_ts);
00748   fBMSpillAna->SetTimeDiff(deltat);
00749   bool isgoodspill = fBMSpillAna->SelectSpill();
00750   if ( requireIsGoodSpill && ! isgoodspill ) return 0;
00751 
00752   return bms->fTrtgtd; // fTr101d, fTortgt, fTor101
00753 
00754 }

std::set< VldTimeStamp > EvtOverlaySingleton::GetCrateT0s ( const RawDigitDataBlock rddb,
VldContext  vldc 
)

general code

Definition at line 670 of file EvtOverlaySingleton.cxx.

References RawDigit::GetADC(), RawDigit::GetChannel(), RawChannelId::GetCrate(), RawDigit::GetCrateT0(), RawDigitDataBlock::GetDatumIter(), VldTimeStamp::GetNanoSec(), PlexHandle::GetReadoutType(), RawDigit::GetTDC(), Calibrator::GetTimeFromTDC(), VldContext::GetTimeStamp(), Instance(), ReadoutType::kScintStrip, and CalScheme::Reset().

Referenced by EvtAddRawDigitBlockModule::Ana(), and GetClosestCrateT0s().

00672 {
00673   std::set<VldTimeStamp> crateT0set;
00674   VldTimeStamp crateT0;
00675 
00676 
00677   Calibrator& cal = Calibrator::Instance();
00678   cal.Reset(vldc);
00679   PlexHandle ph(vldc);
00680 
00681   TIter rditer = rddb->GetDatumIter();
00682   RawDigit *rd = 0;
00683   Int_t currentCrate = -1;
00684 
00685   while ( (rd = (RawDigit*)rditer()) ) {
00686     RawChannelId rcid = rd->GetChannel();
00687     ReadoutType::Readout_t digitType = ph.GetReadoutType(rcid);
00688     if ( ReadoutType::kScintStrip != digitType ) continue;
00689 
00690     Int_t crate = rcid.GetCrate();
00691     if ( crate != currentCrate ) {
00692       currentCrate = crate;
00693       crateT0 = rd->GetCrateT0();
00694       crateT0set.insert(crateT0);
00695     }
00696 
00697     Int_t crateT0ns = crateT0.GetNanoSec();
00698     Double_t t = cal.GetTimeFromTDC(rd->GetTDC(),rcid) * 1.0e9;
00699     // adjust for skew
00700     t += ( (rd->GetCrateT0()).GetSec() -
00701            (vldc.GetTimeStamp()).GetSec() ) * 1.0e9;
00702 
00703     Double_t tadj = t - ( vldc.GetTimeStamp().GetNanoSec() - crateT0ns );
00704     if ( tadj < 0 || tadj > 20000 ) {
00705       cout << "#EOS.GetCrateT0### odd time " << rcid << " t = " << tadj 
00706            << " adc " << rd->GetADC() << endl;
00707     }
00708   }
00709 
00710   if ( crateT0set.size() != 1 ) {
00711     cerr << "########### crateT0set size " << crateT0set.size() << endl;
00712   }
00713   //if ( crateT0set.size() == 0 ) return VldTimeStamp(0,0);
00714   //return *(crateT0set.begin());
00715 
00716   return crateT0set;
00717 }

Long64_t EvtOverlaySingleton::GetLowerBoundMonitorEntry (  ) 

Definition at line 599 of file EvtOverlaySingleton.cxx.

References fCurrentMonitorMatch, and fValidMonitorMatch.

Referenced by GetLowerBoundMonitorRawRecord().

00600 {
00601   if ( ! fValidMonitorMatch ) return -1;
00602   return fCurrentMonitorMatch->second;
00603 }

const RawRecord * EvtOverlaySingleton::GetLowerBoundMonitorRawRecord (  ) 

Definition at line 614 of file EvtOverlaySingleton.cxx.

References fRawDaqMonitorChain, fRawDaqMonitorRec, fValidMonitorMatch, and GetLowerBoundMonitorEntry().

Referenced by GetLowerBoundRawVtmTimeInfoBlock().

00615 {
00616   if ( ! fValidMonitorMatch ) return 0;
00617   fRawDaqMonitorChain->GetEntry(GetLowerBoundMonitorEntry());
00618   return fRawDaqMonitorRec;
00619 }

VldTimeStamp EvtOverlaySingleton::GetLowerBoundMonitorVldTimeStamp (  ) 

Definition at line 577 of file EvtOverlaySingleton.cxx.

References fCurrentMonitorMatch, fValidMonitorMatch, and VldTimeStamp::GetBOT().

Referenced by GetMonitorTimeDifference().

00578 {
00579   if ( ! fValidMonitorMatch ) return VldTimeStamp::GetBOT();
00580   return fCurrentMonitorMatch->first;
00581 }

const RawVtmTimeInfoBlock * EvtOverlaySingleton::GetLowerBoundRawVtmTimeInfoBlock (  ) 

Definition at line 646 of file EvtOverlaySingleton.cxx.

References RawRecord::FindRawBlock(), fRawDaqMonitorRec, fValidMonitorMatch, and GetLowerBoundMonitorRawRecord().

Referenced by EvtAddRawDigitBlockModule::Reco().

00647 {
00648   if ( ! fValidMonitorMatch ) return 0;
00649   GetLowerBoundMonitorRawRecord();
00650 
00651   const RawVtmTimeInfoBlock* rvtib =
00652     dynamic_cast<const RawVtmTimeInfoBlock*>(fRawDaqMonitorRec->FindRawBlock("RawVtmTimeInfoBlock"));
00653   return rvtib;
00654 }

double EvtOverlaySingleton::GetMonitorTimeDifference (  ) 

Definition at line 588 of file EvtOverlaySingleton.cxx.

References fTimeRequested, and GetLowerBoundMonitorVldTimeStamp().

Referenced by EvtAddRawDigitBlockModule::Reco().

00589 {
00590   return (double(fTimeRequested - GetLowerBoundMonitorVldTimeStamp()));
00591 }

double EvtOverlaySingleton::GetSnarlTimeDifference (  ) 

Definition at line 583 of file EvtOverlaySingleton.cxx.

References fTimeRequested, and GetClosestSnarlVldTimeStamp().

Referenced by EvtAddRawDigitBlockModule::Reco().

00584 {
00585   return (double(fTimeRequested - GetClosestSnarlVldTimeStamp()));
00586 }

int EvtOverlaySingleton::GetTriggerMask (  )  const [inline]

Definition at line 84 of file EvtOverlaySingleton.h.

References fTriggerMask.

00084 { return fTriggerMask; }

VldTimeStamp EvtOverlaySingleton::GetUserTime ( size_t  indx  )  const [inline]

Nth user time ... no protection for over/under indexing.

Definition at line 72 of file EvtOverlaySingleton.h.

References fUserTimes.

Referenced by EvtInfoInjectorModule::Ana().

00072 { return fUserTimes[indx]; }

double EvtOverlaySingleton::GetUserTmax ( size_t  indx  )  const [inline]

Definition at line 74 of file EvtOverlaySingleton.h.

References fUserTmax.

Referenced by MnvRawDigitSuppression::Reco().

00074 { return fUserTmax[indx]; }

double EvtOverlaySingleton::GetUserTmin ( size_t  indx  )  const [inline]

Definition at line 73 of file EvtOverlaySingleton.h.

References fUserTmin.

Referenced by MnvRawDigitSuppression::Reco().

00073 { return fUserTmin[indx]; }

EvtOverlaySingleton & EvtOverlaySingleton::Instance (  )  [static]

No public ctor for singleton, all user access is through Instance().

Instance() returns the one-and-only instance; creating it if one doesn't yet exist. Also declares "cleaner" for dtor call

Definition at line 81 of file EvtOverlaySingleton.cxx.

References EvtOverlaySingleton(), fgTheInstance, and EvtOverlaySingleton::Cleaner::UseMe().

Referenced by EvtInfoInjectorModule::Ana(), EvtAddRawDigitBlockModule::Ana(), EvtInfoInjectorModule::BeginJob(), EvtAddRawDigitBlockModule::BookHist(), GetClosestBeamMonSpill(), GetCrateT0s(), MnvRawDigitSuppression::Reco(), and EvtAddRawDigitBlockModule::Reco().

00082 {
00085 
00086   // Cleaner dtor calls EvtOverlaySingleton dtor at job end
00087   static Cleaner cleaner;
00088 
00089   if ( ! fgTheInstance ) {
00090     // need to create one
00091     cleaner.UseMe();   // dummy call to quiet compiler warnings
00092     fgTheInstance = new EvtOverlaySingleton();
00093   }
00094   
00095   return *fgTheInstance;
00096 }

bool EvtOverlaySingleton::IsValidMonitor (  )  [inline]

Definition at line 99 of file EvtOverlaySingleton.h.

References fValidMonitorMatch.

Referenced by EvtAddRawDigitBlockModule::Reco().

00099 { return fValidMonitorMatch; }

bool EvtOverlaySingleton::IsValidSnarl (  )  [inline]

Definition at line 98 of file EvtOverlaySingleton.h.

References fValidSnarlMatch.

Referenced by EvtInfoInjectorModule::Ana(), and EvtAddRawDigitBlockModule::Reco().

00098 { return fValidSnarlMatch; }

void EvtOverlaySingleton::MapDaqFiles ( int  verbose = 0  ) 

fill mapping (after all files added)

Scan the TChain looking for entries that have a trigger that corresponds to one or more bits in the desired mask Fill a mapping from the header time to entry #

Do DaqSnarl chain

Do DaqMonitor chain

Definition at line 202 of file EvtOverlaySingleton.cxx.

References VldTimeStamp::AsString(), RawRecord::FindRawBlock(), fMapMonitorTime2Entry, fMapMonitorTime2EntrySize, fMapped, fMapSnarlTime2Entry, fMapSnarlTime2EntrySize, fRawDaqMonitorChain, fRawDaqMonitorRec, fRawDaqSnarlChain, fRawDaqSnarlRec, fTriggerMask, VldTimeStamp::GetBOT(), VldTimeStamp::GetEOT(), RecMinos::GetHeader(), VldContext::GetTimeStamp(), RawDaqSnarlHeader::GetTrigSrc(), RecMinosHdr::GetVldContext(), kBOT, kEOT, RawRecord::Print(), and timer().

Referenced by EvtInfoInjectorModule::BeginJob(), FindClosestDaqSnarl(), and FindLowerBoundDaqMonitor().

00203 {
00207 
00208   verbose = 1;
00209 
00210   if ( fMapped ) return;   // already done?  ... move along
00211 
00212   fMapSnarlTime2Entry.clear();  // start fresh .. things might have changed
00213 
00214   TStopwatch timer;
00215 
00216   Long64_t nRawEntries;
00217   int brStatus;
00218 
00220   timer.Start();
00221   nRawEntries = fRawDaqSnarlChain->GetEntries();
00222   brStatus    = fRawDaqSnarlChain->SetBranchAddress("RawRecord",
00223                                                     &fRawDaqSnarlRec);
00224   if ( verbose > 0 ) {
00225     std::cout << "EvtOverlaySingleton::MapDaqFiles saw "
00226               << nRawEntries << " entries in fRawDaqSnarlChain" 
00227               << ", branch status=" << brStatus << std::endl;
00228   }
00229 
00230   // now loop over entries looking for ones that meet our trigger criteria
00231   for (Long64_t iRawEntry = 0; iRawEntry < nRawEntries; ++iRawEntry) {
00232 
00233     fRawDaqSnarlChain->GetEntry(iRawEntry);
00234 
00235     const RawDaqSnarlHeader* rawSnarlHeader =
00236       dynamic_cast<const RawDaqSnarlHeader*>(fRawDaqSnarlRec->GetHeader());
00237     if ( ! rawSnarlHeader ) {
00238       std::cerr << "EvtOverlaySingleton::MapDaqFiles (DaqSnarl)"
00239                 << " Ouch!  Not a RawDaqSnarlHeader" << std::endl;
00240       continue;
00241     }
00242     int trigger = rawSnarlHeader->GetTrigSrc();
00243     if ( ( trigger & fTriggerMask ) == 0 ) {
00244       // not of the desired trigger type ... ignore it
00245       continue;
00246     }
00247     VldTimeStamp tsSnarl = rawSnarlHeader->GetVldContext().GetTimeStamp();
00248     fMapSnarlTime2Entry[tsSnarl] = iRawEntry;
00249 
00250     if ( verbose > 1 ) {
00251       std::cout << "new entry: " << tsSnarl.AsString("c") 
00252                 << " entry " << iRawEntry << std::endl;
00253     }
00254 
00255   }
00256 
00257   fMapSnarlTime2EntrySize = fMapSnarlTime2Entry.size();
00258 
00259   timer.Stop();
00260   if ( verbose > 0 ) {
00261     std::cout << "EvtOverlaySingleton::MapDaqFiles (DaqSnarl)"
00262               << " saw " << fMapSnarlTime2EntrySize
00263               << " snarls matching trigger mask "
00264               << std::setfill('0') << "0x" << std::hex 
00265               << std::setw(8) << fTriggerMask << std::dec
00266               << std::setfill(' ') << endl << "   scan took ";
00267     timer.Print();
00268     //std::cout << std::endl;
00269   }
00270 
00271   // put in some sentinel values to delimit range
00272   // this avoids us having to do special processing when times are
00273   // out of the range covered by the actual files
00274   fMapSnarlTime2Entry[VldTimeStamp::GetBOT()] = kBOT;
00275   fMapSnarlTime2Entry[VldTimeStamp::GetEOT()] = kEOT;
00276 
00277 
00279   timer.Reset();
00280   timer.Start();
00281   nRawEntries = fRawDaqMonitorChain->GetEntries();
00282   brStatus    = fRawDaqMonitorChain->SetBranchAddress("RawRecord",
00283                                                       &fRawDaqMonitorRec);
00284   if ( verbose > 0 ) {
00285     std::cout << "EvtOverlaySingleton::MapDaqFiles saw "
00286               << nRawEntries << " entries in fRawDaqMonitorChain" 
00287               << ", branch status=" << brStatus << std::endl;
00288   }
00289 
00290   // now loop over entries looking for ones that meet our trigger criteria
00291   for (Long64_t iRawEntry = 0; iRawEntry < nRawEntries; ++iRawEntry) {
00292 
00293     fRawDaqMonitorChain->GetEntry(iRawEntry);
00294 
00295     const RawDaqHeader* rawMonitorHeader =
00296       dynamic_cast<const RawDaqHeader*>(fRawDaqMonitorRec->GetHeader());
00297     if ( ! rawMonitorHeader ) {
00298       std::cerr << "EvtOverlaySingleton::MapDaqFiles (DaqMonitor)"
00299                 << " Ouch!  Not a RawDaqHeader" << std::endl;
00300       continue;
00301     }
00302     // some DaqMonitor records have duplicate times
00303     // there seem to be those with RawLiTpmtDigitsBlocks or Start/EndRun
00304     // we only really care about those with RawVtmTimeInfoBlocks
00305     const RawVtmTimeInfoBlock* rvtib =
00306       dynamic_cast<const RawVtmTimeInfoBlock*>(fRawDaqMonitorRec->FindRawBlock("RawVtmTimeInfoBlock"));
00307     if ( ! rvtib ) continue;
00308 
00309     VldTimeStamp tsMonitor = rawMonitorHeader->GetVldContext().GetTimeStamp();
00310     // check for entry w/ same timestamp
00311     mapTsL64citr_t mitrMonitor = fMapMonitorTime2Entry.find(tsMonitor);
00312     if ( mitrMonitor != fMapMonitorTime2Entry.end()) {
00313       std::cout <<" !++++++++++++++++++++++ DaqMonitor entries w/ same ts " << tsMonitor.AsString("c") << std::endl;
00314       fRawDaqMonitorRec->Print("l"); // list of blocks held
00315       fRawDaqMonitorChain->GetEntry(mitrMonitor->second);
00316       fRawDaqMonitorRec->Print("l"); // list of blocks held
00317     }
00318     fMapMonitorTime2Entry[tsMonitor] = iRawEntry;
00319 
00320     if ( verbose > 1 ) {
00321       std::cout << "new entry: " << tsMonitor.AsString("c") 
00322                 << " entry " << iRawEntry << std::endl;
00323     }
00324 
00325   }
00326 
00327   fMapMonitorTime2EntrySize = fMapMonitorTime2Entry.size();
00328 
00329   timer.Stop();
00330   if ( verbose > 0 ) {
00331     std::cout << "EvtOverlaySingleton::MapDaqFiles (DaqMonitor)"
00332               << " saw " << fMapMonitorTime2EntrySize
00333               << " containing a RawVtmTimeInfoBlock"
00334               << endl << "   scan took ";
00335     timer.Print();
00336     //std::cout << std::endl;
00337   }
00338 
00339   // put in some sentinel values to delimit range
00340   // this avoids us having to do special processing when times are
00341   // out of the range covered by the actual files
00342   fMapMonitorTime2Entry[VldTimeStamp::GetBOT()] = kBOT;
00343   fMapMonitorTime2Entry[VldTimeStamp::GetEOT()] = kEOT;
00344 
00345   fMapped = true;
00346 }

size_t EvtOverlaySingleton::NumUserTimes (  )  const [inline]

How many user times do we have.

Definition at line 69 of file EvtOverlaySingleton.h.

References fUserTimes.

Referenced by EvtInfoInjectorModule::BeginJob().

00069 { return fUserTimes.size(); }

void EvtOverlaySingleton::operator= ( const EvtOverlaySingleton  )  [private]

Method private and not implement, declared to prevent assignment.

int EvtOverlaySingleton::ReadOneSpillTimesFile ( std::string  fname,
int  verbose = 0 
) [private]

Definition at line 119 of file EvtOverlaySingleton.cxx.

References VldTimeStamp::AsString(), fUserTimes, fUserTmax, fUserTmin, Munits::mm, MM, nelements, and Munits::ns.

Referenced by ReadSpillTimesFiles().

00120 {
00121 
00122   const size_t maxChar = 1024;
00123   char textLine[maxChar] = { 0 };
00124 
00125   int npushed = 0;
00126 
00127   ifstream fin(fname.c_str());
00128   while ( ! fin.eof() && fin.good() ) {
00129     fin.getline(textLine,maxChar);
00130     if ( ! fin.good() ) break;
00131 
00132     std::string textString(textLine);
00133 
00134     // remove anything following # or ! (i.e. comments)
00135     size_t startComment = textString.find_first_of("#!");
00136     if ( startComment != std::string::npos )
00137       textString.erase(startComment,std::string::npos);
00138 
00139     // remove leading blank chars
00140     size_t notblank = textString.find_first_not_of(" \t\n");
00141     if ( notblank != 0 ) textString.erase(0,notblank);
00142 
00143     if ( verbose > 1 ) {
00144       std::cout << "original: \"" << textLine   << "\"" << std::endl
00145                 << "trimmed:  \"" << textString << "\"" << std::endl;
00146     }
00147 
00148     // after comment & blank trimming ... ignore blank lines
00149     if ( textString.size() == 0 || textString == " " ) continue;
00150 
00151     // parse the line ... should look like: "2011-12-19 17:22:20.647377720Z"
00152     if ( '#' == textString[0] ) continue;
00153 
00154     int YY=-1, MM=-1, DD=-1, hh=-1, mm=-1, ss=-1, ns=-1;
00155     // tmin, tmax are optional
00156     double tmin=-99, tmax=+99; // expected default values if unset
00157     int nelements = sscanf(textString.c_str(),"%d-%d-%d %d:%d:%d.%dZ %lg %lg",
00158                            &YY,&MM,&DD,&hh,&mm,&ss,&ns,&tmin,&tmax);
00159     if ( nelements < 7 ) {
00160       std::cerr << "EvtOverlaySingleton::ReadSpillTimesFile nelements " 
00161                 << nelements << " " 
00162                 << YY << "-" << MM << "-" << DD << " "
00163                 << hh << ":" << mm << ":" << ss << " nano " << ns << std::endl;
00164       continue;
00165     }
00166     VldTimeStamp ts(YY,MM,DD,hh,mm,ss,ns);
00167     fUserTimes.push_back(ts);
00168     fUserTmin.push_back(tmin);
00169     fUserTmax.push_back(tmax);
00170 
00171     ++npushed;
00172 
00173     if ( verbose > 0 ) {
00174     std::cout << ts.AsString("c") 
00175               << " from \"" << textString << "\"" << std::endl;
00176     }
00177   }
00178   
00179   if ( verbose > 0 ) {
00180     std::cout << "read " << npushed << " from " << fname << ", now " 
00181               << fUserTimes.size() << " userTimes" << std::endl;
00182   }
00183 
00184   return npushed;
00185 }

int EvtOverlaySingleton::ReadSpillTimesFiles ( std::string  fname,
std::string  searchpaths = "",
int  verbose = 0 
)

Read a text file of UTC times representing spills, add it to the current list, return # added Wildcards allowed

Definition at line 100 of file EvtOverlaySingleton.cxx.

References ExpandFileList(), and ReadOneSpillTimesFile().

Referenced by EvtInfoInjectorModule::BeginJob().

00103 {
00104   std::vector<std::string> filelist = ExpandFileList(fname,searchpaths);
00105   size_t nfiles = filelist.size();
00106   int ntotal = 0;
00107   for (size_t i=0; i < nfiles; ++i) {
00108     std::string afile = filelist[i];
00109     ntotal += ReadOneSpillTimesFile(afile,verbose);
00110   }
00111   if ( verbose > 0 ) {
00112     std::cout << "ReadSpillTimesFile " << nfiles << " files " 
00113               << ntotal << " total times" << std::endl;
00114   }
00115 
00116   return ntotal;
00117 }

void EvtOverlaySingleton::SetTriggerMask ( int  mask  )  [inline]

Definition at line 85 of file EvtOverlaySingleton.h.

References fMapped, and fTriggerMask.

00085 { fTriggerMask = mask; fMapped = false; }

std::vector< std::string > EvtOverlaySingleton::TokenizeString ( std::string  values,
std::string  sepchar,
int  verbose = 0 
)

Handy helper functions.

Definition at line 759 of file EvtOverlaySingleton.cxx.

Referenced by EvtInfoInjectorModule::BeginJob(), and ExpandFileList().

00762 {
00763   // Separate "values" string into elements under the assumption
00764   // that they are separated by any of the characters in "spechar".
00765 
00766   std::vector<std::string> rlist;
00767 
00768   if (verbose) {
00769     std::cout << "values " << values 
00770               << " separated by \"" << sepchar << "\"" << std::endl;
00771   }
00772 
00773   size_t pos_beg = 0;
00774   size_t str_end = values.size();
00775   while ( pos_beg != string::npos && pos_beg < str_end ) {
00776     size_t pos_end = values.find_first_of(sepchar.c_str(),pos_beg);
00777     std::string onevalue = values.substr(pos_beg,pos_end-pos_beg);
00778     if (verbose) {
00779       std::cout << " onevalue \"" << onevalue  << "\" in [" 
00780                 << pos_beg << "," << pos_end << ")"<< std::endl;
00781     }
00782     pos_beg = pos_end+1;
00783     if ( pos_end == string::npos ) pos_beg = str_end;
00784     if ( onevalue != "" ) {
00785       rlist.push_back(onevalue);
00786     }
00787   }
00788 
00789   return rlist;
00790 }


Friends And Related Function Documentation

friend struct Cleaner [friend]

Definition at line 196 of file EvtOverlaySingleton.h.


Member Data Documentation

iterator for latest

Definition at line 157 of file EvtOverlaySingleton.h.

Referenced by FindLowerBoundDaqMonitor(), GetLowerBoundMonitorEntry(), and GetLowerBoundMonitorVldTimeStamp().

iterator for latest

Definition at line 156 of file EvtOverlaySingleton.h.

Referenced by FindClosestDaqSnarl(), GetClosestSnarlEntry(), and GetClosestSnarlVldTimeStamp().

The one-and-only instance.

Define static variable which holds the one-and-only instance.

Definition at line 136 of file EvtOverlaySingleton.h.

Referenced by Instance(), EvtOverlaySingleton::Cleaner::~Cleaner(), and ~EvtOverlaySingleton().

not including sentinels

Definition at line 153 of file EvtOverlaySingleton.h.

Referenced by FindLowerBoundDaqMonitor(), and MapDaqFiles().

Definition at line 154 of file EvtOverlaySingleton.h.

Referenced by FindLowerBoundDaqMonitor(), and MapDaqFiles().

map of RawRecord times to TChain entry # separate chains entires for DaqSnarl and DaqMonitor trees

Definition at line 151 of file EvtOverlaySingleton.h.

Referenced by FindClosestDaqSnarl(), and MapDaqFiles().

Definition at line 152 of file EvtOverlaySingleton.h.

Referenced by FindClosestDaqSnarl(), and MapDaqFiles().

Definition at line 164 of file EvtOverlaySingleton.h.

Referenced by AddDaqFile(), GetLowerBoundMonitorRawRecord(), and MapDaqFiles().

Definition at line 161 of file EvtOverlaySingleton.h.

Referenced by AddDaqFile(), GetClosestSnarlRawRecord(), and MapDaqFiles().

only valid for use with BeamMonSpill & POTs

Definition at line 170 of file EvtOverlaySingleton.h.

Referenced by GetClosestBeamMonSpill(), and GetClosestSpillPOTs().

not including sentinels

Definition at line 155 of file EvtOverlaySingleton.h.

Referenced by FindClosestDaqSnarl(), FindLowerBoundDaqMonitor(), GetMonitorTimeDifference(), and GetSnarlTimeDifference().

only accept DaqSnarls that have 1 of these bits on

Definition at line 147 of file EvtOverlaySingleton.h.

Referenced by GetTriggerMask(), MapDaqFiles(), and SetTriggerMask().

UTC times for spills.

Definition at line 138 of file EvtOverlaySingleton.h.

Referenced by GetUserTime(), NumUserTimes(), and ReadOneSpillTimesFile().

std::vector<double> EvtOverlaySingleton::fUserTmax [private]

Definition at line 144 of file EvtOverlaySingleton.h.

Referenced by GetUserTmax(), and ReadOneSpillTimesFile().

std::vector<double> EvtOverlaySingleton::fUserTmin [private]

times (sec) relative to the start of spill that are of interest digits w/ times outside of these might be suppressed if unset then use (-99,+99)

Definition at line 143 of file EvtOverlaySingleton.h.

Referenced by GetUserTmin(), and ReadOneSpillTimesFile().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1