#include "DaqBenchmark.h"
#include <ctime>
#include <sstream>
#include "TH2.h"
#include "Conventions/Electronics.h"
#include "DaqXml/DaqXmlStream.h"
#include "DaqReadoutFormat/RomData.h"
#include "Event/DaqCrate.h"
#include "Event/DaqFadcChannel.h"
#include "Event/DaqLtb.h"
#include "Event/DaqLtbFrame.h"
#include "Event/DaqPmtChannel.h"
#include "Event/DaqPmtCrate.h"
#include "Event/Readout.h"
#include "Event/ReadoutHeader.h"
#include "Event/ReadoutPmtChannel.h"
#include "Event/ReadoutPmtCrate.h"
#include "EventReadoutFormat/EventHeader.h"
#include "EventReadoutFormat/EventReadout.h"
#include "EventReadoutFormat/EventTraits.h"
#include "EventReadoutFormat/RomFragment.h"
#include "EventReadoutFormat/RomHeader.h"
#include "FeeReadoutFormat/FeeHit.h"
#include "FeeReadoutFormat/FeeReadout.h"
#include "FileReadoutFormat/DataSeparatorRecord.h"
#include "FileReadoutFormat/FileBuffer.h"
#include "FileReadoutFormat/FileTraits.h"
#include "LtbReadoutFormat/LtbFrame.h"
#include "LtbReadoutFormat/LtbReadout.h"
#include "LtbReadoutFormat/LtbTime.h"
#include "StatisticsSvc/IStatisticsSvc.h"
Include dependency graph for DaqBenchmark.cc:
Go to the source code of this file.
Defines | |
#define | TIME_T_BUILTIN_TYPE unsigned long |
Functions | |
static const string | i (" ") |
DaqBenchmark::DaqBenchmark (const string &name, ISvcLocator *pSvcLocator) | |
DaqBenchmark::~DaqBenchmark () | |
StatusCode | DaqBenchmark::initialize () |
StatusCode | DaqBenchmark::finalize () |
StatusCode | DaqBenchmark::execute () |
TH1F ** | DaqBenchmark::getSlotLowGainHistograms (const unsigned int slot) |
TH1F ** | DaqBenchmark::getSlotHighGainHistograms (const unsigned int slot) |
TH1F ** | DaqBenchmark::getSlotTdcHistograms (const unsigned int slot) |
TH1F ** | DaqBenchmark::getSlotHistogram (TH1F ***histograms, const unsigned int slot) |
TH2F ** | DaqBenchmark::getSlotFadcHistograms (const unsigned int slot) |
TH2F ** | DaqBenchmark::getSlotHistogram (TH2F ***histograms, const unsigned int slot) |
static const string | getName (const string &field, const unsigned int slot, const unsigned int channelId) |
static const string | getPath (const unsigned int slot, const unsigned int channelId, const char *name) |
TH1F * | DaqBenchmark::getLowGainHistogram (TH1F **slotLowGainHistograms, const unsigned int slot, const unsigned int channelNumber) |
TH1F * | DaqBenchmark::getHighGainHistogram (TH1F **slotHighGainHistograms, const unsigned int slot, const unsigned int channelNumber) |
TH1F * | DaqBenchmark::getTdcHistogram (TH1F **slotTdcHistograms, const unsigned int slot, const unsigned int channelNumber) |
TH2F * | DaqBenchmark::getFadcHistogram (TH2F **slotFadcHistograms, const unsigned int slot, const unsigned int channelNumber) |
static const time_t | getEventTime (const EventReadout &event) |
StatusCode | DaqBenchmark::handleDaqFormat (const ReadoutHeader &readoutHeader) |
void | DaqBenchmark::handleEvent (const DybDaq::EventReadout &event) |
void | DaqBenchmark::handleFragment (const RomFragment &fragment) |
void | DaqBenchmark::handleFee (const FeeReadout &readout, const unsigned int slot) |
static const time_t | getEventTime (const TimeStamp &time) |
StatusCode | DaqBenchmark::handleReadoutEvent (const ReadoutHeader &readoutHeader) |
void | DaqBenchmark::handleEvent (const DayaBay::ReadoutPmtCrate &crate) |
void | DaqBenchmark::handleChannel (const ReadoutPmtChannel &channel) |
StatusCode | DaqBenchmark::handleDaqEvent (const ReadoutHeader &readoutHeader) |
void | DaqBenchmark::handleEvent (const DayaBay::DaqPmtCrate &crate) |
void | DaqBenchmark::handleFrame (const DaqLtbFrame &) |
void | DaqBenchmark::handleChannel (const DaqPmtChannel &channel) |
void | DaqBenchmark::handleChannel (const DaqFadcChannel &channel) |
Variables | |
static const unsigned int | kMaxSlotCount = 22U |
static const unsigned int | kMaxFeeChannelCount = 32U |
static const unsigned int | kBytesInInt = 4U |
#define TIME_T_BUILTIN_TYPE unsigned long |
Definition at line 79 of file DaqBenchmark.cc.
static const string i | ( | " " | ) | [static] |
static const string getName | ( | const string & | field, | |
const unsigned int | slot, | |||
const unsigned int | channelId | |||
) | [static] |
Definition at line 233 of file DaqBenchmark.cc.
00235 { 00236 // Construct histogram name in statistics service 00237 stringstream name; 00238 name << field << " for slot_" << std::setfill('0') << std::setw(2) << slot 00239 << "_channel_" << std::setfill('0') << std::setw(2) << channelId; 00240 return name.str(); 00241 }
static const string getPath | ( | const unsigned int | slot, | |
const unsigned int | channelId, | |||
const char * | name | |||
) | [static] |
Definition at line 243 of file DaqBenchmark.cc.
00245 { 00246 // Construct histogram path in statistics service 00247 stringstream path; 00248 path << "/file0//benchmark" 00249 << "/slot_" << std::setfill('0') << std::setw(2) << slot 00250 << "/channel_" << std::setfill('0') << std::setw(2) << channelId 00251 << "/" << name; 00252 return path.str(); 00253 }
static const time_t getEventTime | ( | const EventReadout & | event | ) | [static] |
Definition at line 346 of file DaqBenchmark.cc.
00346 { 00347 const EventReadout::RomFragmentPtrList& fragments = event.romFragments(); 00348 unsigned int ltbModuleType = event.header().eventTraits().moduleType(EventTraits::kLtbModule); 00349 EventReadout::RomFragmentPtrList::const_iterator fragment = fragments.begin(); 00350 while((ltbModuleType != ((*fragment)->header().moduleType())) 00351 && fragment != fragments.end()) { 00352 ++fragment; 00353 } 00354 if (fragment == fragments.end()) { 00355 return 0; 00356 } 00357 const LtbReadout& ltbReadout = dynamic_cast<const LtbReadout&>((*fragment)->unwrappedData()); 00358 const LtbReadout::LtbFramePtrList& frames = ltbReadout.ltbFrames(); 00359 if (0 == frames.size()) { 00360 return 0; 00361 } 00362 return (*(frames.begin()))->dateTime().unixTime(); 00363 }
static const time_t getEventTime | ( | const TimeStamp & | time | ) | [static] |
Definition at line 441 of file DaqBenchmark.cc.
00441 { 00442 time_t seconds = time.GetSec(); 00443 return seconds; 00444 }
const unsigned int kMaxSlotCount = 22U [static] |
Definition at line 75 of file DaqBenchmark.cc.
const unsigned int kMaxFeeChannelCount = 32U [static] |
Definition at line 76 of file DaqBenchmark.cc.
const unsigned int kBytesInInt = 4U [static] |
Definition at line 77 of file DaqBenchmark.cc.