00001
00003
00004 #ifndef EventFilter_StorageManager_SMWebPageHelper_h
00005 #define EventFilter_StorageManager_SMWebPageHelper_h
00006
00007 #include <string>
00008 #include <map>
00009
00010 #include "toolbox/mem/Pool.h"
00011 #include "xdaq/ApplicationDescriptor.h"
00012 #include "xgi/Output.h"
00013
00014 #include "EventFilter/Utilities/interface/Css.h"
00015
00016 #include "EventFilter/StorageManager/interface/ConsumerWebPageHelper.h"
00017 #include "EventFilter/StorageManager/interface/RegistrationCollection.h"
00018 #include "EventFilter/StorageManager/interface/SharedResources.h"
00019 #include "EventFilter/StorageManager/interface/StatisticsReporter.h"
00020 #include "EventFilter/StorageManager/interface/Utils.h"
00021 #include "EventFilter/StorageManager/interface/WebPageHelper.h"
00022 #include "EventFilter/StorageManager/interface/XHTMLMaker.h"
00023
00024
00025 namespace stor {
00026
00027 class DQMEventMonitorCollection;
00028 class FilesMonitorCollection;
00029 class FragmentMonitorCollection;
00030 class ResourceMonitorCollection;
00031 class RunMonitorCollection;
00032 class StreamsMonitorCollection;
00033
00034
00043 class SMWebPageHelper : public WebPageHelper<SMWebPageHelper>
00044 {
00045 public:
00046
00047 SMWebPageHelper
00048 (
00049 xdaq::ApplicationDescriptor*,
00050 SharedResourcesPtr
00051 );
00052
00056 void defaultWebPage(xgi::Output*) const;
00057
00061 void storedDataWebPage(xgi::Output*) const;
00062
00066 void filesWebPage(xgi::Output*) const;
00067
00071 void consumerStatistics(xgi::Output*) const;
00072
00076 void resourceBrokerOverview(xgi::Output*) const;
00077
00081 void resourceBrokerDetail(xgi::Output*, const long long& uniqueRBID) const;
00082
00086 void dqmEventWebPage(xgi::Output*) const;
00087
00091 void throughputWebPage(xgi::Output*) const;
00092
00093
00094 private:
00095
00099 XHTMLMaker::Node* createWebPageBody
00100 (
00101 XHTMLMaker&,
00102 const std::string& pageTitle,
00103 const StateMachineMonitorCollection&
00104 ) const;
00105
00109 void addDOMforHyperLinks(XHTMLMaker&, XHTMLMaker::Node* parent) const;
00110
00114 void addDOMforResourceUsage
00115 (
00116 XHTMLMaker&,
00117 XHTMLMaker::Node* parent,
00118 ResourceMonitorCollection const&,
00119 ThroughputMonitorCollection const&
00120 ) const;
00121
00125 void addDOMforFragmentMonitor
00126 (
00127 XHTMLMaker& maker,
00128 XHTMLMaker::Node* parent,
00129 FragmentMonitorCollection const&
00130 ) const;
00131
00135 void addDOMforRunMonitor
00136 (
00137 XHTMLMaker& maker,
00138 XHTMLMaker::Node* parent,
00139 RunMonitorCollection const&
00140 ) const;
00141
00145 void addDOMforStoredData
00146 (
00147 XHTMLMaker& maker,
00148 XHTMLMaker::Node* parent,
00149 StreamsMonitorCollection const&
00150 ) const;
00151
00155 void addDOMforConfigString
00156 (
00157 XHTMLMaker& maker,
00158 XHTMLMaker::Node* parent,
00159 DiskWritingParams const&
00160 ) const;
00161
00165 void addDOMforFiles
00166 (
00167 XHTMLMaker& maker,
00168 XHTMLMaker::Node* parent,
00169 FilesMonitorCollection const&
00170 ) const;
00171
00175 void addDOMforThroughputStatistics
00176 (
00177 XHTMLMaker& maker,
00178 XHTMLMaker::Node* parent,
00179 ThroughputMonitorCollection const&
00180 ) const;
00181
00185 void addRowForThroughputStatistics
00186 (
00187 XHTMLMaker& maker,
00188 XHTMLMaker::Node* table,
00189 const ThroughputMonitorCollection::Stats::Snapshot&,
00190 bool const isAverage = false
00191 ) const;
00192
00196 void listStreamRecordsStats
00197 (
00198 XHTMLMaker& maker,
00199 XHTMLMaker::Node* table,
00200 StreamsMonitorCollection const&,
00201 const MonitoredQuantity::DataSetType
00202 ) const;
00203
00207 void addFragmentStats
00208 (
00209 XHTMLMaker& maker,
00210 XHTMLMaker::Node* table,
00211 FragmentMonitorCollection::FragmentStats const&,
00212 const MonitoredQuantity::DataSetType
00213 ) const;
00214
00218 void addRowForFramesReceived
00219 (
00220 XHTMLMaker& maker,
00221 XHTMLMaker::Node* table,
00222 FragmentMonitorCollection::FragmentStats const&,
00223 const MonitoredQuantity::DataSetType
00224 ) const;
00225
00229 void addRowForBandwidth
00230 (
00231 XHTMLMaker& maker,
00232 XHTMLMaker::Node* table,
00233 FragmentMonitorCollection::FragmentStats const&,
00234 const MonitoredQuantity::DataSetType
00235 ) const;
00236
00240 void addRowForRate
00241 (
00242 XHTMLMaker& maker,
00243 XHTMLMaker::Node* table,
00244 FragmentMonitorCollection::FragmentStats const&,
00245 const MonitoredQuantity::DataSetType
00246 ) const;
00247
00251 void addRowForLatency
00252 (
00253 XHTMLMaker& maker,
00254 XHTMLMaker::Node* table,
00255 FragmentMonitorCollection::FragmentStats const&,
00256 const MonitoredQuantity::DataSetType
00257 ) const;
00258
00262 void addRowForTotalVolume
00263 (
00264 XHTMLMaker& maker,
00265 XHTMLMaker::Node* table,
00266 FragmentMonitorCollection::FragmentStats const&,
00267 const MonitoredQuantity::DataSetType
00268 ) const;
00269
00273 void addRowForMaxBandwidth
00274 (
00275 XHTMLMaker& maker,
00276 XHTMLMaker::Node* table,
00277 FragmentMonitorCollection::FragmentStats const&,
00278 const MonitoredQuantity::DataSetType
00279 ) const;
00280
00284 void addRowForMinBandwidth
00285 (
00286 XHTMLMaker& maker,
00287 XHTMLMaker::Node* table,
00288 FragmentMonitorCollection::FragmentStats const&,
00289 const MonitoredQuantity::DataSetType
00290 ) const;
00291
00295 void addOutputModuleTables
00296 (
00297 XHTMLMaker& maker,
00298 XHTMLMaker::Node* parent,
00299 DataSenderMonitorCollection const&
00300 ) const;
00301
00306 void addOutputModuleStatistics
00307 (
00308 XHTMLMaker& maker,
00309 XHTMLMaker::Node* parent,
00310 long long uniqueRBID,
00311 DataSenderMonitorCollection const&
00312 ) const;
00313
00317 void addOutputModuleStatistics
00318 (
00319 XHTMLMaker& maker,
00320 XHTMLMaker::Node* parent,
00321 DataSenderMonitorCollection::OutputModuleResultsList const&
00322 ) const;
00323
00327 void addOutputModuleSummary
00328 (
00329 XHTMLMaker& maker,
00330 XHTMLMaker::Node* parent,
00331 DataSenderMonitorCollection::OutputModuleResultsList const&
00332 ) const;
00333
00338 void addResourceBrokerList
00339 (
00340 XHTMLMaker& maker,
00341 XHTMLMaker::Node* parent,
00342 DataSenderMonitorCollection const&
00343 ) const;
00344
00349 void addResourceBrokerDetails
00350 (
00351 XHTMLMaker& maker,
00352 XHTMLMaker::Node* parent,
00353 long long uniqueRBID,
00354 DataSenderMonitorCollection const&
00355 ) const;
00356
00361 void addFilterUnitList
00362 (
00363 XHTMLMaker& maker,
00364 XHTMLMaker::Node* parent,
00365 long long uniqueRBID,
00366 DataSenderMonitorCollection const&
00367 ) const;
00368
00372 void addTableForResourceUsages
00373 (
00374 XHTMLMaker& maker,
00375 XHTMLMaker::Node* parent,
00376 ResourceMonitorCollection::Stats const&,
00377 MonitoredQuantity::Stats const&
00378 ) const;
00379
00383 void addRowsForMemoryUsage
00384 (
00385 XHTMLMaker& maker,
00386 XHTMLMaker::Node* table,
00387 MonitoredQuantity::Stats const&
00388 ) const;
00389
00393 void addRowsForWorkers
00394 (
00395 XHTMLMaker& maker,
00396 XHTMLMaker::Node* table,
00397 ResourceMonitorCollection::Stats const&
00398 ) const;
00399
00403 void addRowsForSataBeast
00404 (
00405 XHTMLMaker& maker,
00406 XHTMLMaker::Node* table,
00407 ResourceMonitorCollection::Stats const&
00408 ) const;
00409
00413 void addTableForDiskUsages
00414 (
00415 XHTMLMaker& maker,
00416 XHTMLMaker::Node* parent,
00417 ResourceMonitorCollection::Stats const&
00418 ) const;
00419
00420
00421 private:
00422
00423
00424 SMWebPageHelper(SMWebPageHelper const&);
00425 SMWebPageHelper& operator=(SMWebPageHelper const&);
00426
00427 SharedResourcesPtr sharedResources_;
00428
00429 typedef ConsumerWebPageHelper<SMWebPageHelper,
00430 EventQueueCollection,
00431 StatisticsReporter> ConsumerWebPageHelper_t;
00432 ConsumerWebPageHelper_t consumerWebPageHelper_;
00433
00434 };
00435
00436 }
00437
00438 #endif // EventFilter_StorageManager_SMWebPageHelper_h
00439
00440