NSCL DDAS  12.1-001
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 
30 class CMyEventSegment;
31 class CMyScaler;
32 
33 class CTCLInterpreter;
34 class CTCLObject;
35 
48 class CDDASStatisticsCommand : public CTCLObjectProcessor
49 {
50 private:
51  CMyEventSegment* m_pEventSegment;
52  std::vector<CMyScaler*>& m_Scalers;
53 
54 public:
65  CTCLInterpreter& interp, const char* command, CMyEventSegment* pSeg,
66  std::vector<CMyScaler*>& scalers
67  );
69  virtual ~CDDASStatisticsCommand();
70 
80  int operator()(CTCLInterpreter& interp, std::vector<CTCLObject>& objv);
81 
82 private:
91  void formatResult(
92  CTCLInterpreter& interp, CTCLObject& result,
93  size_t bytes, size_t runBytes
94  );
105  void formatCounters(
106  CTCLObject& result, size_t triggers, size_t accepted, size_t bytes
107  );
108 };
109 
110 #endif
Provides a statistics command processor that overrides the SBS one.
Definition: CDDASStatisticsCommand.h:49
CDDASStatisticsCommand(CTCLInterpreter &interp, const char *command, CMyEventSegment *pSeg, std::vector< CMyScaler * > &scalers)
Constructor.
Definition: CDDASStatisticsCommand.cpp:36
virtual ~CDDASStatisticsCommand()
Destructor.
Definition: CDDASStatisticsCommand.cpp:44
int operator()(CTCLInterpreter &interp, std::vector< CTCLObject > &objv)
Called to execute the Tcl command.
Definition: CDDASStatisticsCommand.cpp:48
Derived class for DDAS event segments.
Definition: CMyEventSegment.h:31
Generate scaler data from run statistics.
Definition: CMyScaler.h:48