Belle II Software  release-08-01-10
maptest.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include "TMapFile.h"
9 #include "TH1.h"
10 
11 int main(int /*argc*/, char** /*argv*/)
12 {
13  TMapFile* file = TMapFile::Create("TestHisto", "RECREATE", 2000000);
14  TH1F* h1 = new TH1F("testhisto", "testhisto", 100, 0.0, 100.0);
15  file->Add(h1);
16  for (;;) {
17  for (int i = 0; i < 100; i++) {
18  h1->Fill((float)i, (float)i);
19  sleep(1);
20  file->Update();
21  }
22  h1->Reset();
23  }
24  return 0;
25 }
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:91