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