BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcAlignData.cxx
Go to the documentation of this file.
1#include "CalibData/Mdc/MdcAlignData.h"
2#include <fstream>
3#include <iostream>
4#include <sstream>
5#include <string>
6
7using namespace std;
8namespace CalibData {
9
10 StatusCode MdcAlignData::update( CalibBase1& other, MsgStream* log ) {
11 MdcAlignData& other1 = dynamic_cast<MdcAlignData&>( other );
12 cout << "\n"
13 << "here is the update in the MdcCal Alignment" << std::endl;
14 CalibBase1::update( other, log );
15 for ( int i = 0; i < 16; i++ )
16 {
17 dxEP[i] = other1.dxEP[i];
18 dyEP[i] = other1.dyEP[i];
19 dzEP[i] = other1.dzEP[i];
20 rxEP[i] = other1.rxEP[i];
21 ryEP[i] = other1.ryEP[i];
22 rzEP[i] = other1.rzEP[i];
23 }
24 for ( int i = 0; i < 6796; i++ )
25 {
26 dxWireEast[i] = other1.dxWireEast[i];
27 dyWireEast[i] = other1.dyWireEast[i];
28 dzWireEast[i] = other1.dzWireEast[i];
29 dxWireWest[i] = other1.dxWireWest[i];
30 dyWireWest[i] = other1.dyWireWest[i];
31 dzWireWest[i] = other1.dzWireWest[i];
32 tension[i] = other1.tension[i];
33 }
34
35 return StatusCode::SUCCESS;
36 }
37
38 void MdcAlignData::readPar( char* p1, char* p2, char* p3 ) {
39 int i;
40 string strtmp;
41
42 istringstream falign;
43 string aa1 = p1;
44 falign.str( aa1 );
45 for ( i = 0; i < 7; i++ ) falign >> strtmp;
46 for ( i = 0; i < 16; i++ )
47 { falign >> strtmp >> dxEP[i] >> dyEP[i] >> dzEP[i] >> rxEP[i] >> ryEP[i] >> rzEP[i]; }
48
49 istringstream fwpos;
50 string aa2 = p2;
51 fwpos.str( aa2 );
52 for ( i = 0; i < 7; i++ ) fwpos >> strtmp;
53 for ( i = 0; i < 6796; i++ )
54 {
55 fwpos >> strtmp >> dxWireEast[i] >> dyWireEast[i] >> dzWireEast[i] >> dxWireWest[i] >>
56 dyWireWest[i] >> dzWireWest[i];
57 }
58
59 istringstream ften;
60 string aa3 = p3;
61 ften.str( p3 );
62 for ( i = 0; i < 6796; i++ ) ften >> strtmp >> tension[i];
63 }
64} // namespace CalibData
double p2[4]
double p1[4]
virtual StatusCode update(CalibBase1 &obj, MsgStream *)
void readPar(char *p1, char *p2, char *p3)
virtual StatusCode update(CalibBase1 &other, MsgStream *log)