1 |
fronga |
1.1 |
#ifndef Alignment_CommonAlignmentAlgorithm_AlignmentParametersIORoot_h
|
2 |
|
|
#define Alignment_CommonAlignmentAlgorithm_AlignmentParametersIORoot_h
|
3 |
|
|
|
4 |
flucke |
1.3 |
/// \class AlignmentParametersIORoot
|
5 |
|
|
///
|
6 |
|
|
/// Concrete class for ROOT-based I/O of AlignmentParameters
|
7 |
|
|
///
|
8 |
flucke |
1.6 |
/// $Date: 2007/10/08 14:38:15 $
|
9 |
|
|
/// $Revision: 1.5 $
|
10 |
|
|
/// (last update by $Author: cklae $)
|
11 |
fronga |
1.1 |
|
12 |
cklae |
1.5 |
#include "Alignment/CommonAlignment/interface/StructureType.h"
|
13 |
fronga |
1.1 |
#include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h"
|
14 |
|
|
#include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentParametersIO.h"
|
15 |
|
|
|
16 |
flucke |
1.2 |
class AlignmentParametersIORoot : public AlignmentIORootBase, public AlignmentParametersIO
|
17 |
fronga |
1.1 |
{
|
18 |
|
|
friend class AlignmentIORoot;
|
19 |
|
|
|
20 |
|
|
private:
|
21 |
|
|
|
22 |
|
|
/// Constructor
|
23 |
|
|
AlignmentParametersIORoot();
|
24 |
|
|
|
25 |
|
|
/// Write AlignmentParameters of one Alignable
|
26 |
|
|
int writeOne(Alignable* ali);
|
27 |
|
|
|
28 |
|
|
/// Read AlignmentParameters of one Alignable
|
29 |
|
|
AlignmentParameters* readOne(Alignable* ali, int& ierr);
|
30 |
|
|
|
31 |
|
|
/// Open IO
|
32 |
flucke |
1.2 |
int open(const char* filename, int iteration, bool writemode)
|
33 |
fronga |
1.1 |
{return openRoot(filename,iteration,writemode);};
|
34 |
|
|
|
35 |
|
|
/// Close IO
|
36 |
|
|
int close(void) {return closeRoot();};
|
37 |
|
|
|
38 |
|
|
// helper functions
|
39 |
|
|
|
40 |
cklae |
1.5 |
/// Find entry number corresponding to ID and structure type.
|
41 |
|
|
/// Returns -1 on failure.
|
42 |
|
|
int findEntry(align::ID, align::StructureType);
|
43 |
fronga |
1.1 |
|
44 |
|
|
/// Create all branches and give names
|
45 |
|
|
void createBranches(void);
|
46 |
|
|
|
47 |
|
|
/// Set branch adresses
|
48 |
|
|
void setBranchAddresses(void);
|
49 |
|
|
|
50 |
|
|
// Alignment parameter tree
|
51 |
flucke |
1.6 |
int theCovRang, theCovarRang, theHieraLevel, theParamType;
|
52 |
cklae |
1.5 |
align::ID theId;
|
53 |
|
|
align::StructureType theObjId;
|
54 |
|
|
|
55 |
fronga |
1.1 |
double thePar[nParMax],theCov[nParMax*(nParMax+1)/2];
|
56 |
|
|
|
57 |
|
|
};
|
58 |
|
|
|
59 |
|
|
#endif
|