/[PAMELA software]/DarthVader/AnticounterLevel2/src/AcCore.cpp
ViewVC logotype

Annotation of /DarthVader/AnticounterLevel2/src/AcCore.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Fri Aug 4 10:31:24 2006 UTC (18 years, 4 months ago) by mocchiut
Branch: MAIN
Changes since 1.3: +33 -13 lines
Small memory leaks fixed

1 mocchiut 1.1 //
2     // C/C++ headers
3     //
4     #include <fstream>
5     #include <string.h>
6     //
7     // ROOT headers
8     //
9     #include <TTree.h>
10     #include <TClassEdit.h>
11     #include <TObject.h>
12     #include <TList.h>
13     #include <TArrayL.h>
14     #include <TSystem.h>
15     #include <TSystemDirectory.h>
16     #include <TString.h>
17     #include <TFile.h>
18     #include <TClass.h>
19     #include <TCanvas.h>
20     #include <TH1.h>
21     #include <TH1F.h>
22     #include <TH2D.h>
23     #include <TLatex.h>
24     #include <TPad.h>
25     #include <TSQLServer.h>
26     #include <TSQLRow.h>
27     #include <TSQLResult.h>
28     //#include <TClonesArray.h>
29     //
30     // YODA headers
31     //
32     #include <PamelaRun.h>
33     #include <RegistryEvent.h>
34     #include <physics/trigger/TriggerEvent.h>
35     #include <physics/anticounter/AnticounterEvent.h>
36     //
37     // RunInfo header
38     //
39     #include <RunInfo.h>
40     //
41     // This program headers
42     //
43     #include <AcCore.h>
44     #include <AcLevel2.h>
45     #include <AcVerl2.h>
46     //
47     using namespace std;
48     //
49     // CORE ROUTINE
50     //
51     //
52     int AcCore(ULong64_t run, TFile *file, TSQLServer *dbc, Int_t Acargc, char *Acargv[]){
53     Int_t i = 0;
54     Bool_t verbose = false;
55     Bool_t debug = false;
56     //
57     TString processFolder = "AcFolder";
58     if ( Acargc > 0 ){
59     i = 0;
60     while ( i < Acargc ){
61     if ( !strcmp(Acargv[i],"-processFolder") ) {
62     if ( Acargc < i+1 ){
63     throw -3;
64     };
65     processFolder = (TString)Acargv[i+1];
66     i++;
67     };
68     if ( !strcmp(Acargv[i],"-v") || !strcmp(Acargv[i],"--verbose") ) {
69     verbose = true;
70     };
71     if ( !strcmp(Acargv[i],"-g") || !strcmp(Acargv[i],"--debug") ) {
72     debug = true;
73     };
74     i++;
75     };
76     };
77     //
78     // Set these to true to have a very verbose output.
79     //
80     //
81     // Output directory is the working directoy.
82     //
83     const char* outdir = gSystem->DirName(gSystem->DirName(file->GetPath()));
84     //
85     // Variables for level2
86     //
87     TTree *ac = 0;
88     Long64_t nevents = 0LL;
89     //
90     // variables needed to reprocess data
91     //
92     TString acversion;
93     ItoRunInfo *runinfo = 0;
94     TArrayL *runlist = 0;
95     TTree *acclone = 0;
96     Bool_t reproc = false;
97     Bool_t reprocall = false;
98     UInt_t nobefrun = 0;
99     UInt_t noaftrun = 0;
100     UInt_t numbofrun = 0;
101     stringstream ftmpname;
102     TString fname;
103     Long64_t totfileentries = 0ULL;
104     Long64_t idRun = 0LL;
105     //
106     // variables needed to handle error signals
107     //
108     Int_t code = 0;
109     Int_t sgnl;
110     //
111     // anticounter level2 classes
112     //
113     AcLevel2 *acl2 = new AcLevel2();
114     AcLevel2 *acl2clone = new AcLevel2();
115     // note: the string "mydect" is now "ac", "mydetector" is "anticounter" (mydectversion -> acversion, mydectclone -> acclone);
116     // the string "mydec" (without t) -> acl2 (acl2, acl2clone)
117     //
118     // define variables for opening and reading level0 file
119     //
120     TFile *l0File = 0;
121     TTree *l0tr = 0;
122     TBranch *l0head = 0;
123     TBranch *l0registry = 0;
124     TBranch *l0ac = 0;
125     pamela::RegistryEvent *l0reg=0;
126     pamela::anticounter::AnticounterEvent *acc = 0;
127     // pamela::trigger::TriggerEvent *trig = 0;
128     //AcLevel2 *acl2 = new AcLevel2();
129     //
130     // Define other basic variables
131     //
132     UInt_t procev = 0;
133     stringstream file2;
134     stringstream file3;
135     stringstream qy;
136     // Int_t itr = -1;
137     Int_t totevent = 0;
138     ULong64_t atime = 0ULL;
139     Int_t ei = 0;
140     Int_t re = 0;
141     //
142     // Working filename
143     //
144     TString outputfile;
145     stringstream name;
146     name.str("");
147     name << outdir << "/";
148     //
149     // temporary file and folder
150     //
151     TFile *tempfile = 0;
152     TTree *tempac = 0;
153     stringstream tempname;
154     stringstream acfolder;
155     tempname.str("");
156     tempname << outdir;
157     tempname << "/" << processFolder.Data();
158     acfolder.str("");
159     acfolder << tempname.str().c_str();
160     gSystem->MakeDirectory(acfolder.str().c_str());
161     tempname << "/ac2tree_run";
162     tempname << run << ".root";
163     //
164     // DB classes
165     //
166     GL_ROOT *glroot = new GL_ROOT();
167     //GL_PARAM *glparam = new GL_PARAM();
168     //
169 mocchiut 1.4 UShort_t CRCcheck[2]= {0,0};
170     UShort_t Status[2]= {0,0};
171     UShort_t Hitmap[2]= {0,0};
172     UShort_t Hitstatus[2]= {0,0};
173     UShort_t Trigger[2] = {0,0};
174     UShort_t Trigg_old[2] = {0,0};
175     UShort_t Counter[2][16];
176     UShort_t Counter_old[2][16];
177     UShort_t Shift[2][16];
178     Int_t vec[2][16][16];
179     Int_t tmp = 0;
180     memset(vec, 0, 2*16*16*sizeof(UShort_t));
181     memset(Shift, 0, 2*16*sizeof(UShort_t));
182     memset(Counter, 0, 2*16*sizeof(UShort_t));
183     memset(Counter_old, 0, 2*16*sizeof(UShort_t));
184     //
185 mocchiut 1.1 // Let's start!
186     //
187     //
188     // As a first thing we must check what we have to do: if run = 0 we must process all events in the file has been passed
189     // if run != 0 we must process only that run but first we have to check if the tree Anticounter already exist in the file
190     // if it exists we are reprocessing data and we must delete that entries, if not we must create it.
191     //
192     if ( run == 0ULL ) reproc = true;
193     //
194     // Output file is "outputfile"
195     //
196     outputfile = name.str().c_str();
197     if ( verbose ) printf("\n Output filename is: \n %s \n\n",outputfile.Data());
198     //
199     //
200     if ( !file->IsOpen() ){
201     if ( verbose ) printf(" ANTICOUNTER - ERROR: cannot open file for writing\n");
202     throw -701;
203     };
204     //
205     // Retrieve GL_RUN variables from the level2 file
206     //
207     acversion = AcInfo(false); // we should decide how to handle versioning system
208     //
209     // create an interface to RunInfo called "runinfo"
210     //
211     runinfo = new ItoRunInfo(file);
212     //
213     // open "Run" tree in level2 file, if not existing return an error (sngl != 0)
214     //
215     sgnl = 0;
216     sgnl = runinfo->Update(run,"AC",acversion);
217     if ( sgnl ){
218     if ( verbose ) printf(" ANTICOUNTER - ERROR: RunInfo exited with non-zero status\n");
219     code = sgnl;
220     goto closeandexit;
221     } else {
222     sgnl = 0;
223     };
224     //
225     // number of events in the file BEFORE the first event of our run
226     //
227     nobefrun = runinfo->GetFirstEntry();
228     //
229     // total number of events in the file
230     //
231     totfileentries = runinfo->GetFileEntries();
232     //
233     // first file entry AFTER the last event of our run
234     //
235     noaftrun = runinfo->GetLastEntry() + 1;
236     //
237     // number of run to be processed
238     //
239     numbofrun = runinfo->GetNoRun();
240     //
241     // Try to access the Anticounter tree in the file, if it exists we are reprocessing data if not we are processing a new run
242     //
243     acclone = (TTree*)file->Get("Anticounter");
244     //
245     if ( !acclone ){
246     //
247     // tree does not exist, we are not reprocessing
248     //
249     reproc = false;
250     if ( run == 0ULL && verbose ) printf(" ANTICOUNTER - WARNING: you are reprocessing data but AC tree does not exist!\n");
251     if ( verbose && runinfo->IsReprocessing() && run != 0ULL ) printf(" ANTICOUNTER - WARNING: it seems you are not reprocessing data but Anticounter\n versioning information already exists in RunInfo.\n");
252    
253     } else {
254     //
255     // tree exists, we are reprocessing data. Are we reprocessing a single run or all the file?
256     //
257     reproc = true;
258     //
259     //
260     if ( verbose ) printf("\n Preparing the pre-processing...\n");
261     //
262     if ( run == 0ULL ){
263     //
264     // we are reprocessing all the file
265     // if we are reprocessing everything we don't need to copy any old event and we can just work with the new tree and delete the old one immediately
266     //
267     reprocall = true;
268     //
269     if ( verbose ) printf("\n ANTICOUNTER - WARNING: Reprocessing all runs\n");
270     //
271     } else {
272     //
273     // we are reprocessing a single run, we must copy to the new tree the events in the file which preceed the first event of the run
274     //
275     reprocall = false;
276     //
277     if ( verbose ) printf("\n ANTICOUNTER - WARNING: Reprocessing run number %llu \n",run);
278     //
279     // copying old tree to a new file
280     //
281     tempfile = new TFile(tempname.str().c_str(),"RECREATE");
282     tempac = acclone->CloneTree(-1,"fast");
283     tempac->SetName("Anticounter-old");
284     tempfile->Write();
285     tempfile->Close();
286     }
287     //
288     // Delete the old tree from old file and memory
289     //
290     acclone->Delete("all");
291     //
292     if ( verbose ) printf(" ...done!\n");
293     //
294     };
295     //
296     // create anticounter tree ac
297     //
298     file->cd();
299     ac = new TTree("Anticounter-new","PAMELA Level2 Anticounter data");
300     ac->Branch("AcLevel2","AcLevel2",&acl2);
301     //
302     if ( reproc && !reprocall ){
303     //
304     // open new file and retrieve alo tree informations
305     //
306     tempfile = new TFile(tempname.str().c_str(),"READ");
307     acclone = (TTree*)tempfile->Get("Anticounter-old");
308     acclone->SetBranchAddress("AcLevel2",&acl2clone);
309     //
310     if ( nobefrun > 0 ){
311     if ( verbose ) {
312     printf("\n Pre-processing: copying events from the old tree before the processed run\n");
313     printf(" Copying %u events in the file which are before the beginning of the run %llu \n",nobefrun,run);
314     printf(" Start copying at event number 0, end copying at event number %u \n",nobefrun);
315     };
316     for (UInt_t j = 0; j < nobefrun; j++){
317     //
318     acclone->GetEntry(j);
319     //
320     // copy acl2clone to acl2
321     //
322 mocchiut 1.3 acl2->Clear();
323     // acl2 = new AcLevel2();
324 mocchiut 1.1 memcpy(&acl2,&acl2clone,sizeof(acl2clone));
325     //
326     // Fill entry in the new tree
327     //
328     ac->Fill();
329     //
330     };
331     if ( verbose ) printf(" Finished successful copying!\n");
332     };
333     };
334     //
335     // Get the list of run to be processed, if only one run has to be processed the list will contain one entry only.
336     //
337     runlist = runinfo->GetRunList();
338     //
339     // Loop over the run to be processed
340     //
341     for (UInt_t irun=0; irun < numbofrun; irun++){
342     //
343     // retrieve the first run ID to be processed using the RunInfo list
344     //
345     idRun = runlist->At(irun);
346     if ( verbose ){
347     printf("\n\n\n ####################################################################### \n");
348     printf(" PROCESSING RUN NUMBER %i \n",(int)idRun);
349     printf(" ####################################################################### \n\n\n");
350     };
351     //
352     runinfo->ID_REG_RUN = 0ULL;
353     //
354     // store in the runinfo class the GL_RUN variables for our run
355     //
356     sgnl = 0;
357     sgnl = runinfo->GetRunInfo(idRun);
358     if ( sgnl ){
359     if ( verbose ) printf(" ANTICOUNTER - ERROR: RunInfo exited with non-zero status\n");
360     code = sgnl;
361     goto closeandexit;
362     } else {
363     sgnl = 0;
364     };
365     //
366     // now you can access that variables using the RunInfo class this way runinfo->ID_REG_RUN
367     //
368     if ( runinfo->ID_REG_RUN == 0 ){
369     if ( verbose ) printf("\n ANTICOUNTER - ERROR: no run with ID_RUN = %i \n\n Exiting... \n\n",(int)idRun);
370     code = -5;
371     goto closeandexit;
372     };
373     //
374     // Search in the DB the path and name of the LEVEL0 file to be processed.
375     //
376     glroot->Query_GL_ROOT(runinfo->ID_REG_RUN,dbc);
377     //
378     ftmpname.str("");
379     ftmpname << glroot->PATH.Data() << "/";
380     ftmpname << glroot->NAME.Data();
381     fname = ftmpname.str().c_str();
382     //
383     // print out informations
384     //
385     totevent = runinfo->EV_REG_PHYS_TO - runinfo->EV_REG_PHYS_FROM + 1;
386     if ( verbose ) {
387     printf("\n LEVEL0 data file: %s \n",fname.Data());
388     printf(" RUN HEADER absolute time is: %llu \n",runinfo->RUNHEADER_TIME);
389     printf(" RUN TRAILER absolute time is: %llu \n",runinfo->RUNTRAILER_TIME);
390     printf(" %i events to be processed for run %llu: from %i to %i (reg entries)\n\n",totevent,idRun,runinfo->EV_REG_PHYS_FROM,runinfo->EV_REG_PHYS_TO);
391     };
392     //
393     // Open Level0 file
394     //
395     l0File = new TFile(fname.Data());
396     if ( !l0File ) {
397     if ( verbose ) printf(" ANTICOUNTER - ERROR: problems opening Level0 file\n");
398     code = -6;
399     goto closeandexit;
400     };
401     l0tr = (TTree*)l0File->Get("Physics");
402     if ( !l0tr ) {
403     if ( verbose ) printf(" ANTICOUNTER - ERROR: no Physics tree in Level0 file\n");
404     l0File->Close();
405     code = -7;
406     goto closeandexit;
407     };
408     l0head = l0tr->GetBranch("Header");
409     if ( !l0head ) {
410     if ( verbose ) printf(" ANTICOUNTER - ERROR: no Header branch in Level0 tree\n");
411     l0File->Close();
412     code = -8;
413     goto closeandexit;
414     };
415     l0registry = l0tr->GetBranch("Registry");
416     if ( !l0registry ) {
417     if ( verbose ) printf(" ANTICOUNTER - ERROR: no Registry branch in Level0 tree\n");
418     l0File->Close();
419     code = -9;
420     goto closeandexit;
421     };
422     l0ac = l0tr->GetBranch("Anticounter");
423     if ( !l0ac ) {
424     if ( verbose ) printf(" ANTICOUNTER - ERROR: no Anticounter branch in Level0 tree\n");
425     l0File->Close();
426     code = -704;
427     goto closeandexit;
428     };
429     //
430     //l0tr->SetBranchAddress("Trigger", &trig);
431     l0tr->SetBranchAddress("Anticounter", &acc);
432     l0tr->SetBranchAddress("Registry", &l0reg);
433     //
434     nevents = l0registry->GetEntries();
435     //
436     if ( nevents < 1 ) {
437     if ( verbose ) printf(" ANTICOUNTER - ERROR: Level0 file is empty\n\n");
438     l0File->Close();
439     code = -11;
440     goto closeandexit;
441     };
442     //
443     if ( runinfo->EV_REG_PHYS_TO > nevents-1 ) {
444     if ( verbose ) printf(" ANTICOUNTER - ERROR: too few entries in the registry tree\n");
445     l0File->Close();
446     code = -12;
447     goto closeandexit;
448     };
449     //
450     // run over all the events of the run
451     //
452     if ( verbose ) printf("\n Ready to start! \n\n Processed events: \n\n");
453     //
454     for ( re = runinfo->EV_REG_PHYS_FROM; re <= runinfo->EV_REG_PHYS_TO; re++){
455     //
456     if ( procev%1000 == 0 && procev > 0 && verbose ) printf(" %iK \n",procev/1000);
457     //
458     l0registry->GetEntry(re);
459     //
460     // absolute time of this event
461     //
462     atime = l0reg->absTime;
463     //
464     // physics events is at entry number ei where
465     //
466     ei = l0reg->event;
467     //
468     // paranoid check
469     //
470     if ( atime > runinfo->RUNTRAILER_TIME || atime < runinfo->RUNHEADER_TIME ) {
471     if ( verbose ) printf(" ANTICOUNTER - WARNING: event at time outside the run time window, skipping it\n");
472     goto jumpev;
473     };
474     //
475     procev++;
476     //
477     // start processing
478     //
479 mocchiut 1.3 // acl2 = new AcLevel2();
480     acl2->Clear();
481 mocchiut 1.1 //
482 pam-se 1.2 l0ac->GetEntry(ei);
483     //
484 mocchiut 1.1 /***********************************************/
485     // Here starts Anticounter specific code (Silvio)
486     //
487 mocchiut 1.4 memset(vec, 0, 2*16*16*sizeof(UShort_t));
488     memset(Shift, 0, 2*16*sizeof(UShort_t));
489     memset(Counter, 0, 2*16*sizeof(UShort_t));
490     memset(Counter_old, 0, 2*16*sizeof(UShort_t));
491     memset(CRCcheck, 0, 2*sizeof(UShort_t));
492     memset(Status, 0, 2*sizeof(UShort_t));
493     memset(Hitmap, 0, 2*sizeof(UShort_t));
494     memset(Hitstatus, 0, 2*sizeof(UShort_t));
495     memset(Trigger, 0, 2*sizeof(UShort_t));
496     memset(Trigg_old, 0, 2*sizeof(UShort_t));
497     tmp = 0;
498 mocchiut 1.1 //
499     for(Int_t gg = 0; gg < 2; gg++)
500     {
501     Hitstatus[gg] = 0;
502     }
503     //
504     //fetch data
505     //
506     for(Int_t kk = 0; kk < 2; kk++)
507     {
508     if(re>0)
509     {
510     Trigg_old[kk] = Trigger[kk];
511     for(Int_t jj = 0; jj < 16; jj++)
512     Counter_old[kk][jj] = Counter[kk][jj];
513     }
514    
515     for(Int_t jj = 0; jj < 16; jj++)
516     {
517     Counter[kk][jj] = acc->counters[kk][jj];
518     Shift[kk][jj] = acc->shift[kk][jj];
519     }
520     Status[kk] = acc->status[kk];
521     Hitmap[kk] = acc->hitmap[kk];
522     Trigger[kk] = acc->trigg[kk];
523     CRCcheck[kk] = acc->CRCcheck[kk];
524     }
525    
526     /***********************************************/
527    
528    
529     //process data
530     /***********************************************/
531     //shiftregisters
532     for(Int_t b = 0; b < 2; b++){ //card
533     for(Int_t k = 0; k < 16; k++){ //shift register
534     Int_t cnt=1;
535     for(Int_t l = 0; l < 16; l++){ //bin
536     tmp = ((Shift[b][k] & cnt) > 0 ? 1 : 0);
537     vec[b][k][l]=tmp;
538     cnt=cnt<<1;
539     }
540     //cnt=1;
541     }
542     }
543    
544     //fill Level1 file
545     /************************************************/
546     for(Int_t s = 0; s < 2; s++) {
547     acl2->hitmap[s] = Hitmap[s];
548     acl2->trigger[s] = Trigger[s];
549     Int_t cnt=1;
550     for(Int_t k = 0; k < 16; k++) {
551     for(Int_t bin = 5; bin < 9; bin++) { //acceptance window
552     if(vec[s][bin][k]==1)
553     Hitstatus[s] = Hitstatus[s] | cnt;
554     }
555     cnt=cnt<<1;
556     }
557     acl2->hitstatus[s] = Hitstatus[s];
558    
559     //Status
560     /****************************************/
561     if(s==0){
562     if(Trigger[0] != (Trigg_old[0]+1))
563     acl2->status[0] = acl2->status[0] | 0x1;
564     if(Status[0] & 0x001F < 0x001F)
565     acl2->status[0] = acl2->status[0] | 0x2;
566     if(CRCcheck[0] == 0)
567     acl2->status[0] = acl2->status[0] | 0x4;
568     for(Int_t gg = 0; gg < 16; gg++){
569     if((Counter[0][gg] == Counter_old[0][gg]) && ei>0){
570     acl2->status[0] = acl2->status[0] | 0x8;
571     }
572     }
573     }
574     else {
575     if(Trigger[1] != (Trigg_old[1]+2))
576     acl2->status[1] = acl2->status[1] | 0x1;
577     if(Status[1] & 0x001F < 0x001F)
578     acl2->status[1] = acl2->status[1] | 0x2;
579     if(CRCcheck[1] == 0)
580     acl2->status[1] = acl2->status[1] | 0x4;
581     for(Int_t gg = 0; gg < 16; gg++){
582     if((Counter[1][gg] == Counter_old[1][gg]) && ei>0)
583     acl2->status[1] = acl2->status[1] | 0x8;
584     }
585     }
586     }
587     //acl2->OBT = ph->GetOrbitalTime();
588     //acl2->pkt_num = re+1;
589     //acl2->pro_num = ph->GetCounter();
590     //
591     // End Anticounter specific code
592     //
593     /************************************************/
594    
595     //
596     // Fill the rootple
597     //
598     ac->Fill();
599     //
600     //
601     jumpev:
602     debug = false;
603     //
604     };
605     //
606     // Here you may want to clear some variables before processing another run
607     //
608     ei = 0;
609     }; // process all the runs
610     //
611     if ( verbose ) printf("\n Finished processing data \n");
612     //
613     closeandexit:
614     //
615     // we have finished processing the run(s). If we processed a single run now we must copy all the events after our run from the old tree to the new one and delete the old tree.
616     //
617     if ( !reprocall && reproc && code >= 0 ){
618     if ( totfileentries > noaftrun ){
619     if ( verbose ){
620     printf("\n Post-processing: copying events from the old tree after the processed run\n");
621     printf(" Copying %i events in the file which are after the end of the run %i \n",(int)(totfileentries-noaftrun),(int)run);
622     printf(" Start copying at event number %i end copying at event number %i \n",(int)noaftrun,(int)totfileentries);
623     };
624     for (UInt_t j = noaftrun; j < totfileentries; j++ ){
625     //
626     // Get entry from old tree
627     //
628     acclone->GetEntry(j);
629     //
630     // copy acl2clone to acl2
631     //
632 mocchiut 1.3 // acl2 = new AcLevel2();
633     acl2->Clear();
634 mocchiut 1.1 memcpy(&acl2,&acl2clone,sizeof(acl2clone));
635     //
636     // Fill entry in the new tree
637     //
638     ac->Fill();
639     };
640     if ( verbose ) printf(" Finished successful copying!\n");
641     };
642     };
643     //
644     // Close files, delete old tree(s), write and close level2 file
645     //
646     if ( l0File ) l0File->Close();
647     if ( tempfile ) tempfile->Close();
648     gSystem->Unlink(tempname.str().c_str());
649     //
650     if ( code < 0 && verbose ) printf("\n ANTICOUNTER - ERROR: an error occurred, try to save anyway...\n");
651     if ( verbose ) printf("\n Writing and closing rootple\n");
652     if ( runinfo ) runinfo->Close();
653     if ( ac ) ac->SetName("Anticounter");
654     if ( file ){
655     file->cd();
656     file->Write();
657     };
658     //
659     gSystem->Unlink(acfolder.str().c_str());
660     //
661     // the end
662     //
663     if ( verbose ) printf("\n Exiting...\n");
664     if( ac ) ac->Delete();
665 mocchiut 1.4 //
666     if ( acl2 ) delete acl2;
667     if ( acclone ) delete acclone;
668     if ( glroot ) delete glroot;
669     if ( runinfo ) delete runinfo;
670     //
671 mocchiut 1.1 if(code < 0) throw code;
672     return(code);
673     }
674    
675    
676    

  ViewVC Help
Powered by ViewVC 1.1.23