--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//_________________________________________________________________________
+// DB Class for table PPR:
+//
+//*-- Author: Yves Schutz (SUBATECH)
+//////////////////////////////////////////////////////////////////////////////
+
+#include <stdlib.h>
+#include <iostream.h>
+
+// --- ROOT system ---
+#include "TSQLServer.h"
+#include "TSQLRow.h"
+#include "TSQLResult.h"
+#include "TDatime.h"
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliDBPPR.h"
+
+ClassImp(AliDBPPR)
+//____________________________________________________________________________
+AliDBPPR::AliDBPPR()
+{
+ fCurrentEntry = 1 ; // first valid entry (0 = labels)
+ fNfields = 6 ;
+ fFields = new TString[6];
+ fFields[0] = "RUN";
+ fFields[1] = "EVENT";
+ fFields[2] = "DATE";
+ fFields[3] = "SIMULATION";
+ fFields[4] = "DIGITIZATION";
+ fFields[5] = "RECONSTRUCTION";
+}
+//____________________________________________________________________________
+AliDBPPR::~AliDBPPR()
+{
+ delete[] fFields ;
+}
+//____________________________________________________________________________
+void AliDBPPR::GetEntry(Option_t * opt)
+{
+ // Retrieves one single row from the table // opt = first : retrieves first entry
+ // opt = last : retrieves last entry
+ // opt = next : retrieves next to current entry
+ TSQLServer * mysql = TSQLServer::Connect("mysql://ccmysql.in2p3.fr:3306/alice", "schutz", "po2hgwy") ;
+ TSQLResult * result = mysql->Query("SELECT * FROM PPR") ;
+ Int_t count = result->GetRowCount() ;
+ if ( !strcmp(opt, "first") ) fCurrentEntry = 1 ;
+ if ( !strcmp(opt, "last") ) fCurrentEntry = count ;
+ if ( fCurrentEntry > count ) fCurrentEntry = 1 ;
+ Int_t i;
+ Int_t end = fCurrentEntry ;
+ TSQLRow * row = 0 ;
+ for ( i = 0 ; i < end ; i++ ) {
+ fCurrentEntry++ ;
+ row = result->Next() ;
+ }
+ fRUN = atoi(row->GetField(0)) ;
+ fEVENT = atoi(row->GetField(1)) ;
+ fDATE = TDatime::TDatime(row->GetField(2)) ;
+ fSIMULATION = row->GetField(3) ;
+ fDIGITIZATION = row->GetField(4) ;
+ fRECONSTRUCTION = row->GetField(5) ;
+}
--- /dev/null
+#ifndef ALIDBPPR_H
+#define ALIDBPPR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+/* $Id$ */
+//_________________________________________________________________________
+// Class for the DB table PPR
+//
+//*-- Author: Yves Schutz (SUBATECH)
+
+#include <assert.h>
+// --- ROOT system ---
+class TDatime ;
+
+// --- AliRoot header files ---
+
+class AliDBPPR : public TObject {
+
+ public:
+ AliDBPPR() ;
+ AliDBPPR(const AliDBPPR & obj) {assert(0==1);}
+ ~AliDBPPR() ;
+ const char * GetField(Int_t index) const { return fFields[index].Data() ; }
+ const TString * GetFields() const { return fFields ; }
+ const Int_t GetNfields() const { return fNfields ; }
+ void GetEntry(Option_t * opt ="next") ;
+ const Int_t GetRUN() const {return fRUN ;}
+ const Int_t GetEVENT() const {return fEVENT ;}
+ const TDatime GetDATE() const {return fDATE ;}
+ const TString GetSIMULATION() const {return fSIMULATION ;}
+ const TString GetDIGITIZATION() const {return fDIGITIZATION ;}
+ const TString GetRECONSTRUCTION() const {return fRECONSTRUCTION ;}
+
+ private:
+ Int_t fCurrentEntry ; // Current entry to be retrieved from table
+ Int_t fNfields ; // number of fields in the table
+ TString * fFields ; //[fNfields] list of fields in the table
+ Int_t fRUN ; // RUN
+ Int_t fEVENT ; // EVENT
+ TDatime fDATE ; // DATE
+ TString fSIMULATION ; // SIMULATION
+ TString fDIGITIZATION ; // DIGITIZATION
+ TString fRECONSTRUCTION ; // RECONSTRUCTION
+
+ClassDef(AliDBPPR,1) // DB class for table PPR
+} ;
+#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//_________________________________________________________________________
+// DB Class for table PPRS:
+//
+//*-- Author: Yves Schutz (SUBATECH)
+//////////////////////////////////////////////////////////////////////////////
+
+#include <stdlib.h>
+#include <iostream.h>
+
+// --- ROOT system ---
+#include "TSQLServer.h"
+#include "TSQLRow.h"
+#include "TSQLResult.h"
+#include "TDatime.h"
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliDBPPRS.h"
+
+ClassImp(AliDBPPRS)
+//____________________________________________________________________________
+AliDBPPRS::AliDBPPRS()
+{
+ fCurrentEntry = 1 ; // first valid entry (0 = labels)
+ fNfields = 12 ;
+ fFields = new TString[12];
+ fFields[0] = "RUN";
+ fFields[1] = "EVENT";
+ fFields[2] = "WORKER";
+ fFields[3] = "STATUS";
+ fFields[4] = "DATE";
+ fFields[5] = "STORAGE";
+ fFields[6] = "ID";
+ fFields[7] = "POS";
+ fFields[8] = "SIZE";
+ fFields[9] = "FTP";
+ fFields[10] = "LOG";
+ fFields[11] = "COMMENT";
+}
+//____________________________________________________________________________
+AliDBPPRS::~AliDBPPRS()
+{
+ delete[] fFields ;
+}
+//____________________________________________________________________________
+void AliDBPPRS::GetEntry(Option_t * opt)
+{
+ // Retrieves one single row from the table // opt = first : retrieves first entry
+ // opt = last : retrieves last entry
+ // opt = next : retrieves next to current entry
+ TSQLServer * mysql = TSQLServer::Connect("mysql://ccmysql.in2p3.fr:3306/alice", "schutz", "po2hgwy") ;
+ TSQLResult * result = mysql->Query("SELECT * FROM PPRS") ;
+ Int_t count = result->GetRowCount() ;
+ if ( !strcmp(opt, "first") ) fCurrentEntry = 1 ;
+ if ( !strcmp(opt, "last") ) fCurrentEntry = count ;
+ if ( fCurrentEntry > count ) fCurrentEntry = 1 ;
+ Int_t i;
+ Int_t end = fCurrentEntry ;
+ TSQLRow * row = 0 ;
+ for ( i = 0 ; i < end ; i++ ) {
+ fCurrentEntry++ ;
+ row = result->Next() ;
+ }
+ fRUN = atoi(row->GetField(0)) ;
+ fEVENT = atoi(row->GetField(1)) ;
+ fWORKER = row->GetField(2) ;
+ fSTATUS = row->GetField(3) ;
+ fDATE = TDatime::TDatime(row->GetField(4)) ;
+ fSTORAGE = row->GetField(5) ;
+ fID = row->GetField(6) ;
+ fPOS = atoi(row->GetField(7)) ;
+ fSIZE = atoi(row->GetField(8)) ;
+ fFTP = row->GetField(9) ;
+ fLOG = row->GetField(10) ;
+ fCOMMENT = row->GetField(11) ;
+}
--- /dev/null
+#ifndef ALIDBPPRS_H
+#define ALIDBPPRS_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+/* $Id$ */
+//_________________________________________________________________________
+// Class for the DB table PPRS
+//
+//*-- Author: Yves Schutz (SUBATECH)
+
+#include <assert.h>
+// --- ROOT system ---
+class TDatime ;
+
+// --- AliRoot header files ---
+
+class AliDBPPRS : public TObject {
+
+ public:
+ AliDBPPRS() ;
+ AliDBPPRS(const AliDBPPRS & obj) {assert(0==1);}
+ ~AliDBPPRS() ;
+ const char * GetField(Int_t index) const { return fFields[index].Data() ; }
+ const TString * GetFields() const { return fFields ; }
+ const Int_t GetNfields() const { return fNfields ; }
+ void GetEntry(Option_t * opt ="next") ;
+ const Int_t GetRUN() const {return fRUN ;}
+ const Int_t GetEVENT() const {return fEVENT ;}
+ const TString GetWORKER() const {return fWORKER ;}
+ const TString GetSTATUS() const {return fSTATUS ;}
+ const TDatime GetDATE() const {return fDATE ;}
+ const TString GetSTORAGE() const {return fSTORAGE ;}
+ const TString GetID() const {return fID ;}
+ const Int_t GetPOS() const {return fPOS ;}
+ const Int_t GetSIZE() const {return fSIZE ;}
+ const TString GetFTP() const {return fFTP ;}
+ const TString GetLOG() const {return fLOG ;}
+ const TString GetCOMMENT() const {return fCOMMENT ;}
+
+ private:
+ Int_t fCurrentEntry ; // Current entry to be retrieved from table
+ Int_t fNfields ; // number of fields in the table
+ TString * fFields ; //[fNfields] list of fields in the table
+ Int_t fRUN ; // RUN
+ Int_t fEVENT ; // EVENT
+ TString fWORKER ; // WORKER
+ TString fSTATUS ; // STATUS
+ TDatime fDATE ; // DATE
+ TString fSTORAGE ; // STORAGE
+ TString fID ; // ID
+ Int_t fPOS ; // POS
+ Int_t fSIZE ; // SIZE
+ TString fFTP ; // FTP
+ TString fLOG ; // LOG
+ TString fCOMMENT ; // COMMENT
+
+ClassDef(AliDBPPRS,1) // DB class for table PPRS
+} ;
+#endif
AliPHOSTrackSegmentMaker.cxx AliPHOSTrackSegmentMakerv1.cxx \
AliPHOSRecParticle.cxx AliPHOSPID.cxx AliPHOSPIDv1.cxx \
AliPHOSAnalyze.cxx AliPHOSFastRecParticle.cxx \
- AliPHOSIndexToObject.cxx
+ AliPHOSIndexToObject.cxx \
+ AliDBPPR.cxx AliDBPPRS.cxx
# C++ Headers
#pragma link off all classes;
#pragma link off all functions;
-#pragma link C++ class AliPHOS+;
-#pragma link C++ class AliPHOSClusterizer+;
-#pragma link C++ class AliPHOSClusterizerv1+;
-#pragma link C++ class AliPHOSCpvRecPoint+;
-#pragma link C++ class AliPHOSDigit+;
-#pragma link C++ class AliPHOSEmcRecPoint+;
-#pragma link C++ class AliPHOSFastRecParticle+;
+#pragma link C++ class AliPHOSEMCAGeometry+;
+#pragma link C++ class AliPHOSCPVBaseGeometry+;
+#pragma link C++ class AliPHOSCPVGeometry+;
+#pragma link C++ class AliPHOSPPSDGeometry+;
+#pragma link C++ class AliPHOSSupportGeometry+;
#pragma link C++ class AliPHOSGeometry+;
#pragma link C++ class AliPHOSHit+;
-#pragma link C++ class AliPHOSIndexToObject+;
+#pragma link C++ class AliPHOS+;
+#pragma link C++ class AliPHOSv0+;
+#pragma link C++ class AliPHOSv1+;
+#pragma link C++ class AliPHOSv2+;
+#pragma link C++ class AliPHOSv3+;
+#pragma link C++ class AliPHOSv4+;
#pragma link C++ class AliPHOSLink+;
#pragma link C++ class AliPHOSPpsdRecPoint+;
#pragma link C++ class AliPHOSReconstructioner+;
#pragma link C++ class AliPHOSRecPoint+;
#pragma link C++ class AliPHOSSDigitizer+;
#pragma link C++ class AliPHOSDigitizer+;
-#pragma link C++ class AliPHOSv0+;
-#pragma link C++ class AliPHOSv1+;
-#pragma link C++ class AliPHOSv2+;
-#pragma link C++ class AliPHOSv3+;
-#pragma link C++ class AliPHOSv4+;
+#pragma link C++ class AliPHOSClusterizer+;
+#pragma link C++ class AliPHOSClusterizerv1+;
+#pragma link C++ class AliPHOSCpvRecPoint+;
+#pragma link C++ class AliPHOSDigit+;
+#pragma link C++ class AliPHOSEmcRecPoint+;
+#pragma link C++ class AliPHOSFastRecParticle+;
#pragma link C++ class AliPHOSTrackSegment+;
#pragma link C++ class AliPHOSTrackSegmentMaker+;
#pragma link C++ class AliPHOSTrackSegmentMakerv1+;
#pragma link C++ class AliPHOSRecParticle+;
#pragma link C++ class AliPHOSPID+;
#pragma link C++ class AliPHOSPIDv1+;
+#pragma link C++ class AliPHOSIndexToObject+;
#pragma link C++ class AliPHOSAnalyze+;
-#pragma link C++ class AliPHOSEMCAGeometry+;
-#pragma link C++ class AliPHOSCPVBaseGeometry+;
-#pragma link C++ class AliPHOSCPVGeometry+;
-#pragma link C++ class AliPHOSPPSDGeometry+;
-#pragma link C++ class AliPHOSSupportGeometry+;
#pragma link C++ class AliPHOSCPVDigit+;
+#pragma link C++ class AliDBPPR+;
+#pragma link C++ class AliDBPPRS+;
#endif