Revision: | 1.2 |
Committed: | Mon Nov 13 08:40:12 2006 UTC (18 years, 5 months ago) by flucke |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | CMSSW_1_3_6, CMSSW_1_3_1_HLT6, CMSSW_1_3_5, CMSSW_1_3_1_HLT5, CMSSW_1_3_1_HLT4, CMSSW_1_3_1_HLT3, CMSSW_1_3_4, CMSSW_1_3_3, CMSSW_1_3_2, CMSSW_1_2_6, CMSSW_1_2_5, CMSSW_1_3_1, CMSSW_1_2_4, CMSSW_1_4_0_pre2, CMSSW_1_3_0, CMSSW_1_3_0_pre7, CMSSW_1_4_0_pre1, CMSSW_1_3_0_pre6, cklae_20070314, CMSSW_1_2_0_4821, CMSSW_1_2_0_g4_82p01, V01-02-00, V01-01-04, CMSSW_1_3_0_pre5, CMSSW_1_3_0_pre4, CMSSW_1_2_3, V01-01-03, CMSSW_1_3_0_pre3, V01-01-02, CMSSW_1_2_0_g4_82, CMSSW_1_3_0_SLC4_pre2, CMSSW_1_3_0_pre2, CMSSW_1_2_2, CMSSW_1_2_1, V01-01-01, V01-01-00, CMSSW_1_3_0_SLC4_pre1, CMSSW_1_3_0_pre1, V01-00-00, CMSSW_1_2_0_g4_81, CMSSW_1_2_0_SL4, V00-08-01, CMSSW_1_2_0, V00-08-00, CMSSW_1_2_0_pre9, CMSSW_1_2_0_pre8_g4_81, CMSSW_1_2_0_pre8, V00-07-03, CMSSW_1_2_0_pre6, CMSSW_1_2_0_pre5, V00-07-02 |
Changes since 1.1: | +3 -3 lines |
Log Message: | - many const char* instead of char* as argument - some few class arguments by const reference |
# | User | Rev | Content |
---|---|---|---|
1 | fronga | 1.1 | #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentIORootBase_h |
2 | #define Alignment_CommonAlignmentAlgorithm_AlignmentIORootBase_h | ||
3 | |||
4 | #include "TFile.h" | ||
5 | #include "TTree.h" | ||
6 | #include "TVector.h" | ||
7 | #include "TString.h" | ||
8 | |||
9 | #include <string> | ||
10 | #include <iostream> | ||
11 | #include <vector> | ||
12 | #include <map> | ||
13 | |||
14 | #include "Alignment/CommonAlignment/interface/Alignable.h" | ||
15 | |||
16 | /// Base class for ROOT-based I/O of Alignment parameters etc. | ||
17 | |||
18 | class AlignmentIORootBase | ||
19 | { | ||
20 | |||
21 | protected: | ||
22 | |||
23 | /// destructor | ||
24 | virtual ~AlignmentIORootBase(){}; | ||
25 | |||
26 | /// open IO | ||
27 | flucke | 1.2 | int openRoot(const char* filename, int iteration, bool writemode); |
28 | fronga | 1.1 | |
29 | /// close IO | ||
30 | int closeRoot(void); | ||
31 | |||
32 | /// create root branches | ||
33 | virtual void createBranches(void) = 0; | ||
34 | |||
35 | /// set root branches | ||
36 | virtual void setBranchAddresses(void) = 0; | ||
37 | |||
38 | /// test if file is existing and if so, what the highest iteration is | ||
39 | flucke | 1.2 | int testFile(const char* filename, const TString &tname); |
40 | fronga | 1.1 | |
41 | /// compose tree name | ||
42 | flucke | 1.2 | TString treeName(int iter, const TString &tname); |
43 | fronga | 1.1 | |
44 | // data members | ||
45 | |||
46 | TFile* IORoot; // root file | ||
47 | TTree* tree; // root tree | ||
48 | TString treename; // tree identifier name | ||
49 | TString treetxt; // tree text | ||
50 | bool bWrite; // if true we are writing, else reading | ||
51 | |||
52 | const static int nParMax = 6; // maximal number of Parameters | ||
53 | const static int itermax = 1000; // max iteration to test for | ||
54 | |||
55 | }; | ||
56 | |||
57 | #endif |