File indexing completed on 2024-04-06 11:56:22
0001 #ifndef HIPUserVariablesIORoot_H
0002 #define HIPUserVariablesIORoot_H
0003
0004 #include "Alignment/CommonAlignment/interface/Utilities.h"
0005 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h"
0006 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentUserVariablesIO.h"
0007
0008
0009
0010 class HIPUserVariablesIORoot : public AlignmentIORootBase, public AlignmentUserVariablesIO {
0011 public:
0012 using Alignables = align::Alignables;
0013
0014
0015 HIPUserVariablesIORoot();
0016
0017
0018 void writeHIPUserVariables(const Alignables& alivec, const char* filename, int iter, bool validCheck, int& ierr);
0019
0020
0021 std::vector<AlignmentUserVariables*> readHIPUserVariables(const Alignables& alivec,
0022 const char* filename,
0023 int iter,
0024 int& ierr);
0025
0026 private:
0027
0028 int writeOne(Alignable* ali) override;
0029
0030
0031 AlignmentUserVariables* readOne(Alignable* ali, int& ierr) override;
0032
0033
0034 int open(const char* filename, int iteration, bool writemode) override {
0035 newopen = true;
0036 return openRoot(filename, iteration, writemode);
0037 }
0038
0039
0040 int close(void) override { return closeRoot(); }
0041
0042
0043
0044 int findEntry(unsigned int detId, int comp);
0045 void createBranches(void) override;
0046 void setBranchAddresses(void) override;
0047
0048
0049
0050 static const int nparmax = 19;
0051
0052
0053 int ObjId;
0054 unsigned int Id;
0055 int Nhit, Nparj, Npare;
0056 int DataType;
0057 double Jtvj[nparmax * (nparmax + 1) / 2];
0058 double Jtve[nparmax];
0059 double AlignableChi2;
0060 unsigned int AlignableNdof;
0061 double Par[nparmax];
0062 double ParError[nparmax];
0063
0064 bool newopen;
0065 typedef std::map<std::pair<int, int>, int> treemaptype;
0066 treemaptype treemap;
0067 };
0068
0069 #endif