StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSpinDbMaker.cxx
1 // *-- Author : Jan Balewski
2 //
3 // $Id: StSpinDbMaker.cxx,v 1.14 2009/10/03 03:16:26 balewski Exp $
4 
5 
6 #include <time.h>
7 #include <string.h>
8 
9 #include <TDatime.h>
10 #include "St_db_Maker/St_db_Maker.h"
11 
12 #include "StSpinDbMaker.h"
13 
14 #include "tables/St_spinDbV124_Table.h"
15 #include "tables/St_spinDbStar_Table.h"
16 #include "tables/St_spinDbBXmask_Table.h"
17 
18 #include <StMessMgr.h>
19 
20 ClassImp(StSpinDbMaker)
21 
22 //________________________________________________________
23 //________________________________________________________
24 StSpinDbMaker::StSpinDbMaker(const char *name):StMaker(name){
25  gMessMgr->Message("","D") <<GetName()<<endm;
26  setDBname("Calibrations/rhic");
27  mNFound=0;
28 }
29 
30 
31 //________________________________________________________
32 //________________________________________________________
33 //_______________________________________________________
34 StSpinDbMaker::~StSpinDbMaker(){
35 
36 }
37 
38 
39 //________________________________________________________
40 //________________________________________________________
41 //________________________________________________________
42 Int_t
43 StSpinDbMaker::Init(){
44  return StMaker::Init();
45 }
46 
47 //__________________________________________________
48 //__________________________________________________
49 //__________________________________________________
50 void
51 StSpinDbMaker::clearTables(){
52  mDbDate=19990000;
53  mNFound=0;
54  mTabSpinV124=0;
55  mTabSpinStar=0;
56  mTabSpinBXmask=0;
57  int i;
58  for(i=0;i<SPINDbMaxBXings;i++) {
59  spin8bits[i]=-1;
60  spin4bits[i]=-1;
61  }
62 
63  for(i=0;i<SPINDbMaxRing;i++) mNfilledBunches[i]=-2;
64  mCADpolPattern="noLabel";
65 }
66 
67 //__________________________________________________
68 //__________________________________________________
69 //__________________________________________________
70 Int_t
71 StSpinDbMaker::InitRun (int runNumber){
72  LOG_INFO << GetName()<<"::InitRun= " <<runNumber <<endm;
73  clearTables();
74  requestDataBase();
75 
76  if(mTabSpinV124) {
77  auxilairyVariables();
78  optimizeTables();
79  }
80 
81  LOG_DEBUG << GetName()<<"::InitRun() nFound "<< mNFound<<" SPIN related tables "<<endm;
82 
83  return StMaker::InitRun(runNumber);
84 }
85 
86 
87 //__________________________________________________
88 //__________________________________________________
89 
90 void StSpinDbMaker::requestDataBase(){
91 
92  LOG_DEBUG <<Form ("%s::reloadDb using TimeStamp from 'StarDb'=%p or 'db'=%p ",GetName(),(void*)GetMaker("StarDb"),(void*)GetMaker("db"))<<endm;
93 
94 
95  St_db_Maker* stdb = (St_db_Maker*)GetMaker("StarDb");
96  if(stdb==0) stdb = (St_db_Maker*)GetMaker("db");// try the other name
97  assert(stdb);
98  mDbDate = stdb->GetDateTime().GetDate();
99 
100  StEvtHddr* fEvtHddr = (StEvtHddr*)GetDataSet("EvtHddr");
101 
102  LOG_INFO << GetName()<<"::RequestDataBase(),\n event time stamp="<< (int)fEvtHddr->GetUTime()<< " , yyyy/mm/dd="<< fEvtHddr->GetDate()<<" hh/mm/ss="<<fEvtHddr->GetTime()<<endm;
103 
104  LOG_DEBUG << GetName()<<"::RequestDataBase(), access DB='"<<mDbName<<"' use timeStamp="<< stdb->GetDateTime().AsString()<<endm;
105 
106  TDataSet *spindb=GetDataBase(mDbName );
107  if(spindb==0) {
108  LOG_ERROR << GetName()<<"::RequestDataBase() Could not find dbName ="<<mDbName <<endm;
109  return ;
110  // down-stream makers should check for presence of dataset
111  }
112  // spindb->ls(2);
113  getTable<St_spinDbV124,spinDbV124_st>(spindb,"spinV124",&mTabSpinV124);
114  getTable<St_spinDbStar,spinDbStar_st>(spindb,"spinStar",&mTabSpinStar);
115  getTable<St_spinDbBXmask,spinDbBXmask_st>(spindb,"spinBXmask",&mTabSpinBXmask);
116 
117  LOG_INFO << GetName()<<"::Request isValid="<< isValid()<<endm;
118 
119 
120 }
121 
122 //__________________________________________________
123 //__________________________________________________
124 //__________________________________________________
125 
126 void StSpinDbMaker::optimizeTables (){
127  /* labels of spin state for one beam
128  using respective nibble from 8-spinBit word
129  0 = unpol&filled, nibble=1001
130  + = up&filled , nibble=0011
131  - = down&filled , nibble=0101
132  E = empty&filled, nibble=0000
133  X = not allowed, any other nibble
134  */
135 
136  // Zero Posit Negat Empty
137  const int nibZ=9, nibP=3, nibN=5, nibE=0;
138  // printf("optimizeTables: bucketOffset: B=%d Y=%d\n",mTabSpinV124->bucketOffset[blueRing],mTabSpinV124->bucketOffset[yellRing]);
139 
140  int bx;
141  int nP2=0,nP1=0,nP0=0,nPer=0;
142  for(bx=0;bx<SPINDbMaxBXings;bx++){
143  // ..... find correct time bucket for pattern rotation in each ring
144  // this is tricky: bx is in STAR IP, but bBucket & yBucket have subtracted offsets modulo 120 !
145  int bBucket=(bx*3+mTabSpinV124->bucketOffset[blueRing])%SPINDbMaxBuckets;
146  if(bBucket<0) bBucket+=SPINDbMaxBuckets;
147 
148  int yBucket=(bx*3+mTabSpinV124->bucketOffset[yellRing])%SPINDbMaxBuckets;
149 
150  //...... find 4 spin bits for each ring
151  int yNib=mTabSpinV124->v124bits[yBucket]&0x0f;
152  int bNib=mTabSpinV124->v124bits[bBucket]>>4;
153 
154  int spin8=(bNib<<4) + yNib;
155  spin8bits[bx]=spin8;
156  //...... map 8spin bits to 4spin bits
157  int spin4 =-1;
158  if( (yNib==nibZ && bNib==nibZ) || (yNib==nibE && bNib==nibE) )
159  spin4=0;
160  else if ( yNib==nibE && bNib==nibP ) spin4=4;
161  else if ( yNib==nibE && bNib==nibN ) spin4=8;
162  else if ( yNib==nibP && bNib==nibE ) spin4=1;
163  else if ( yNib==nibP && bNib==nibP ) spin4=5;
164  else if ( yNib==nibN && bNib==nibP ) spin4=6;
165  else if ( yNib==nibN && bNib==nibE ) spin4=2;
166  else if ( yNib==nibP && bNib==nibN ) spin4=9;
167  else if ( yNib==nibN && bNib==nibN ) spin4=10;
168  // if(spin4>=0) printf("bx=%3d bucket: B%03d Y%03d spin8=%3d spin4=%d\n",bx,bBucket,yBucket,bNib<<4+yNib,spin4);
169  spin4bits[bx]=spin4;
170  //.......just count types of bXings
171  switch(spin4) {
172  case 0: nP0++; break;
173  case 1:
174  case 2:
175  case 4:
176  case 8:
177  nP1++; break;
178  case 5:
179  case 6:
180  case 9:
181  case 10:
182  nP2++; break;
183  default:
184  nPer++;
185  }
186  // printf("bx=%4d b=%4d y=%4d bNib=x%x yNib=x%x spin8=x%2x spin4=%2d\n",bx,bBucket/3, yBucket/3,bNib,yNib,spin8,spin4);
187 
188  }
189 
190  string polDir="scrambled";
191  if(isPolDirTrans()) polDir="Transverse";
192  if(isPolDirLong()) polDir="Longitudinal";
193 
194  LOG_INFO<< GetName()<<"::InitRun mOptimized() "<<
195  " nFillBunch blue="<<numberOfFilledBunchesBlue()<<" yellow="<<numberOfFilledBunchesYellow()<<", CAD pol pattern="<<mCADpolPattern<<
196  "\n polDir="<<polDir<<
197  " bXing w/ pol2="<<nP2<<" pol1="<<nP1<<" unPol="<<nP0<<" errPol="<<nPer<<endm;
198  return;
199 }
200 
201 
202 //_________________________________________________________
203 //_________________________________________________________
204 //_________________________________________________________
205 
207 
208  // printf("\n\nMake :::::: %s\n\n\n",GetName());
209 
210  return kStOK;
211 
212 }
213 
214 //_________________________________________________________
215 //_________________________________________________________
216 //_________________________________________________________
217 
218 template <class St_T, class T_st> void
219 StSpinDbMaker::getTable(TDataSet *mydb, TString tabName, T_st** outTab ){
220 
221  *outTab=0;
222  // printf("\n\n%s::TTT --> %s, size=%d\n",GetName(),tabName.Data(),sizeof(T_st));
223 
224  char name[1000];
225  sprintf(name,"%s",tabName.Data());
226 
227  gMessMgr->Message("","D") << GetName()<<"::InitRun request="<< name <<endm;
228 
229  St_T *ds= (St_T *)mydb->Find(name);
230  if(ds==0) {
231  gMessMgr->Message("","W") << GetName()<<"::InitRun table='"<< name <<"' not Found in DB, continue "<<endm;
232  return ;
233  }
234 
235  if(ds->GetNRows()!=1) {
236  gMessMgr->Message("","W") << GetName()<<"::InitRun table='"<< name <<"' no records, continue "<<endm;
237  return ;
238  }
239 
240  *outTab=(T_st *) ds->GetArray();
241 
242  if(*outTab==0) {
243  LOG_WARN<<" GetArray() failed"<<endm;
244  return ;
245  }
246 
247  mNFound++;
248  gMessMgr->Message("","I") << GetName()<<"::table '"<< name <<"': "<<(*outTab)->comment<<endm;
249 
250  return ; // copy the whole s-struct to allow flavor change;
251 
252 }
253 
254 
255 //--------------------------------------------------
256 //--------------------------------------------------
257 bool
258 StSpinDbMaker::isPolDir(spinDbEnum polDir){
259  if(!mTabSpinV124) return false;
260  int i;
261  // for(i=0;i<SPINDbMaxRing;i++) printf("rot(%d)=%d\n",i,mTabSpinV124->rotatorState[i]);
262 
263  for(i=0;i<SPINDbMaxRing;i++)
264  if(mTabSpinV124->rotatorState[i]!=polDir) return false;
265  return true;
266 }
267 
268 //--------------------------------------------------
269 //--------------------------------------------------
270 int
272  if(!isValid()) return -1;
273  if(bx48<0 || bx48>=SPINDbMaxBXings) return -1;
274  int bx=(bx48+mTabSpinStar->bXoff48)%SPINDbMaxBXings;
275  // printf("inspin4..., bx48=%d bx=%d\n",bx48,bx);
276  return spin4bits[bx];
277 }
278 
279 //--------------------------------------------------
280 //--------------------------------------------------
281 int
283  if(!isValid()) return -1;
284  if(bx7<0 || bx7>=SPINDbMaxBXings) return -1;
285  int bx=(bx7+mTabSpinStar->bXoff7)%SPINDbMaxBXings;
286  return spin4bits[bx];
287 }
288 
289 //--------------------------------------------------
290 //--------------------------------------------------
291 int
293  if(!isValid()) return -1;
294  if(bx48<0 || bx48>=SPINDbMaxBXings) return -1;
295  int bx=(bx48+mTabSpinStar->bXoff48)%SPINDbMaxBXings;
296  return spin8bits[bx];
297 }
298 
299 //--------------------------------------------------
300 //--------------------------------------------------
301 int
302 StSpinDbMaker:: spin8usingBX7(int bx7){
303  if(!isValid()) return -1;
304  if(bx7<0 || bx7>=SPINDbMaxBXings) return -1;
305  int bx=(bx7+mTabSpinStar->bXoff7)%SPINDbMaxBXings;
306  return spin8bits[bx];
307 }
308 
309 //--------------------------------------------------
310 //--------------------------------------------------
311 int
313  if(!isValid()) return -1;
314  return mTabSpinStar->bXoff48;
315 }
316 
317 //--------------------------------------------------
318 //--------------------------------------------------
319 bool
321  if(!isValid()) return false;
322  if(bx48<0 || bx48>=SPINDbMaxBXings) return false;
323  int bx=(bx48+mTabSpinStar->bXoff48)%SPINDbMaxBXings;
324  return ((spin8bits[bx] & 0x11)==0x11);
325 }
326 
327 
328 //--------------------------------------------------
329 //--------------------------------------------------
330 bool
332  if(!isValid()) return false;
333  if(bx<0 || bx>=SPINDbMaxBXings) return false;
334  return ((spin8bits[bx] & 0x11)==0x11);
335 }
336 
337 
338 //--------------------------------------------------
339 //--------------------------------------------------
340 int
342  if(!isValid()) return -1;
343  if(bx48<0 || bx48>=SPINDbMaxBXings) return -1;
344  return (bx48+mTabSpinStar->bXoff48)%SPINDbMaxBXings;
345 }
346 
347 //--------------------------------------------------
348 //--------------------------------------------------
349 int
350 StSpinDbMaker::BXstarUsingBX48(int bx48){
351  if(!isValid()) return -1;
352  if(bx48<0 || bx48>=SPINDbMaxBXings) return -1;
353  return (bx48+mTabSpinStar->bXoff48)%SPINDbMaxBXings;
354 }
355 
356 
357 //--------------------------------------------------
358 //--------------------------------------------------
359 bool
360 StSpinDbMaker:: isMaskedUsingBX48(int bx48){
361  if(!isValid()) return true;
362  if(bx48<0 || bx48>=SPINDbMaxBXings) return true;
363  int bxStar= BXstarUsingBX48(bx48);
364  return mTabSpinBXmask->bXmask[bxStar];
365 }
366 
367 
368 //--------------------------------------------------
369 //--------------------------------------------------
370 int
371 StSpinDbMaker::offsetBX48minusBX7(int bx48, int bx7){
372  if(!isValid()) return -1;
373  int bxa=BXstarUsingBX48(bx48);
374  int bxb=BXstarUsingBX7(bx7);
375  if(bxa<0 || bxb<0) return -1;
376  int diff=bxa-bxb;
377  if(diff<0) diff+=SPINDbMaxBXings;
378  return diff;
379 }
380 
381 //--------------------------------------------------
382 //--------------------------------------------------
383 bool
385  if(!isValid()) return false;
386  if(bxStar<0 || bxStar>=SPINDbMaxBXings) return false;
387  return ((spin8bits[bxStar] & 0x11)==0x11);
388 }
389 
390 
391 //--------------------------------------------------
392 //--------------------------------------------------
393 bool
394 StSpinDbMaker::isBXmaskedUsingBXyellow(int bxStar){
395  if(!isValid()) return true;
396  if(bxStar<0 || bxStar>=SPINDbMaxBXings) return true;
397  return mTabSpinBXmask->bXmask[bxStar];
398 }
399 
400 //--------------------------------------------------
401 //--------------------------------------------------
402 // EXPERT ONLY METHODS ....
403 //--------------------------------------------------
404 //--------------------------------------------------
405 
406 
407 //--------------------------------------------------
408 //--------------------------------------------------
409 const unsigned char *
411  return mTabSpinV124->v124bits;
412 }
413 
414 //--------------------------------------------------
415 //--------------------------------------------------
416 const int *
418  return mTabSpinV124->bucketOffset;
419 }
420 
421 //--------------------------------------------------
422 //--------------------------------------------------
423 const int *
425  return spin8bits;
426 }
427 
428 
429 //--------------------------------------------------
430 //--------------------------------------------------
431 int
433  if(!isValid()) return -1;
434  return mTabSpinStar->bXoff7;
435 }
436 
437 
438 //--------------------------------------------------
439 //--------------------------------------------------
440 int
442  if(!isValid() ) return -1;
443  if(bx7<0 || bx7>=SPINDbMaxBXings) return -1;
444  return (bx7+mTabSpinStar->bXoff7)%SPINDbMaxBXings;
445 }
446 
447 //--------------------------------------------------
448 //--------------------------------------------------
449 int
451  if(!isValid() ) return -1;
452  if(bx7<0 || bx7>=SPINDbMaxBXings) return -1;
453  return (bx7+mTabSpinStar->bXoff7)%SPINDbMaxBXings;
454 }
455 
456 
457 //--------------------------------------------------
458 //--------------------------------------------------
459 const char* StSpinDbMaker::getV124comment(){
460  return mTabSpinV124->comment;}
461 
462 //--------------------------------------------------
463 //--------------------------------------------------
464 void StSpinDbMaker::print(int level) {
465 
466  printf("SpinDb::print(level=%d) ...isValid=%d \n",level,isValid());
467  if(!isValid()) {
468  printf(" SpinDb not loaded or some tables not found, nFound=%d \n spinDB will not work if InitRun() was executed !!!\n\n",mNFound);
469  return;
470  }
471 
472  printf("Dump spinDB: valid=%d polTrans=%d polLong=%d BX7off=%d BX48off=%d\n", isValid(), isPolDirTrans(), isPolDirLong(), BX7offset(), BX48offset());
473 
474  printf(" spinDB: timeBucket offset: Blue=%d Yell=%d\n",getBucketOffsets()[blueRing],getBucketOffsets()[yellRing]);
475  printf(" spinDB: bXing offset: off7=%d off48=%d\n",mTabSpinStar->bXoff7,mTabSpinStar->bXoff48);
476 
477  printf("DB records labels:\n V124: %s \n BXoffset: %s\n BXmask: %s\n\n",mTabSpinV124->comment,mTabSpinStar->comment,mTabSpinBXmask->comment);
478  printf("dump of spin bits @ STAR IP, for 120 bXings, range [0,119]\n");
479  int bx;
480 
481  printf("bXstar spin8 spin4(dec) filled? masked? bx48 blueBx yellBx\n");
482 
483  for(bx=SPINDbMaxBXings-BX48offset();bx<2*SPINDbMaxBXings-BX48offset();bx++) {
484  int bx48=bx%SPINDbMaxBXings;// this is dangerous, but works right
485  int bXstar=BXstarUsingBX48(bx48);
486  int blueBx=(bXstar+getBucketOffsets()[blueRing]/3)%SPINDbMaxBXings;
487  int yellBx=(bXstar+getBucketOffsets()[yellRing]/3)%SPINDbMaxBXings;
488  int spin8=spin8usingBX48(bx48);
489  int spin4=spin4usingBX48(bx48);
490  const char *ftt="empty ";
491  if (isBXfilledUsingBX48(bx48))ftt="filled";
492  const char *mtt="use ";
493  if(isMaskedUsingBX48(bx48))mtt="*mask*";
494  printf(" %3d 0x%02x %2d %6s %6s %3d %3d %3d\n",bXstar,spin8,spin4,ftt,mtt,bx48,blueBx,yellBx);
495  // printf("bx48=%d mU=%d bxStar=%d mR=%d\n", bx48,isMaskedUsingBX48(bx48),bXstar,mTabSpinBXmask->bXmask[bXstar]);
496  // printf(" \n"); assert(1==2);
497  }
498 
499  if(level<=0) return;
500  int j;
501  printf("dump raw V124 spin bits:\n time bucket, spin8(hex)\n");
502  for(j=0;j<SPINDbMaxBuckets;j++)
503  printf("timeBucket=%3d rawV124=0x%x\n",j,getRawV124bits()[j]);
504 
505  printf("dump raw bXing mask \n STAR bXing mask (0=use, none-0=drop)\n");
506  for(j=0;j<SPINDbMaxBXings;j++)
507  printf("%3d %d\n",j,mTabSpinBXmask->bXmask[j]);
508 }
509 
510 //--------------------------------------------------
511 //--------------------------------------------------
512 int
513 StSpinDbMaker::numberOfFilledBunches(enum spinDbEnum iby) {
514  if(!isValid()) return -1;
515  return mNfilledBunches[iby];
516 }
517 
518 //--------------------------------------------------
519 //--------------------------------------------------
520 void
521 StSpinDbMaker::auxilairyVariables(){
522  int sumF[SPINDbMaxRing]={0,0};
523  TString patt[SPINDbMaxRing];
524 
525  int iby;
526  int i;
527  for (i=0;i<SPINDbMaxBXings;i++ ) {// loop over all 120 potential bunches
528  int nib=0;
529  for(iby=0;iby<SPINDbMaxRing;iby++) {
530  switch(iby) {
531  case blueRing: nib=mTabSpinV124->v124bits[i*3]>>4; break;
532  case yellRing: nib=mTabSpinV124->v124bits[i*3]&0x0f; break;
533  default: assert(1==2); // logical error
534  }
535  if (! nib&0x01) continue; // skip not filled bunch
536  sumF[iby]++;
537 
538  int bits=nib>>1; // drop the fill-bit
539  switch (bits) {
540  case 0x01: patt[iby]+="+"; break;
541  case 0x02: patt[iby]+="-"; break;
542  case 0x04: patt[iby]+="0"; break;
543  default: patt[iby]+="?";
544  }
545  } // end of Blue/yell
546 
547  }// end of bunches
548 
549 
550  for(i=0;i<SPINDbMaxRing;i++) mNfilledBunches[i]=sumF[i];
551 
552  // assign poll pattern according to CAD convention
553  int year=mDbDate/10000;
554  mCADpolPattern=""; mCADpolPattern+=year; mCADpolPattern+="_";
555 
556  switch(year) {
557  case 2005:
558  if(patt[blueRing].BeginsWith("+-+-") && patt[yellRing].BeginsWith("++--"))
559  { mCADpolPattern+="p1"; break; }
560  if(patt[blueRing].BeginsWith("-+-+") && patt[yellRing].BeginsWith("++--"))
561  { mCADpolPattern+="p2"; break; }
562  if(patt[blueRing].BeginsWith("+-+-") && patt[yellRing].BeginsWith("--++"))
563  { mCADpolPattern+="p3"; break; }
564  if(patt[blueRing].BeginsWith("-+-+") && patt[yellRing].BeginsWith("--++"))
565  { mCADpolPattern+="p4"; break; }
566  default:
567  mCADpolPattern+="noLabel";
568  }
569 
570  LOG_DEBUG << GetName()<<"::auxilairyVariables()" <<
571  Form(" dbDate=%d, CADpattern=%s\n Blue=%s\n Yell=%s, \n", mDbDate,mCADpolPattern.Data(), patt[blueRing].Data(), patt[yellRing].Data())<<endm;
572 
573 }
574 
575 
576 // $Log: StSpinDbMaker.cxx,v $
577 // Revision 1.14 2009/10/03 03:16:26 balewski
578 // fix of swap between spin4= 8 & 2
579 //
580 // Revision 1.13 2009/09/26 20:34:50 balewski
581 // additional methods added for 2009 data processing,
582 // since allignment of STAR bXing changed from yellow beam (2005) to blue (2009) the names of some methods were adjusted
583 //
584 // Revision 1.12 2007/05/30 02:38:54 balewski
585 // replace printf -->LOG_XXX
586 //
587 // Revision 1.11 2006/10/24 20:19:37 balewski
588 // cleanup: - spin4 for abort gaps, drop STARbXing
589 //
590 // Revision 1.10 2006/01/05 18:21:24 balewski
591 // added get: cadPollPatt, nFillBunch
592 // changed BXstar --> BXyellow
593 //
594 // Revision 1.9 2006/01/03 22:12:51 balewski
595 // 2 missing BX7 methods added
596 //
597 // Revision 1.8 2006/01/03 15:21:22 balewski
598 // more printouts
599 //
600 // Revision 1.7 2005/12/16 17:40:08 balewski
601 // more printout
602 //
603 // Revision 1.6 2005/11/04 18:56:07 balewski
604 // cleanup of printouts
605 //
606 // Revision 1.5 2005/10/06 16:36:32 balewski
607 // protection against printing not initialized DB content
608 //
609 // Revision 1.4 2005/10/05 13:41:47 balewski
610 // more get-methods
611 //
612 // Revision 1.3 2005/10/04 18:47:38 balewski
613 // cleanup
614 //
615 // Revision 1.2 2005/10/03 20:40:17 balewski
616 // clenup
617 //
618 // Revision 1.1 2005/09/30 23:47:45 balewski
619 // start
620 //
bool isBXfilledUsingInternalBX(int bx)
defined only for 2005 run by CAD , based on first 4 filled bunches in both rings. Note...
bool isPolDirTrans()
true if all needed DB tables were found
Definition: StSpinDbMaker.h:54
bool isValid()
dump spinDb content for current time stamp
Definition: StSpinDbMaker.h:53
int spin4bits[SPINDbMaxBXings]
vs. STAR==yellow bXing
Definition: StSpinDbMaker.h:48
int spin8usingBX48(int bx48)
Returns true if beams are longitudinally polarized, false otherwise.
bool isBXfilledUsingBX48(int bx48)
STAR==yellow bXing=(bx48+48off)%120.
bool isBXfilledUsingBXyellow(int bxStar)
should be zero for every run
virtual Int_t InitRun(int runumber)
to access STAR-DB
int spin4usingBX48(int bx48)
8bit spin information
int spin4usingBX7(int bx7)
8bit spin information
int BXyellowUsingBX7(int bx7)
4bit spin information
int BX7offset()
bXing at STAR IP, [0,119]
void print(int level=0)
vs. STAR==yellow bXing
virtual Int_t Make()
int BXyellowUsingBX48(int bx48)
4bit spin information
const unsigned char * getRawV124bits()
bXing at STAR IP, [0,119]
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237
Definition: Stypes.h:40
int BX48offset()
bXing at STAR IP, [0,119]
int BXstarUsingBX7(int bx7)
bXing at STAR IP, [0,119]
int spin8bits[SPINDbMaxBXings]
defined at cstructs/spinConstDB.hh
Definition: StSpinDbMaker.h:47
const int * getSpin8bits()
experts only
const int * getBucketOffsets()
experts only
virtual TDataSet * Find(const char *path) const
Definition: TDataSet.cxx:362
bool isPolDirLong()
Returns true if beams are transversely polarized, false otherwise.
Definition: StSpinDbMaker.h:55