ndmspc  0.20250128.0
HnSparseStress.h
1 #ifndef HnSparseStress_H
2 #define HnSparseStress_H
3 
4 #include <TObject.h>
5 #include <TStopwatch.h>
6 #include <THnSparse.h>
7 
8 #include "HnSparse.h"
9 namespace Ndmspc {
10 namespace Ndh {
11 
18 
19 class HnSparseStress : public TObject {
20 
21  public:
23 
24  private:
25  bool GenerateRecursiveLoop(THnSparse * h, Int_t iDim, Double_t * coord, Int_t * start);
26  bool StressRecursiveLoop(HnSparse * h, int & iDim, int * coord);
27 
28  public:
29  virtual Bool_t Generate(THnSparse * h, Long64_t size = 1e3, Long64_t start = 1e3);
30  virtual Bool_t Stress(HnSparse * h, Long64_t size = 1e3, bool bytes = false);
31 
33  void SetDebugLevel(Int_t debug) { fDebugLevel = debug; }
35  void SetPrintRefresh(Int_t n) { fPrintRefresh = n; }
37  void SetRandomFill(bool rf) { fRandomFill = rf; }
38 
39  private:
40  Long64_t fNFilledMax{0};
41  Long64_t fNBytesMax{0};
42  TStopwatch fTimer;
43  TStopwatch fTimerTotal;
44  Int_t fDebugLevel{0};
45  Int_t fPrintRefresh{1000};
46  bool fRandomFill{false};
47  bool fDone{false};
48 
49  void PrintBin(Int_t n, Double_t * c, const char * msg);
50 
52  ClassDef(HnSparseStress, 1);
54 };
55 
56 } // namespace Ndh
57 } // namespace Ndmspc
58 
59 #endif /* HnSparseStress_H */
HnSparseStress object.
Int_t fDebugLevel
Debug level.
void SetPrintRefresh(Int_t n)
Setting print refresh.
bool fRandomFill
Flag is Fill is random.
Long64_t fNFilledMax
Max size of filled entries.
virtual Bool_t Generate(THnSparse *h, Long64_t size=1e3, Long64_t start=1e3)
void PrintBin(Int_t n, Double_t *c, const char *msg)
void SetRandomFill(bool rf)
Setting fill random flag.
bool fDone
Flag is process is done.
TStopwatch fTimerTotal
Total timer.
Int_t fPrintRefresh
Print refresh.
TStopwatch fTimer
Process timer.
void SetDebugLevel(Int_t debug)
Setting debug level.
Long64_t fNBytesMax
Max size in bytes.
bool GenerateRecursiveLoop(THnSparse *h, Int_t iDim, Double_t *coord, Int_t *start)
virtual Bool_t Stress(HnSparse *h, Long64_t size=1e3, bool bytes=false)
bool StressRecursiveLoop(HnSparse *h, int &iDim, int *coord)
HnSparse object.
Definition: HnSparse.h:19