#include <NtpFile.h>
Public Member Functions | |
| NtpFile () | |
| NtpFile (bool icMC, bool isMRCC=false) | |
| virtual | ~NtpFile () |
| int | AddFiles (const char *filenames) |
| bool | Init () |
| virtual bool | GetNextRecord () |
| virtual bool | ReloadRecord () |
| const NtpStRecord * | GetCCRecord () const |
| const NtpBDLiteRecord * | GetBDRecord () const |
| const NtpMRRecord * | GetMRRecord () const |
| const NtpStRecord * | GetOldRecord () const |
Private Attributes | |
| bool | fIsMC |
| bool | fIsMRCC |
| TChain * | fCCChain |
| NtpStRecord * | fCCRecord |
| TChain * | fBDChain |
| NtpBDLiteRecord * | fBDRecord |
| TChain * | fMRChain |
| NtpMRRecord * | fMRRecord |
| TChain * | fOldChain |
| NtpStRecord * | fOldRecord |
| long | iCCEvent |
|
|
Definition at line 18 of file NtpFile.cxx. References fBDChain, fBDRecord, fCCChain, fCCRecord, fIsMC, fMRChain, fMRRecord, iCCEvent, and MSG. 00018 {
00019 MSG("NtpAna", Msg::kWarning) << "Assuming DATA" <<endl;
00020 fIsMC = false;
00021 fCCChain = new TChain("NtpSt");
00022 fBDChain = new TChain("NtpBDLite");
00023 fMRChain = new TChain("NtpMR");
00024 fCCRecord = new NtpStRecord();
00025 fBDRecord = new NtpBDLiteRecord();
00026 fMRRecord = new NtpMRRecord();
00027
00028 iCCEvent = -1;
00029 }
|
|
||||||||||||
|
Definition at line 31 of file NtpFile.cxx. References fBDChain, fBDRecord, fCCChain, fCCRecord, fIsMC, fIsMRCC, fMRChain, fMRRecord, fOldChain, fOldRecord, and iCCEvent. 00031 {
00032 fIsMC = isMC;
00033 fIsMRCC = isMRCC;
00034 fCCChain = new TChain("NtpSt");
00035 fBDChain = new TChain("NtpBDLite");
00036 fMRChain = new TChain("NtpMR");
00037 fOldChain = new TChain("NtpOld");
00038 fCCRecord = new NtpStRecord();
00039 fBDRecord = new NtpBDLiteRecord();
00040 fMRRecord = new NtpMRRecord();
00041 fOldRecord = new NtpStRecord();
00042
00043 iCCEvent = -1;
00044 }
|
|
|
Definition at line 46 of file NtpFile.cxx. References NtpMRRecord::Clear(), NtpStRecord::Clear(), fBDRecord, fCCRecord, fMRRecord, and fOldRecord. 00046 {
00047 fCCRecord->Clear();
00048 fBDRecord->Clear();
00049 fMRRecord->Clear();
00050 fOldRecord->Clear();
00051 delete fCCChain;
00052 delete fCCRecord;
00053 delete fBDRecord;
00054 delete fBDChain;
00055 delete fMRRecord;
00056 delete fMRChain;
00057 delete fOldRecord;
00058 delete fOldChain;
00059 }
|
|
|
Definition at line 75 of file NtpFile.cxx. References fBDChain, fCCChain, fMRChain, and fOldChain. 00075 {
00076 return (fCCChain->Add(filesnames) + fBDChain->Add(filesnames) + fMRChain->Add(filesnames) + fOldChain->Add(filesnames) );
00077 }
|
|
|
Definition at line 20 of file NtpFile.h. 00020 {return fBDRecord;}
|
|
|
Definition at line 19 of file NtpFile.h. 00019 {return fCCRecord;}
|
|
|
Definition at line 21 of file NtpFile.h. 00021 {return fMRRecord;}
|
|
|
Definition at line 79 of file NtpFile.cxx. References NtpMRRecord::Clear(), NtpStRecord::Clear(), fBDChain, fBDRecord, fCCChain, fCCRecord, fIsMC, fIsMRCC, fMRChain, fMRRecord, fOldChain, fOldRecord, iCCEvent, Init(), and MSG. 00079 {
00080 if(iCCEvent<0){
00081 MSG("NtpAna", Msg::kWarning) << "The files have not been inited... doning it now" <<endl;
00082 this->Init();
00083 }
00084 fCCRecord->Clear();
00085 fBDRecord->Clear();
00086 fMRRecord->Clear();
00087 fOldRecord->Clear();
00088 const int rc1 = fCCChain->GetEntry(iCCEvent);
00089 if(rc1<0){
00090 cout << "*** Failed to get next record " <<endl;
00091 return 0;
00092 }else if(rc1==0){
00093 cout << "End of Records " <<endl;
00094 return 0;
00095 }
00096 const int rc2 = ((fIsMC==false)? fBDChain->GetEntry(iCCEvent) : 1 );
00097 if(rc2<=0){
00098 cout << "*** Failed to get beam record " <<endl;
00099 return 0;
00100 }
00101 const int rc3 = ((fIsMRCC==true)? fMRChain->GetEntry(iCCEvent) : 1 );
00102 if(rc3<=0){
00103 cout << "*** Failed to get mr record " <<endl;
00104 return 0;
00105 }
00106 const int rc4 = ((fIsMRCC==true)? fOldChain->GetEntry(iCCEvent) : 1 );
00107 if(rc4<=0){
00108 cout << "*** Failed to get mrold record " <<endl;
00109 return 0;
00110 }
00111
00112 iCCEvent++;
00113 return true;
00114 }
|
|
|
Definition at line 22 of file NtpFile.h. 00022 {return fOldRecord;}
|
|
|
Definition at line 62 of file NtpFile.cxx. References fBDChain, fBDRecord, fCCChain, fCCRecord, fMRChain, fMRRecord, fOldChain, fOldRecord, and iCCEvent. Referenced by GetNextRecord(), and ReloadRecord(). 00062 {
00063 iCCEvent = 0;
00064 fCCChain->SetBranchAddress("NtpStRecord", &fCCRecord);
00065 if(!fIsMC)
00066 fBDChain->SetBranchAddress("NtpBDLiteRecord", &fBDRecord);
00067 if(fIsMRCC){
00068 fMRChain->SetBranchAddress("NtpMRRecord", &fMRRecord);
00069 fOldChain->SetBranchAddress("NtpStRecord", &fOldRecord);
00070 fOldChain->SetBranchStatus("stp.*", false);
00071 }
00072 return true;
00073 }
|
|
|
Definition at line 117 of file NtpFile.cxx. References NtpStRecord::Clear(), fBDChain, fBDRecord, fCCChain, fCCRecord, fIsMC, fIsMRCC, fMRChain, iCCEvent, Init(), and MSG. 00117 {
00118 if(iCCEvent<0){
00119 MSG("NtpAna", Msg::kWarning) << "The files have not been inited... doning it now" <<endl;
00120 this->Init();
00121 }
00122 fCCRecord->Clear();
00123 fBDRecord->Clear();
00124 const int rc1 = fCCChain->GetEntry(iCCEvent-1);
00125 if(rc1<0){
00126 cout << "*** Failed to get next record " <<endl;
00127 return 0;
00128 }else if(rc1==0){
00129 cout << "End of Records " <<endl;
00130 return 0;
00131 }
00132 const int rc2 = ((fIsMC==false)? fBDChain->GetEntry(iCCEvent-1) : 1 );
00133 if(rc2<=0){
00134 cout << "*** Failed to get beam record " <<endl;
00135 return 0;
00136 }
00137 const int rc3 = ((fIsMRCC==true)? fMRChain->GetEntry(iCCEvent-1) : 1 );
00138 if(rc3<=0){
00139 cout << "*** Failed to get mr record " <<endl;
00140 return 0;
00141 }
00142
00143
00144 return true;
00145 }
|
|
|
Definition at line 29 of file NtpFile.h. Referenced by AddFiles(), GetNextRecord(), Init(), NtpFile(), and ReloadRecord(). |
|
|
Definition at line 30 of file NtpFile.h. Referenced by GetNextRecord(), Init(), NtpFile(), ReloadRecord(), and ~NtpFile(). |
|
|
Definition at line 27 of file NtpFile.h. Referenced by AddFiles(), GetNextRecord(), Init(), NtpFile(), and ReloadRecord(). |
|
|
Definition at line 28 of file NtpFile.h. Referenced by GetNextRecord(), Init(), NtpFile(), ReloadRecord(), and ~NtpFile(). |
|
|
Definition at line 24 of file NtpFile.h. Referenced by GetNextRecord(), NtpFile(), and ReloadRecord(). |
|
|
Definition at line 25 of file NtpFile.h. Referenced by GetNextRecord(), NtpFile(), and ReloadRecord(). |
|
|
Definition at line 32 of file NtpFile.h. Referenced by AddFiles(), GetNextRecord(), Init(), NtpFile(), and ReloadRecord(). |
|
|
Definition at line 33 of file NtpFile.h. Referenced by GetNextRecord(), Init(), NtpFile(), and ~NtpFile(). |
|
|
Definition at line 34 of file NtpFile.h. Referenced by AddFiles(), GetNextRecord(), Init(), and NtpFile(). |
|
|
Definition at line 35 of file NtpFile.h. Referenced by GetNextRecord(), Init(), NtpFile(), and ~NtpFile(). |
|
|
Definition at line 38 of file NtpFile.h. Referenced by GetNextRecord(), Init(), NtpFile(), and ReloadRecord(). |
1.3.9.1