NSCL DDAS 12.2-009
Support for XIA DDAS at FRIB
CDDASStatisticsCommand.h
Go to the documentation of this file.
1/*
2 This software is Copyright by the Board of Trustees of Michigan
3 State University (c) Copyright 2017.
4
5 You may use this software under the terms of the GNU public license
6 (GPL). The terms of this license are described at:
7
8 http://www.gnu.org/licenses/gpl.txt
9
10 Authors:
11 Ron Fox
12 Giordano Cerriza
13 NSCL
14 Michigan State University
15 East Lansing, MI 48824-1321
16*/
17
23#ifndef CDDASSTATISTICSCOMMAND_H
24#define CDDASSTATISTICSCOMMAND_H
25
26#include <vector>
27
28#include <TCLObjectProcessor.h>
29
30class CMyEventSegment;
31class CMyScaler;
32
33class CTCLInterpreter;
34class CTCLObject;
35
48class CDDASStatisticsCommand : public CTCLObjectProcessor {
49private:
50 CMyEventSegment *m_pEventSegment;
51 std::vector<CMyScaler *> &m_Scalers;
52
53public:
63 CDDASStatisticsCommand(CTCLInterpreter &interp, const char *command,
64 CMyEventSegment *pSeg,
65 std::vector<CMyScaler *> &scalers);
68
78 int operator()(CTCLInterpreter &interp, std::vector<CTCLObject> &objv);
79
80private:
89 void formatResult(CTCLInterpreter &interp, CTCLObject &result, size_t bytes,
90 size_t runBytes);
101 void formatCounters(CTCLObject &result, size_t triggers, size_t accepted,
102 size_t bytes);
103};
104
105#endif
Provides a statistics command processor that overrides the SBS one.
Definition: CDDASStatisticsCommand.h:48
CDDASStatisticsCommand(CTCLInterpreter &interp, const char *command, CMyEventSegment *pSeg, std::vector< CMyScaler * > &scalers)
Constructor.
Definition: CDDASStatisticsCommand.cpp:35
virtual ~CDDASStatisticsCommand()
Destructor.
Definition: CDDASStatisticsCommand.cpp:41
int operator()(CTCLInterpreter &interp, std::vector< CTCLObject > &objv)
Called to execute the Tcl command.
Definition: CDDASStatisticsCommand.cpp:43
Derived class for DDAS event segments.
Definition: CMyEventSegment.h:35
Generate scaler data from run statistics.
Definition: CMyScaler.h:49