[6341ea]: iAIDA / tests / testAIDAmem.cpp Maximize Restore History

Download this file

testAIDAmem.cpp    50 lines (35 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// Copyright 2007 Andreas Pfeiffer
//
/*
* This file is part of iAIDA.
*
* iAIDA is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License.
*
* iAIDA is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with iAIDA. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AIDA/AIDA.h"
int main() {
AIDA::IAnalysisFactory* analysisFactory = AIDA_createAnalysisFactory();
AIDA::ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
AIDA::ITree* tree = treeFactory->create();
delete treeFactory;
AIDA::IHistogramFactory* histogramFactory =
analysisFactory->createHistogramFactory(*tree);
AIDA::IHistogram1D* aidaObject = histogramFactory->createHistogram1D("10",2,0.0,2.0);
delete histogramFactory;
aidaObject->fill(0.5);
aidaObject->fill(1.5);
delete tree;
delete analysisFactory;
std::cout << "Test run OK." << std::endl;
}