1 #include "otsdaq-demo/DemoRootUtilities/DemoDQMHistos.h"
7 #include <TDirectory.h>
14 DemoDQMHistos::DemoDQMHistos(
void) {}
17 DemoDQMHistos::~DemoDQMHistos(
void) {}
20 void DemoDQMHistos::book(TFile* rootFile)
22 std::cout <<
"Booking start!" << std::endl;
23 TDirectory* currentDir = rootFile->mkdir(
"General",
"General");
26 sequenceNumbers_ =
new TH1I(
"SequenceNumber",
"Sequence Number", 256, 0, 255);
27 dataNumbers_ =
new TH1I(
"Data",
"Data", 101, 0, 0x400000 * 100);
31 void DemoDQMHistos::fill(std::string& buffer, std::map<std::string, std::string> header)
34 unsigned long long dataQW = *((
unsigned long long*)&((buffer)[2]));
36 ss <<
"dataP Read: 0x ";
37 for(
unsigned int i = 0; i < (buffer).size(); ++i)
38 ss << std::hex << (
int)(((buffer)[i] >> 4) & 0xF)
39 << (
int)(((buffer)[i]) & 0xF) <<
" " << std::dec;
41 std::cout <<
"\n" << ss.str();
43 std::cout <<
"sequence = " << (int)*((
unsigned char*)&((buffer)[1])) << std::endl;
45 std::cout <<
"dataQW = 0x" << std::hex << (dataQW) <<
" " << std::dec << dataQW
49 sequenceNumbers_->Fill((
unsigned int)(*((
unsigned char*)&((buffer)[1]))));
50 dataNumbers_->Fill(dataQW
56 void DemoDQMHistos::load(std::string fileName)