36{
38
40
42 const char *suff = "raw.root";
45 bool reset = false;
46 bool resetaff = false;
47 bool resetpar = false;
49 int from_plate = 57;
50 int to_plate = 1;
53 float dzbase = 210;
54 int refplate = -1;
55
57 bool do_updateaff=0;
58 bool do_updatesetrawaff=0;
59 bool do_updatesetaff=0;
60 bool do_copyset=0;
62
63 for(int i=1; i<argc; i++ ) {
64 char *key = argv[i];
65
66 if(!strncmp(key,"-set=",5))
67 {
68 if(strlen(key)>5)
id.
Set(key+5);
70 }
71 else if(!strncmp(key,"-o=",3))
72 {
73 if(strlen(key)>3)
outdir=key+3;
74 }
75 else if(!strncmp(key,"-suff=",6))
76 {
77 if(strlen(key)>6) suff=key+6;
78 }
79 else if(!strncmp(key,"-noaff",6))
80 {
82 }
83 else if(!strncmp(key,"-resetaff",9))
84 {
85 resetaff=true;
86 }
87 else if(!strncmp(key,"-refplate=",10))
88 {
89 refplate= atoi(key+10);
90 printf("\n******** refplate = %d *********** \n",refplate);
91 }
92 else if(!strncmp(key,"-resetpar",9))
93 {
94 resetpar=true;
95 }
96 else if(!strncmp(key,"-reset",6))
97 {
98 reset=true;
99 }
100 else if(!strncmp(key,"-v=",3))
101 {
103 }
104 else if(!strncmp(key,"-updateaff=",11))
105 {
106 if(strlen(key)>11) {
109 do_updateaff=1;
110 }
111 }
112 else if(!strncmp(key,"-updatesetrawaff",16))
113 {
114 do_updatesetrawaff=1;
115 }
116 else if(!strncmp(key,"-updatesetaff",13))
117 {
118 do_updatesetaff=1;
119 }
120 else if(!strncmp(key,"-copyset",8))
121 {
122 do_copyset=1;
123 }
124 else if(!strncmp(key,"-A=",3))
125 {
126 if(strlen(key)>3) idA.
Set(key+3);
127 }
128 else if(!strncmp(key,"-B=",3))
129 {
130 if(strlen(key)>3) idB.
Set(key+3);
131 }
132 else if(!strncmp(key,"-dz=",4))
133 {
134 if(strlen(key)>4)
dz = atof(key+4);
135 }
136 else if(!strncmp(key,"-dzbase=",8))
137 {
138 if(strlen(key)>8) dzbase = atof(key+8);
139 }
140 else if(!strncmp(key,"-from_plate=",12))
141 {
142 if(strlen(key)>12) from_plate = atoi(key+12);
143 }
144 else if(!strncmp(key,"-to_plate=",10))
145 {
146 if(strlen(key)>10) to_plate = atoi(key+10);
147 }
148 }
149
151 else {
152
155 if(id.eBrick<1) return 0;
156 Log(1,
"makescanset",
" for id %s",
id.AsString());
157
158 if (resetaff) {
161 }
162 else if(refplate>-1) {
165
167 }
168 else if(do_updateaff)
169 {
170 printf(
"updateaff: %s\n",affup.
AsString());
172 }
173 else if(do_updatesetrawaff)
174 {
175 printf(
"Update set raw aff: %s with %s_%s\n",
id.AsString(), idA.
AsString(), idB.
AsString() );
177 }
178 else if(do_updatesetaff)
179 {
180 printf(
"Update set aff: %s with %s\n",
id.AsString(), idA.
AsString() );
181
184 ss->TransformBrick(*ssu);
186 SafeDelete(
ss); SafeDelete(ssu);
187 }
188 else if(do_copyset)
189 {
190 printf(
"Copy set: %s into %s\n", idA.
AsString(),
id.AsString() );
193 printf("1\n");
195 printf("2\n");
196 ss.UpdateIDS(
id.eBrick,
id.eMajor,
id.eMinor);
197 printf("3\n");
199 printf("4\n");
201
202 }
203 else {
213 }
214 }
218 }
219 }
220
221}
bool Log(int level, const char *location, const char *fmt,...)
Definition: EdbLog.cxx:75
brick z0
Definition: RecDispMC.C:106
brick dz
Definition: RecDispMC.C:107
Definition: EdbAffine.h:17
void Print(Option_t *opt="") const
Definition: EdbAffine.cxx:52
const char * AsString() const
Definition: EdbAffine.cxx:57
void Set(EdbAffine2D &a)
Definition: EdbAffine.h:36
char * AsString() const
Definition: EdbID.cxx:26
bool Set(const char *id_string)
Definition: EdbID.cxx:19
scanned data processing
Definition: EdbScanProc.h:12
bool PrepareSetStructure(EdbScanSet &sc)
Definition: EdbScanProc.cxx:441
void UpdateSetWithAff(EdbID idset, EdbAffine2D aff)
Definition: EdbScanProc.cxx:2730
int WriteScanSet(EdbID id, EdbScanSet &ss)
Definition: EdbScanProc.cxx:1428
bool MakeAFFSet(EdbScanSet &sc)
Definition: EdbScanProc.cxx:394
bool MakeParSet(EdbScanSet &sc)
Definition: EdbScanProc.cxx:422
void UpdateSetWithPlatePar(EdbID id)
Definition: EdbScanProc.cxx:2765
void MakeScannedIDList(EdbID id0, EdbScanSet &sc, int pl_from, int pl_to, const char *suffix)
Definition: EdbScanProc.cxx:646
TString eProcDirClient
directory path for root data
Definition: EdbScanProc.h:14
EdbScanSet * ReadScanSet(EdbID id)
Definition: EdbScanProc.cxx:1482
Definition: EdbScanSet.h:11
void MakeNominalSet(EdbID id, int from_plate=57, int to_plate=1, float z0=0, float dz=-1300, float shr=1, float dzbase=210., float dzem=45.)
Definition: EdbScanSet.cxx:74
Bool_t SetAsReferencePlate(Int_t pid)
Definition: EdbScanSet.cxx:191
EdbScanProc * sproc
Definition: comptonmap.cpp:29
bool do_set
Definition: emrec.cpp:36
const char * outdir
Definition: emrec.cpp:37
gEDBDEBUGLEVEL
Definition: energy.C:7
ss
Definition: energy.C:62
void print_help_message()
Definition: makescanset.cpp:10
bool noaff
Definition: mc2raw.cxx:44
UInt_t id
Definition: tlg2couples.C:117