FAQ:How do I get trigger information?

From Daya Bay
Jump to navigation Jump to search
Offline Documentation: [Offline Category] [FAQ] [Howto] [Reference] [Manual]

Offline Documentation
This article is part
of the Offline Documentation
Other pages...

Offline Category
How Tos
Getting Started
Software Installation

See also...

General Help on this Wiki

This page has general introduction to get ADC, TDC and part of trigger information in raw data: python

There are two ways to get full trigger information:

1. From ReadoutEvent:

 ReadoutHeader-->Readout-->ReadoutPmtCrate-->ReadoutTriggerDataPkg-->ReadoutTriggerDataFrame-->EsumComp or EsumADC

However, current RawDataIO doesn't fill these information so it could be empty right now.

2. From RawEvent:

   #include "Event/RawEventHeader.h"
   #include "Event/RawRom.h" 
   #include "Event/RawRomLtb.h"
   RawEventHeader* reh = get<RawEventHeader>(RawEventHeaderLocation::Default);
   if(reh == 0) {
     m_log << MSG::ERROR << "=======> Request Object can not be accessable." << endreq;
     return StatusCode::FAILURE;
   const vector<DayaBay::RawRom*>& modules = reh->modules();
   for(unsigned int i=0; i<modules.size(); i++) {
     switch(modules[i]->type()) {
       case 3: // RomLtb
           DayaBay::RawRomLtb* rawRomLtb;
           rawRomLtb = dynamic_cast<DayaBay::RawRomLtb*>(modules[i]);
           /// use the first LTB data frame
           const std::vector<DayaBay::RawLtbFrame*> & ltbFrame = rawRomLtb->frames();
           m_HSum = ltbFrame[0]->hsum();
           m_ESumComp = ltbFrame[0]->esumComp();
           m_ESumADC = ltbFrame[0]->esumADC();

The definition of ESumComp and ESumADC can be found in DYB-doc-3443-v7

Offline Software Documentation: [Offline Categories] [FAQ] [Offline Faq Category]