9{
10 if (argc < 2)
11 {
12 cout<< "usage: rwcread <input file (.rwc)> "<<endl;
13 return 0;
14 };
15
16 char* rwcname = argv[1];
17
19
20 if (
ReadCatalog((
void**)&pCat, (
char*)rwcname) != 1)
return false;
21
22 cout<<"-----------------------------------------------------------------------\n";
23 cout<<
"t_Hdr Hdr\tIO_Header Type BYTE InfoType = " <<pCat->
Hdr.
Type.
InfoType<<endl;
24 cout<<"\t\t\t\tWORD HeaderFormat = " <<pCat->Hdr.Type.HeaderFormat <<endl;
25 cout<<"\t\tIdentifier ID\tDWORD Part[0] = "<<pCat->Hdr.ID.Part[0] <<endl;
26 cout<<"\t\t\t\tDWORD Part[1] = " <<pCat->Hdr.ID.Part[1] <<endl;
27 cout<<"\t\t\t\tDWORD Part[2] = " <<pCat->Hdr.ID.Part[2] <<endl;
28 cout<<"\t\t\t\tDWORD Part[3] = " <<pCat->Hdr.ID.Part[3] <<endl;
29 cout<<"-----------------------------------------------------------------------\n";
30 cout<<"t_Area Area\tfloat XMin = " <<pCat->Area.XMin <<endl;
31 cout<<"\t\tfloat XMax = " <<pCat->Area.XMax <<endl;
32 cout<<"\t\tfloat YMin = " <<pCat->Area.YMin <<endl;
33 cout<<"\t\tfloat YMax = " <<pCat->Area.YMax <<endl;
34 cout<<"\t\tfloat XStep = " <<pCat->Area.XStep <<endl;
35 cout<<"\t\tfloat YStep = " <<pCat->Area.YStep <<endl;
36 cout<<"\t\tfloat XViews = " <<pCat->Area.XViews <<endl;
37 cout<<"\t\tfloat YViews = " <<pCat->Area.YViews <<endl;
38 cout<<"\t\tfloat Fragments = " <<pCat->Area.Fragments <<endl;
39 cout<<"-----------------------------------------------------------------------\n";
40 cout<<"t_Config Config\tint CountOfConfigs = " << pCat->Config.CountOfConfigs << endl;
41 cout<<"\t\tVS_Config *pConfigs char ClassName[64] = " << pCat->Config.pConfigs[0].ClassName << endl;
42 cout<<"\t\t\t\t SySalConfig Config char Name[64] = " << pCat->Config.pConfigs[0].Config.Name << endl;
43 cout<<"\t\t\t\t long CountOfItems = " << pCat->Config.pConfigs[0].Config.CountOfItems << endl;
44 cout<<"\t\t\t\t char *pItems = " << pCat->Config.pConfigs[0].Config.pItems[0] << endl;
45 cout<<"-----------------------------------------------------------------------\n";
46 cout<<"int *pFragmentIndices = " << pCat->pFragmentIndices[0] << endl;
47 cout<<"-----------------------------------------------------------------------\n";
48 cout<<"unsigned char Reserved[256] = " ; for(int i=0;i<256;i++) cout << pCat->Reserved[i]; cout<<endl;
49 cout<<"-----------------------------------------------------------------------\n";
50
51
52
53 cout<<endl<<endl<<endl<<"List of Configs"<<endl;
54 for (
int j=0;j<pCat->Config.CountOfConfigs;j++)
55
56 {
57 cout<<"-------------------------------------------\npConfigs["<<j<<"]"<<endl;
58 cout<<" ClassName = "<<pCat->Config.pConfigs[j].ClassName<<endl;
59 cout<<" Config.Name = "<<pCat->Config.pConfigs[j].Config.Name<<endl;
60 cout<<" Config.CountOfItems = "<<pCat->Config.pConfigs[j].Config.CountOfItems
61 <<"\n pItems =\n";
62 for(int k=0;k<pCat->Config.pConfigs[j].Config.CountOfItems;k++)
63 {
64 for(int l=0;l<39;l++) cout <<pCat->Config.pConfigs[j].Config.pItems[k*128+l];
65 cout << ":\t ";
66 for(int l=0;l<40;l++) cout <<pCat->Config.pConfigs[j].Config.pItems[k*128+64+l];
67 cout << endl;
68 }
69
70
71
72 cout<<endl;
73 }
74
75
76 cout<<endl<<endl<<"List of Fragment Indices"<<endl;
77 for(int j=0;j<pCat->Area.Fragments;j++) cout << pCat->pFragmentIndices[j] << " " ;
78 cout<< endl<<endl;
79
81
82
83
84};
int FreeMemory(void **ppData)
Definition: dataIO.cpp:67
int ReadCatalog(void **ppData, char *name)
Definition: dataIO.cpp:322
for(int i=0;i< nentries;i++)
Definition: check_shower.C:42
Definition: vscan_ds.h:60
IO_Header Type
Definition: vscan_ds.h:66
struct IO_VS_Catalog::@26 Hdr